diff --git a/AGENTS.md b/AGENTS.md index ff4acb6..a63cfae 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,5 +1,71 @@ # SGF Tempo — instruções locais +- Decisão expressa de04/11/2026: concluir Compras numa única instalação e **não criar mais demonstrações isoladas**. Instalação de trabalho escolhida e actualizada no lugar:8085, entrada `http://127.0.0.1:8085/compras`, estado privado `receipt-composition-cc50a276c10c`. Continuar aí; não abrir outra porta ou base de demonstração por incremento. Ver `docs/PURCHASING_COMPLETION.md` e `docs/COMPRAS_USO_LOCAL.md`. C01–C10 concluídos no percurso aquisição → obrigação: fornecedor novo/revisão, requisição/submissão/aprovação, três propostas/seis avaliações, adjudicação/aprovação, ordem, recepção, factura/validação, preparação/reconhecimento distinto. ExemploREQ-2026-000003/OC-2026-000001, facturaFACT-COMPRA-COMPLETA-20261104, principal/saldo100MZN e movimento1UN. Entrada com funções existentes/CSRF/guardas físicas, painel de documentos, prévias legíveis, retenção da origem ao trocar função e protecção de campos/confirmações em curso.63 verificações dirigidas:13 percurso UI→HTTP real,22 leituras/entrada,10 cliente,12 dados canónicos READ ONLY, duas comparações com dump inicial, três passagens de função e uma observação do mesmo movimento na API de Stock; sem repetir comandos concluídos ou suites anteriores. DOM simulado não é revisão visual. Writers/controllers/políticas/pacotes fixados preservados; orçamento do host e concessões idênticos ao backup. Código/dumps privados fora do repositório; sem novas bases/roles/portas/demos.8085 agora contém o exemplo concluído; isso substitui a sua condição inicial vazia, sem alterar8084/anteriores. Preservar seis registos/cache/trabalho alheio; sem implantação/concessões reais, pagamentos/contabilidade desta origem, emissão fiscal, candidata de Compras, publicação, aceitação/checkpoint presumidos. `scripts/abrir-compras.ps1` reutiliza a instalação; foi conferido com8085 já activa, não com reinício completo do sistema. Visual/carga sustentada/implantação permanecem separados. + +- Continuação de 03/11/2026: `SGF-STOCK-PERIOD-REPORT-QA-v1` entregue; ver `docs/SGF_STOCK_PERIOD_REPORT.md`. Stock → Relatórios → Movimentos: resumo físico por artigo/armazém, abertura/entradas/saídas/fecho, período explícito por registo UTC, metadados actuais, sem total entre unidades. SQL/páginas25/100, referências/contexto/revisão, direitos e fonte SELECT-only existentes; flag desligada por omissão, sem direito novo.52 verificações (28 API/SQL,12 UI, duas de consultas, três guardas directas, sete demo).105 pares/114 movimentos iniciais são fixtures SQL de relatório, não operações do workflow; um append adicional só na regressão para revisão. Cinco SELECTs na projecção para25 e100 linhas, excluindo host/middleware/guardas; não é carga/memória/implantação. Demo8085 nova vazia;8084/anteriores, seis registos/cache/provas/trabalho alheio preservados. Sem writer/efeito financeiro novo, índices no destino, concessões reais, instalação, activação, publicação, aceitação/checkpoint. UTC da origem, unidades coerentes/histórico, exportação e restantes relatórios exigem seus recortes; visual/carga sustentada/implantação separados. + +- Continuação de 03/11/2026: `SGF-STOCK-RECEIPT-TRACE-QA-v1` entregue; ver `docs/SGF_STOCK_RECEIPT_TRACE.md`. Movimento `receipt_in` pode abrir a recepção real após escolha explícita de Compras pelo mecanismo de contexto existente. Destino revalida `stock.view`/`purchasing_receipts.view`, perfil/tenant/armazém, linha/quantidade/artigo/fotografia e políticas originais; sem pais do browser, fallback ou comandos de negócio. Writer/runtime/leitores comuns/navegação aceite preservados, conta Stock continua SELECT em três tabelas, flag nova desligada por omissão.46 verificações:16 consulta/preservação (14 aprovadas reutilizadas após corrigir comparação de objectos no harness),20 UI e dez demo.31 tabelas host/111 nativas e sequências intactas na observação final, sem repetir origem ou suites anteriores. Demo8084 nova vazia, POST de contexto auditado pelo mecanismo existente; correlação positiva no livro QA concluído reutilizado só para leitura. Preservar8083/anteriores, seis registos/cache/provas/trabalho alheio. Sem novos direitos reais/nomes de direitos, movimento/efeito financeiro, instalação, activação, publicação, aceitação/checkpoint. Visual/carga sustentada/implantação separados; resolver conserva bloqueios do runtime de Compras. + +- Continuação de 03/11/2026: `SGF-STOCK-COMPOSED-SOURCE-QA-v1` entregue; ver `docs/SGF_STOCK_COMPOSED_SOURCE.md`. Stock observa o mesmo livro físico da composição integrada Compras, sem copiar movimentos/saldos ou adquirir mutex nativo de escrita. Leitor/navegação/React/writer existentes preservados; adaptador novo, flag desligada por omissão, role SELECT-only em três tabelas, perfil por pessoa/empresa/unidade/armazéns, contexto/revisão revalidados. Direito existente `stock.view` anunciado e concedido só ao perfil de armazém das fixtures novas; trigger append-only apenas nesses livros QA.41 verificações (31 integração/dez demo, duas guardas directas), uma recepção/movimento1UN na regressão; fonte preparatória recuperada após recusa409 sem emitir segunda ordem. Demo8083 nova sem operações principais. Preservar8082/anteriores, seis registos/cache/provas/trabalho alheio; sem direitos reais, efeitos financeiros, instalação no destino, activação, publicação, aceitação/checkpoint. Visual/carga sustentada/implantação separados. + +- Continuação de 03/11/2026: `SGF-OBLIGATION-EVIDENCE-WORKSPACE-QA-v1` entregue; ver `docs/SGF_OBLIGATION_EVIDENCE_WORKSPACE.md`. Paginar propostas/eventos conserva fundamento/prévia da decisão seleccionada. Proposta escolhida explicitamente, sem revisão própria/duplicação oferecida; operação em curso impede trocar selecção. Nova revisão/actor/permissões observados invalidam conferências antigas; resposta/prévia atrasada não as reactiva.26 verificações novas (20 DOM/seis demo);72 provas nativas reutilizadas, não repetidas nem somadas. Controller/runtime/kernel financeiros e bloco legado preservados. Nova demo8082 sem operações principais. Sem direitos/writers novos, confirmação financeira nova presumida ou protocolo de paginação novo. Preservar8081/anteriores, seis registos/cache/provas/trabalho alheio; sem activação, publicação, concessões reais, aceitação/checkpoint. Visual/carga/instalação/implantação continuam separados. + +- Continuação de 03/11/2026: `SGF-INVOICE-MATCHING-PROGRESS-QA-v1` entregue; ver `docs/SGF_INVOICE_MATCHING_PROGRESS.md`. Quantidades por linha: encomendado/aceite/correcções/validado/pendente/restante, duas agregações de factos e estado observado uma vez antes da revisão/capacidades. Pendentes não reservam; discrepância avisa sem alterar documento ou decisão nativa. Histórico de factura protege contra resposta atrasada.47 verificações:14+16 em livros concluídos reutilizados só para leitura,11 DOM e seis demo. Todas as tabelas/sequências dos dois livros intactas; sem repetir comandos financeiros. Nova demo8081 sem operações principais. Estado original, preview/confirm e writers preservados; sem direitos novos. A revisão completa ainda materializa dependências: não declarar optimização integral de memória/paginação, carga ou implantação. Preservar8080/anteriores, seis registos/cache/provas/trabalho alheio; sem publicação, activação, concessões reais, aceitação/checkpoint. Visual/carga/instalação continuam separados. + +- Continuação de 03/11/2026: `SGF-REQUEST-HISTORY-CURSOR-QA-v1` entregue; ver `docs/SGF_REQUEST_HISTORY_DELIVERY.md`. Histórico detalhado além25, páginas25/100 por cursor Laravel cifrado/vinculado a requisição/pessoa/contexto/tamanho, validade600s e acesso revalidado. Sem contagem global ou carregamento do universo; preserva filtro próprio da etapa e formulário não gravado.36 verificações:20 API/guardas/preservação,10 DOM, seis demo.127 eventos originais percorridos uma vez após nova entrada no topo;128 ao actualizar.126 notas são fixtures de auditoria, não revisões de negócio. Harness herdou ordem100MZN anterior ao histórico, preservada; essa preparação foi removida para futuras execuções.17 provas válidas reutilizadas. Nova demo8080 sem requisições principais. Escritor/preview/confirm e `ProcessHistory` preservados; sem direitos novos. Preservar8079/anteriores, seis registos/cache/provas/trabalho alheio; sem publicação, activação, concessões reais, aceitação/checkpoint. Cursor de leitura não é aprovação/snapshot MVCC persistente; visual/carga/implantação continuam separados. + +- Continuação de 03/11/2026: `SGF-PURCHASING-USABLE-CONTINUITY-QA-v1` entregue; ver `docs/SGF_PURCHASING_USABLE_CONTINUITY.md`. Corrige ligação do formulário de recepção ao selector pesquisável e pesquisa inicial vazia nos catálogos de artigos/fornecedores; completa atalhos recepção/factura/obrigação conforme menu, sem nova autoridade. Históricos de requisição/propostas agora filtram eventos próprios na SQL antes de limite/paginação, sem devolver payloads de etapas posteriores ou apagar auditoria.55 verificações:17 DOM→HTTP real com recepção1UN/recuperação201→200 sem duplicação; oito fronteiras;12 de históricos com142 tabelas/sequências intactas; nove de interface e nove demo. Fixture adicional aberta1MZN só na regressão para selector. Nova demo8079 sem operações principais. Escritores/blocos preview/confirm preservados; sem direitos novos. Preservar8078/anteriores, seis registos/cache/provas/trabalho alheio; sem concessões reais, activação, publicação, aceitação/checkpoint. Não é prova de navegador, concorrência nova, visual, carga sustentada ou implantação. + +- Continuação de 03/11/2026: `SGF-PURCHASING-CONTEXTUAL-NAVIGATION-QA-v1` entregue; ver `docs/SGF_PURCHASING_CONTEXTUAL_NAVIGATION.md`. Dossiê abre origens exactas e continuações requisição/propostas/ordem preservam IDs. Sete interfaces usam parser comum estrito, apenas GET inicial, sem escolher primeiro registo ou trocar contexto; recepção/factura conferidas contra a ordem antes de apresentar o documento indicado.77 verificações; regressão reutiliza livro concluído sem repetir comandos,142 tabelas/sequências intactas. Demo8078 nova sem operações principais, mantendo anexos/percurso integrado. Sem direitos ou writers novos. Preservar8077/anteriores, seis registos/cache/provas/trabalho alheio; sem concessões reais, activação, publicação, aceitação ou checkpoint. DOM simulado não é revisão visual; carga sustentada/instalação/implantação continuam separadas. Atalho não aprova nem determina prontidão da próxima etapa. + +- Continuação de 03/11/2026: `SGF-RECEIPT-DOCUMENTS-QA-v1` entregue; ver `docs/SGF_RECEIPT_DOCUMENTS_DELIVERY.md`. Guias/qualidade/outros anexos no histórico de recepção e eventos no dossiê, pelo serviço/descarga nativos fixados. Prévia revertida, confirmação individual com fundamento/SHA/contexto/versão, páginas15, recuperação por chave e reutilização por recepção/tipo/SHA.58 verificações;16 documentos na regressão (um pela API e15 fixtures nativas), concorrência201/200, uma recepção/movimento1UN preservados. Demo8077 nova sem recepções/anexos/operações principais. Reutiliza `purchasing_receipts.view/confirm`, sem direitos novos. Não altera aceitação/qualidade/stock, nem cria efeitos financeiros. Preservar8076/anteriores, seis registos/cache/provas/trabalho alheio; sem concessões reais, activação, publicação, aceitação ou checkpoint. Resultado de commit incerto conserva ficheiro; órfãos/retencão/quotas/carga/visual/implantação pendentes. Testes do componente usam DOM simulado; não são revisão visual. + +- Continuação de03/11/2026: `SGF-SUPPLIER-DOCUMENTS-QA-v1` entregue; ver `docs/SGF_SUPPLIER_DOCUMENTS_DELIVERY.md`. Anexos binários privados pelo controlador nativo: prévia revertida/ficheiro temporário removido, confirmação com SHA/contexto/versão, documento e auditoria únicos por chave, descarga íntegra auditada e paginação15. Anexar põe fornecedor pendente; revisão distinta da versão actual restabelece elegibilidade nas propostas, comprovada sem proposta automática.52 verificações;16anexos na regressão (duas confirmações API/14fixtures nativas), demo8076 nova sem anexos/operações. Reutiliza direitos `purchasing_suppliers.view/prepare`, sem direitos novos. Resultado de commit incerto conserva ficheiro; reconciliação de órfãos/retencão não declarada entregue. Preservar8075/anteriores, seis registos/cache/provas/trabalho alheio; sem concessões/dados reais, activação, publicação, aceitação ou checkpoint. Visual/carga/armazenamento/implantação pendentes; formatos positivos ensaiados com PNG, regras PDF/JPEG nativas preservadas. + +- Continuação de03/11/2026: `SGF-RECEIPT-WORKSPACE-COMPLETION-QA-v1` entregue; ver `docs/SGF_RECEIPT_WORKSPACE_COMPLETION.md`. Catálogo de recepção por linha com pesquisa literal/páginas25/100, unidade/ligações conhecidas, escolha explícita e impressão de artigos conferida antes de nova confirmação; histórico navegável além25 com consulta própria.41 verificações;127artigos compatíveis,27recepções parciais/1UN na regressão (25como fixture pelo mesmo writer, duas pela API). Demo8075 integrada nova, sem operações principais; catálogo QA preparado, pedidos apenas nas linhas marcadas. Reutiliza direitos existentes e writer, sem nova valorização/conversões ou efeitos financeiros. Preservar8074/anteriores, seis registos/cache/provas/trabalho alheio; sem concessões reais, activação, publicação, aceitação ou checkpoint. Ramos completos de abastecimento/peças não reexecutados; visual/carga/implantação mantêm limites próprios. + +- Continuação de03/11/2026: `SGF-PURCHASING-DOSSIER-QA-v1` entregue; ver `docs/SGF_PURCHASING_DOSSIER_DELIVERY.md`. Dossiê GET da requisição até à obrigação, páginas25 independentes e histórico projectado apenas das etapas autorizadas; etapas restritas não expõem linhas/contagens. Direito de entrada `purchasing_requests.view` e direitos nativos/de cada etapa, sem direitos novos.49 verificações: leitura reutiliza percurso QA já provado, em aplicação/sessões novas, sem repetir comandos;142tabelas e sequências intactas. Demo8074 nova e vazia, com fornecedores/orçamento QA preparados;8073 e anteriores preservadas. Não confundir dossiê com fila universal, decisão de prontidão ou autorização da operação seguinte; impressão só das páginas visíveis e obrigação paginada por facturas de origem. Sem alteração de seis registos/cache/dados/acessos reais, activação, publicação, aceitação ou checkpoint. Visual/carga/implantação permanecem pendentes. + +- Continuação de03/11/2026: `SGF-SOURCING-SUPPLIER-SEARCH-QA-v1` entregue; ver `docs/SGF_SUPPLIER_SEARCH_DELIVERY.md`. Resolve a selecção limitada aos100primeiros fornecedores: pesquisa literal nome/NUIT, páginas SQL25/100, escolha individual e impressão do fornecedor conferida na prévia/confirmação de nova proposta.51 verificações; demo8073 conserva composição integrada, com127linhas artificiais adicionais de directório e125fornecedores admissíveis, zero operações principais iniciais. Reutiliza `purchasing_sourcing.prepare`, origem/isolamento e controlador original; não são novos cadastros reais ou revisões comerciais executadas. Recibos existentes recuperam decisão histórica, sem nova execução. Preservar8072/anteriores, seis registos/cache/provas/trabalho alheio; sem novos direitos públicos/reais, índices no destino, pagamentos/lançamentos, activação, publicação, aceitação ou checkpoint. Visual, carga sustentada e capacidade de implantação continuam separados. + +- Continuação de03/11/2026: `SGF-PURCHASING-INTEGRATED-QA-v1` entregue; ver `docs/SGF_PURCHASING_INTEGRATED_DELIVERY.md`. Demo8072 reúne requisição nova → propostas/avaliações → adjudicação distinta → ordem → recepção → factura conferida → obrigação explícita no mesmo livro nativo, com cadastro de fornecedores e referência geográfica no mesmo host.68 verificações, sem repetir suites anteriores; navegação comum filtrada pelos direitos existentes, sem nomes de direitos novos. Começa sem operações principais/reservas/compromissos: três fornecedores e orçamento QA1000MZN preparados,20.407territórios e zero localizações. Um consumo100MZN, um movimento e uma obrigação100MZN; orçamento host intacto. Retira a limitação de fixtures separadas apenas para este percurso de Compras; não declara os seis módulos reunidos nem pagamentos/contabilidade desta origem. Preservar8071/anteriores, seis registos/cache/trabalho alheio; sem concessões reais, activação no destino, publicação, aceitação ou checkpoint. Visual, carga sustentada e capacidade de implantação mantêm pendências próprias. + +- Continuação de03/11/2026: `SGF-INVOICE-TO-PAYABLE-QA-v1` entregue; ver `docs/SGF_INVOICE_TO_PAYABLE_DELIVERY.md`. Preparação individual e reconhecimento distinto das facturas conferidas pelo mesmo adaptador original/núcleo/livro nativo, sem espelho de dívida no host.72 verificações; demo8071 começa sem ordens principais/recepções/facturas/propostas/obrigações, com adjudicação QA preparada. Um principal100MZN, vencimento desconhecido, prévia reversível, versão/contexto/pessoa, repetição com revalidação da origem, concorrência e recuperação atómica. Direitos `purchasing_obligations.view/prepare/validate` só nas novas fixtures55439; configurações desligadas por omissão, histórico desactivado. Preservar8070/anteriores, seis registos/cache/trabalho alheio. Sem pagamentos, lançamentos, migração histórica, concessões reais, activação no destino, publicação, aceitação ou checkpoint. Instalação única de todas as fixtures anteriores, correcções/anexos, visual, carga sustentada e capacidade de implantação permanecem separadas. + +- Continuação de03/11/2026: `SGF-SUPPLIER-INVOICE-MATCHING-QA-v1` entregue; ver `docs/SGF_SUPPLIER_INVOICE_MATCHING_DELIVERY.md`. Ordem efectivamente emitida → recepção aceite → registo pendente → conferência/validação distinta, pelos controladores/workflow originais e consumo no mesmo núcleo orçamental.77 verificações, demo8070 sem ordem/recepção/factura/consumo iniciais no contexto principal; adjudicação QA preparada e ordem estrangeira negativa separada. Direitos `purchasing_invoices.view/prepare/validate` só nas novas fixtures. Duas parciais40+60 consomem100MZN uma vez; documento sobreposto70 permanece pendente e preservado. Sem obrigação automática, pagamentos, lançamentos, emissão fiscal, correcção/rejeição/notas de crédito ou anexos binários. Não tratar esta conferência SGF como ausente; a ligação destas facturas ao reconhecimento da obrigação mantém passo próprio. Preservar8069/anteriores, seis registos/cache/pacotes/trabalho alheio; sem novas concessões reais, activação no destino, publicação, aceitação ou checkpoint. Visual, carga sustentada e implantação continuam separados. + +- Continuação de03/11/2026: `SGF-GEOGRAPHY-SEGMENTATION-QA-v1` entregue; ver `docs/GEOGRAPHY_SEGMENTATION_DELIVERY.md`. Selector comum ligado a empresa/unidade/cliente/fornecedor, catálogo/cascata/pesquisa paginados, prévia/decisão explícita, histórico e segmentação com filtros/cursor.83 verificações e demo8069 sem localizações iniciais;16 provas da preparação reutilizadas. Só localização para segmentação: não altera endereços fiscais/de entrega, revisão financeira de fornecedores ou dependentes. Reutiliza direitos existentes, sem novos direitos públicos; schema e concessões só nas novas fixtures55439. Cliente conserva associação modular explícita e fornecedor exige origem/unidade/autoridade nativas actuais, também nos relatórios. Carga20.407 privada e versão preservada; pendências da fonte impedidas de selecção. Circuito de correcção/publicação de versões, países adicionais, migração de localizações, visual e implantação mantêm limites próprios. Preservar8068/anteriores, seis registos/cache/trabalho alheio; sem publicação, activação no destino, aceitação ou checkpoint. + +- Continuação de03/11/2026: `SGF-REQUEST-TO-RECEIPT-QA-v1` entregue,103 verificações e demo8068; ver `docs/SGF_REQUEST_TO_RECEIPT_DELIVERY.md`. Novas requisições na interface SGF usam o mesmo `RequisitionWorkflow`/ciclo/orçamento nativo que propostas, ordens e recepções: rascunho, submissão/reserva única, aprovação distinta e rejeição/libertação única. Identidades QA próprias de solicitante, departamento, Compras, Finanças e Armazém; direitos `purchasing_requests.view/prepare/submit/approve` só nas fixtures novas. Origem auditada empresa/unidade, sem redigitar IDs ou duplicar orçamento no host. Demo fixada ao pacote efectivamente testado; alterações simultâneas de Compras preservadas. Não tratar novas requisições como ausentes; conversão de antigos `ir_requests` com reserva no host permanece pendente de protocolo próprio, sem transferência implícita. Preservar demos anteriores/seis registos/cache/trabalho alheio. Sem activação no destino, concessões reais, publicação, aceitação ou checkpoint. + +- Referência fornecida em03/11/2026: `cartografia_moz.xlsx`, declarada pelo utilizador como validada pelo INE, preparada para segmentação comum de empresas/clientes/fornecedores; ver `docs/CARTOGRAPHY_REFERENCE_PREPARATION.md`.20.407 linhas, códigos de texto e versão SHA preservados,16 verificações; ambiguidades/designações ausentes/ascendência incompleta sinalizadas sem deduplicação ou associação automática. Original intacto, carga preparada privada, nenhuma ligação a bases ou localização atribuída. Não confundir preparação com catálogo/selector/formulários montados ou vigência independentemente verificada. Próxima integração usa catálogo comum, selecção explícita por versão/ID, precisão conhecida e histórico por entidade/contexto; preservar seis registos/cache/acessos. + +- Continuação de03/11/2026: `SGF-SOURCING-TO-RECEIPT-QA-v1` entregue; ver `docs/SGF_SOURCING_TO_RECEIPT_DELIVERY.md`. Interface SGF para propostas/descontos, avaliações individuais, comparação, escolha fundamentada e decisão distinta, ligada à ordem e recepção efectivas pelos controladores/serviços originais. Nova demo8066 parte de requisição nativa aprovada e fornecedores QA preparados, sem propostas/avaliações/adjudicação/ordem/recepção iniciais; preservar8064/8065. Direitos `purchasing_sourcing.view/prepare/evaluate/select/approve` somente nas novas fixtures. Prévia usa savepoint com rollback integral (sequências podem avançar); confirmação tem recibo append-only na mesma transacção. O manifesto fica fixado e a integridade de cada dependência é verificada antes do carregamento. Não tratar estas interfaces como ausentes; passagem de requisições internas SGF sem orçamento duplicado, cadastro/revisão de fornecedores SGF e regimes/revisões posteriores mantêm fronteiras próprias. Seis registos/cache/trabalho alheio preservados; sem concessões reais, publicação, activação no destino, aceitação ou checkpoint. + +- Continuação de03/11/2026: `SGF-ORDER-TO-RECEIPT-QA-v1` entregue, ver `docs/SGF_ORDER_TO_RECEIPT_DELIVERY.md`. Adjudicação aprovada pelo serviço original → conferência SGF → emissão/compromisso100MZN únicos → recepção por Armazém → movimento1UN → histórico. Reutiliza `PurchaseWorkflow`, bibliotecas económicas originais fixadas e o mesmo workflow/writer de recepção. Nova demo8065 com emissão/recepção por decidir; preservar8064/anteriores. Direitos `purchasing_orders.view/issue` só nas fixtures novas, sem catálogo/concessões públicos. Não voltar a tratar emissão de ordens SGF como ausente; propostas/adjudicação na interface SGF e passagem de requisições SGF para essa origem mantêm lacunas próprias. Sem orçamento duplicado no host, pagamentos/contabilidade, instalação/activação no destino, publicação, aceitação ou checkpoint; preservar seis registos, cache e trabalho alheio. + +- Continuação expressa de03/11/2026, «então faça isso e saia do loop»: recepção funcional SGF implementada em `SGF-RECEIPT-WORKFLOW-QA-v1`, ver `docs/SGF_RECEIPT_WORKFLOW_DELIVERY.md`. Ordem → conferência/prévia → confirmação pelo workflow original → writer físico único → histórico; proveniência SGF atómica, repetição/concorrência/recuperação. Nova demonstração8064 sem recepções/movimentos iniciais, com perfis sintéticos próprios; duas bases novas55439 e direitos `purchasing_receipts.view/confirm` somente nas fixtures, sem catálogo/grants públicos. Não tratar a interface de recepção SGF como ainda ausente; instalação geral de procurement, pesquisa completa de catálogo, criação/emissão de ordens SGF, revisão visual e implantação conservam pendências próprias. Preservar demos, seis registos, cache e trabalho alheio. Sem activação no destino, publicação, aceitação ou checkpoint presumidos. + +- Orientação prática posterior de03/11/2026: concluir funcionalidades dos módulos em entregas funcionais antes de ampliar ligações, definir os contratos durante a construção e reutilizar provas válidas. Após integração, testar as fronteiras alteradas/percurso completo; não repetir suites ou abrir novos ensaios de optimização sem necessidade que substituam a conclusão funcional. + +- Autorização expressa de03/11/2026: «Autorizar o ciclo sintético proposto», `COMMON-LEDGER-STOCK-VALUATION-SIM-v1`, conforme `docs/GENERAL_LEDGER_STOCK_VALUATION_SCOPE.md`: entrada2UN/100MZN, saída1UN/50, devolução0,5UN/25, saldo1,5UN/75, pelos workflows físicos efectivos e mesmo diário/relatórios/fecho QA. Taxa50/UN validada distintamente, origens exclusivas, revisão individual, idempotência, concorrência/recuperação; direitos existentes só em bases QA novas55439. Retira apenas a exclusão desta valorização sintética seleccionada; sem duplicar custos directos/industriais, alterar demonstrações/seis registos/cache, correcção de valor lançado, reabertura, operações/acessos reais, instalação no destino, activação de Compras, publicação, aceitação ou checkpoint. + +- Continua??o de03/11/2026: `SGF-SUPPLIER-REGISTRY-QA-v1` entregue; ver `docs/SGF_SUPPLIER_REGISTRY_DELIVERY.md`. Cadastro/altera??o e revis?o distinta, activa??o/suspens?o, filtros/pagina??o15, hist?rico e liga??o ?s propostas pelos controladores/valida??o/pol?tica originais. Nova demo8067 e64 verifica??es;8064/8065/8066 preservadas. Direitos `purchasing_suppliers.view/prepare/review` apenas nas novas fixtures; cadastro novo vis?vel por origem auditada empresa/unidade e admissibilidade tamb?m na API de propostas. N?o tratar cadastro/revis?o como ausente neste recorte QA. Anexos, selector integral al?m100, passagem de requisi??es internas com autoridade or?amental ?nica, regimes/correc??es posteriores e implanta??o mant?m pend?ncias. Seis registos/cache/trabalho alheio preservados; sem concess?es reais, activa??o no destino, publica??o, aceita??o ou checkpoint. + +- Autorização expressa de03/11/2026: «Autorizar a correcção industrial sintética proposta», `COMMON-LEDGER-INDUSTRIAL-CORRECTION-SIM-v1`, `docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_SCOPE.md`. Workflows efectivos: taxa material50→51 para20KG, resultado1800→1820/10UN; trabalho500/CIF300 e residual300 separado. Mesmo writer, par atómico estorno1800/substituição1820, revisão distinta, relatórios/fecho QA, direitos existentes apenas em bases novas55439. Retira apenas a exclusão desta correcção industrial em período aberto; preservar8058/demos/seis registos/cache e trabalho alheio. Sem cadeias adicionais, stock/salários reais, correcção em período fechado, reabertura, instalação no destino, activação de Compras, publicação, aceitação ou checkpoint. + +- Autorização expressa de03/11/2026: «Autorizar o ciclo industrial sintético proposto», `COMMON-LEDGER-INDUSTRIAL-SIM-v1`, `docs/GENERAL_LEDGER_INDUSTRIAL_SCOPE.md`. Resultado efectivo1000+500+CIF300=1800,10UN/180, residual300 separado, mesmo writer/relatórios/fecho QA e revisão distinta. Bases/roles novas55439 e direitos existentes só QA. Retira apenas a exclusão de desenvolver/provar este lote/CIF seleccionado; preservar demos, seis registos, cache e trabalho alheio. Sem stock valorizado, folha salarial/operações reais, correcção industrial, reabertura, instalação no destino, activação de Compras, publicação, aceitação ou checkpoint. + +- Autorização expressa posterior de03/11/2026: «Autorizar a correcção sintética proposta» para `COMMON-LEDGER-DIRECT-COST-CORRECTION-SIM-v1`, `docs/GENERAL_LEDGER_DIRECT_COST_CORRECTION_SCOPE.md`: custo original275, taxa material sucessora60/UN e cálculo295 validados pelos workflows, par atómico estorno275/substituição295, revisão distinta, relatórios e fecho QA. Direitos correct_* existentes só em fixtures novas55439; preservar8054, seis registos/cache/demos e trabalho alheio. Retira a exclusão de desenvolver/provar esta correcção em período aberto, sem reabertura, stock/salários, operações/acessos reais, instalação no destino, activação de Compras, publicação, aceitação ou checkpoint. + +- Autorização expressa posterior de03/11/2026: «Autorizar o ciclo sintético proposto» para `COMMON-LEDGER-DIRECT-COST-SIM-v1`, conforme `docs/GENERAL_LEDGER_DIRECT_COST_SCOPE.md`: workflow efectivo de oficina/custo directo100+175=275MZN, D QA-CUSTO-DIRECTO / C QA-COMPENSACAO-ENSAIO, revisão distinta, mesmo writer, relatórios e conferência do período; bases/roles/direitos só QA novos55439. Retira a exclusão de desenvolver/provar apenas este custo seleccionado no diário sintético. Preservar origens/outbox, seis registos, cache, demos e trabalho alheio. Sem valorização/lançamentos de stock, salários/CIF, correcção de custo já lançado, operações/acessos reais, reabertura, instalação no destino, activação de Compras, publicação, aceitação ou checkpoint presumidos. + +- Autorização expressa posterior: «Autorizar o ciclo sintético proposto» para `COMMON-LEDGER-SALES-RECEIVABLE-SIM-v1`, `docs/GENERAL_LEDGER_SALES_RECEIVABLE_SCOPE.md`: factura de teste862,07+137,93=1000MZN pelo workflow existente, contabilização em três linhas no mesmo writer, recebimentos/afectações400/600, reversão400 e conferência do período. Bases/roles novas no cluster55439, guarda QA específica sem retirar bloqueios reais; direitos só QA. Preservar ciclos de fornecedores, seis registos, cache, demos e alterações alheias. Sem fiscalidade/contas/direitos/operações reais, reabertura, stock/custos/salários contabilizados, migração no destino, activação de Compras, publicação, aceitação ou checkpoint presumidos. + +- Autorização expressa posterior, 02/11/2026: «Autorizar o ciclo sintético proposto» para `COMMON-LEDGER-COMPLETE-CYCLE-SIM-v1`, conforme `docs/GENERAL_LEDGER_COMPLETE_SYNTHETIC_SCOPE.md`: liquidação QA20 sobre principal60, contabilização da afectação e reversão confirmadas, correcção técnica por par imutável, fecho QA e adaptador autónomo SGC sobre núcleo único. Inclui os direitos propostos apenas em fixtures novas no cluster55439. Substitui as exclusões anteriores apenas para este desenvolvimento/provas sintéticos; reabertura, operações/contas/direitos reais, migração no destino, activação de Compras, publicação, aceitação e checkpoint continuam excluídos. Preservar seis registos, cache, demos e trabalho alheio. + +- Autorização expressa posterior, 02/11/2026: implementar `COMMON-LEDGER-PAYABLE-SIM-v1`, conforme `docs/GENERAL_LEDGER_FIRST_SYNTHETIC_SCOPE.md`. Um núcleo único, obrigação reconhecida 60 MZN, duas contas e período artificiais, preparação/revisão distintas, aplicação única/atómica e quatro direitos exclusivamente em fixture QA nova no cluster 55439. Substitui apenas a exclusão de desenvolver este primeiro lançamento sintético; não autoriza lançamentos/contas/direitos reais, migração no destino, fecho/reabertura, novos efeitos de pagamentos, activação de Compras, publicação, aceitação ou checkpoint. Preservar seis registos, cache bloqueada, demos e alterações alheias. Ver `docs/GENERAL_LEDGER_DELIVERY.md` para implementação e provas; revisão visual e implantação separadas. + - Continuação «prossiga», 29/10/2026, projecto Compras: desenvolvimento sintético de `PAYABLE-IMPORTED-DECISION-v1`, confirmação/rejeição de pagamentos originalmente pendentes após importação. Reutilizar conferência original e núcleo comum, transacção única, fotografia importada imutável, decisão append-only e abatimento único. Ver `C:/laragon/www/compras/docs/conferencia-pendentes-importados.md`. Substitui a exclusão de desenvolver esta conferência apenas neste incremento; preservar configurações/dados/demos existentes. Migração 000023 e activação não aplicadas por consequência do desenvolvimento. Sem novos pagamentos, transferências, contabilidade ou publicação; SGF continua sem adaptador histórico. - Aplicação local posterior autorizada por «continue», 29/10/2026: 000022 aplicada em `compras_dev`, lote 23, e importação histórica activada, após backup/restauro de 72 tabelas e preservação verificada. Duas tabelas novas vazias, dois triggers, activação auditada sem contas/concessões novas ou incorporação automática. Ver `C:/laragon/www/compras/docs/passagem-historico-pagamentos.md`. Demos (incluindo 8005) e público preservados; SGF continua sem fornecedor histórico configurado. Este registo substitui apenas a pendência de aplicação local abaixo; não autoriza novos pagamentos/confirmação de pendentes ou publicação. diff --git a/README.md b/README.md index 28fbfef..802629e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,33 @@ # SGF TEMPO +**Compras — entrada única actual:** **http://127.0.0.1:8085/compras**. [Guia de utilização](docs/COMPRAS_USO_LOCAL.md) · [percurso concluído e prova](docs/PURCHASING_COMPLETION.md). A instalação existente reúne fornecedores, requisições, propostas/adjudicação, ordens, recepções, facturas e reconhecimento de obrigações. Há um exemplo completo conservado, com principal100MZN e movimento1UN. Funções sintéticas explícitas; nenhuma instalação empresarial ou operação real foi activada. Para reutilizar a aplicação local: `scripts/abrir-compras.ps1`. As referências de demonstrações abaixo são históricas. + +[Comprovativos de fornecedor integrados na consulta contabilística](docs/FINANCIAL_RECEIPT_RECOVERY_DELIVERY.md): domínio explícito de reconhecimento ou liquidação, direitos próprios, sem reexecutar operações.43 verificações dirigidas em base QA nova; nenhum pagamento criado. Revisão visual, carga e implantação pendentes. + +[Recuperação de comprovativos contabilísticos](docs/GENERAL_LEDGER_RECEIPT_RECOVERY_DELIVERY.md): consulta por chave, apenas do autor no contexto actual, sem executar operações. Integrada nas páginas de origens e diário;29 verificações dirigidas em base QA nova. Revisão visual e implantação permanecem pendentes. + +[Correcção industrial1800→1820 implementada em QA](docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md): nova demo **http://127.0.0.1:8059/qa/cost-demo**, par atómico revisto distintamente, residual300 separado, diário/razão/fecho. Conjunto11 lançamentos/23 linhas, bruto8725 por lado. Demos anteriores intactas; sem reabertura, stock/salários ou implantação presumida. + +[Relatório financeiro: captura histórica validada reutilizada](docs/SGF_PAYABLE_REPORT_CAPTURE_DELIVERY.md). Ensaio em cópia QA:22,0→12,9s para10.000 posições, consultas2313 e heap34MiB iguais; totais/hash preservados. Validação do recibo e histórico original mantida, comandos usam fontes actuais. O gargalo persiste; sem capacidade de implantação validada. + +[Lote industrial1800 → Contabilidade implementado em QA](docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md): demo nova **http://127.0.0.1:8058/qa/cost-demo**, workflows efectivos, residual300 separado e mesmo diário/razão/fecho. Conjunto com vendas, fornecedor e custo directo:9 lançamentos/19 linhas, bruto5105 por lado. Demos anteriores intactas; sem stock valorizado, salários ou uso real. Revisão visual, carga e implantação pendentes. + +[Vendas, fornecedores e custos no mesmo diário QA](docs/GENERAL_LEDGER_COMPOSITION_DELIVERY.md): demonstração nova **http://127.0.0.1:8057/qa/cost-demo**, painel de origens com paginação independente e fecho conjunto. Regressão:8 lançamentos/17 linhas, bruto3305 por lado, cliente400/custo295/fornecedor60. Reutiliza os efeitos autorizados; demos anteriores e decisões iniciais preservadas. Revisão visual, carga sustentada e implantação continuam pendentes. + +[Correcção de custo275→295 implementada em QA](docs/GENERAL_LEDGER_DIRECT_COST_CORRECTION_DELIVERY.md): demonstração própria **http://127.0.0.1:8055/qa/cost-demo**, estorno275/substituição295 numa transacção, revisão distinta, diário/balancete/razão e fecho. Original preservado; tipos de custo/fornecedor separados e SQL contra partes órfãs. A8054 mantém o recorte anterior; revisão visual e implantação separadas. + +[Oficina → custo directo → Contabilidade implementado em QA](docs/GENERAL_LEDGER_DIRECT_COST_DELIVERY.md): demonstração nova **http://127.0.0.1:8054/qa/cost-demo**, custo seleccionado100+175=275, revisão distinta, um lançamento, relatórios e fecho. Mesmos workflows/writer; sem duplicar origens, processar outbox ou valorizar stock. Correcção de custo já lançado, revisão visual e implantação continuam separadas. + +[Balancete e razão por conta integrados](docs/GENERAL_LEDGER_REPORTS_DELIVERY.md): núcleo único em SGF/SGC, abertura/movimentos/fecho por datas, páginas25/100, saldo acumulado entre páginas e evidência da origem. Só consulta com direitos existentes; três consultas de relatório por página do balancete. Provas dirigidas e pacote QA novo, preservando o anterior; revisão visual e implantação separadas. + +[Comercial → Recebíveis → Contabilidade implementado em QA](docs/GENERAL_LEDGER_SALES_RECEIVABLE_DELIVERY.md): nova demonstração **http://127.0.0.1:8053/qa/sales-demo**, factura de teste1.000 → recebimentos/afectações400+600 → reversão400 → extracto e fecho QA. Mesmo writer, três linhas no reconhecimento, revisão distinta e concorrência comprovada. Mantém demos anteriores, revisão visual e capacidade de implantação separadas; não activa operações reais. + +[Distribuição financeira autónoma verificada](docs/COMMON_FINANCE_BUNDLE_DELIVERY.md): artefacto com hashes fixados, recusa de alterações antes do arranque e nova demonstração SGC **http://127.0.0.1:8052/qa/ledger-demo**. Os núcleos financeiros são carregados do pacote local, sem fonte SGF de runtime ou activação do destino. + +[Ciclo contabilístico sintético completo autorizado](docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md): demonstrações novas **SGF8050 / SGC8051**, reconhecimento60 → afectação20/saldo40 → contabilização → reversão/saldo60 → par correctivo → fecho QA. Um núcleo, revisão distinta, recuperação e concorrência comprovadas; sem uso real, reabertura ou activação de Compras. + +[Percurso integrado de conferência financeira até ao lançamento](docs/SGF_FINANCIAL_LEDGER_FLOW_DELIVERY.md): demonstração própria em **http://127.0.0.1:8049/qa/ledger-demo**, começando sem obrigação reconhecida. Preparação, reconhecimento independente, proposta/revisão contabilística, aplicação única, extracto e posição ligados pela mesma origem. Código funcional sintético; compra viva, correcções/fecho contabilísticos, revisão visual e implantação continuam separados. + [Ciclo de material Oficina–Stock](docs/WORKSHOP_MATERIAL_CYCLE.md): repartição de entregas entre consumos, devolução independente do excedente não consumido e histórico paginado. Ensaio sintético; sem instalação operacional ou compensação de material consumido. [Oficina → entrega já abatida](docs/WORKSHOP_DELIVERY_LINK.md): ligação individual de consumo verificado a uma saída existente, com impacto físico zero e confirmação independente. Apenas correspondência integral sintética; repartições e compensações pendentes. @@ -160,6 +188,8 @@ Continuação Oficina → Stock: [retirada e recusa de propostas sem efeito fís Continuação Compras → Financeiro: [recibo histórico no adaptador SGF](docs/SGF_PAYABLE_HISTORY_RECEIPT_DELIVERY.md), com 10 cenários/56 asserções e 17 verificações HTTP. Apenas ensaio por fotografia reconciliada; sem fonte viva, cutover operacional, decisão de pendentes ou activação real. +Consulta financeira SGF: [paginação, leitura conjunta, testes e medições antes/depois](docs/SGF_PAYABLE_PAGED_READ_DELIVERY.md). Em 10.000 documentos sintéticos, 250.028 consultas integrais passaram a 67 por página de 25/100, com posições equivalentes. Sem índices no destino ou validação de capacidade de implantação. + O menu **Classificação contabilística**, disponível após actualizar a sessão com os acessos especificamente concedidos, permite preparar e submeter versões PGC-NIRF, validar/recusar sem editar e consultar classificação por data. Categoria e excepções são empresariais; operações e respectivos históricos continuam limitados às unidades autorizadas. As tabelas reais começam vazias, sem contas de movimento ou regras aprovadas por omissão. Consultar [utilização, provas e limites da classificação](docs/CATALOGUE_ACCOUNTING_DELIVERY.md). ## Ensaio isolado de custo directo @@ -172,3 +202,17 @@ Página inicial e menus agrupados: [alterações, verificações e limites visua O ensaio de orçamento versus realizado está descrito em [INDUSTRIAL_BUDGET_DELIVERY.md](docs/INDUSTRIAL_BUDGET_DELIVERY.md), com percurso, estado das provas e propostas separadas. Continua limitado a `sgf_tempo_test`; a instalação normal e os acessos novos não são aplicados por arrasto. O percurso `WORKSHOP-DIRECT-COST-SIM-v1` e as instruções de prova estão em [WORKSHOP_DIRECT_COST_DELIVERY.md](docs/WORKSHOP_DIRECT_COST_DELIVERY.md). Reutiliza apontamentos verificados sem duplicar consumos; não activa custeio real. Migração `090000` e quatro concessões continuam propostas, não aplicadas. + +Continuação financeira nativa: [consulta paginada SGC com origem viva em QA](docs/NATIVE_PAYABLE_PAGED_READ_DELIVERY.md). Leitura conjunta reutiliza o núcleo comum, preserva factura/contexto e mantém comandos actuais. Pacote instalado e activação permanecem separados; revisão visual e capacidade de implantação pendentes. + +Continuação financeira: [origem, obrigação e selecção para pagamentos ligadas](docs/SGF_PAYABLE_EVIDENCE_FOCUS_DELIVERY.md). Conferência directa da origem, evidência exacta do reconhecimento e navegação das obrigações além da primeira página. Testes dirigidos e fingerprint anterior preservado; sem pagamentos, concessões ou activação operacional. + +Histórico financeiro SGF: [pagamentos, afectações e eventos paginados](docs/SGF_SETTLEMENT_PAGED_READ_DELIVERY.md). Quatro janelas independentes, leitura conjunta e montantes por afectar calculados sobre o histórico integral. Em 1.000 pagamentos sintéticos: 3.038 consultas integrais passaram a 35 na leitura do livro com janelas de 25/100; sem índices novos ou capacidade de implantação presumida. + +Consulta financeira SGF: [leitura coerente sem bloqueios de escrita da empresa](docs/SGF_SETTLEMENT_READ_ISOLATION_DELIVERY.md). O leitor paginado terminou durante o bloqueio do escritor; a confirmação continuou a aguardar e a revalidar, sem duplicação. Provas e dados anteriores preservados; sem activação operacional ou validação de implantação. + +[Relatório reconciliado de obrigações SGF](docs/SGF_PAYABLE_REPORT_DELIVERY.md): posição completa do filtro, saldos indeterminados separados e evidência por conteúdo. Em 10.000 posições, a leitura específica reduziu 6.607 para 2.313 consultas; o tempo de 12,6 s continua uma limitação, sem capacidade de implantação declarada. [Primeiro lançamento contabilístico sintético proposto](docs/GENERAL_LEDGER_FIRST_SYNTHETIC_SCOPE.md), apenas especificação para autorização. + +[Primeiro lançamento contabilístico sintético](docs/GENERAL_LEDGER_DELIVERY.md): obrigação reconhecida de 60 MZN → proposta → revisão distinta → lançamento único em duas contas artificiais. Código, interface, extracto, 74 asserções e 23 verificações HTTP; duas aplicações concorrentes recuperam o mesmo lançamento. Configuração real continua desligada, sem publicação ou checkpoint. Revisão visual e implantação separadas. + +Demonstração contabilística isolada para a equipa: http://127.0.0.1:8048/qa/ledger-demo — outra fixture, ainda sem proposta/lançamento, com três funções e cookie próprios. A regressão conserva separadamente o único lançamento comprovado. Ver docs/GENERAL_LEDGER_DELIVERY.md; não equivale a aceitação ou revisão visual. diff --git a/app/Modules/Accounting/CostLedgerController.php b/app/Modules/Accounting/CostLedgerController.php new file mode 100644 index 0000000..f8c574f --- /dev/null +++ b/app/Modules/Accounting/CostLedgerController.php @@ -0,0 +1,13 @@ +validate(['order_id'=>'sometimes|required|integer|min:1','page'=>'sometimes|integer|min:1|max:100000']);abort_if(array_diff(array_keys($r->query()),array_keys($d))!==[],422); + try{$data=$ledger->costs($r->user(),isset($d['order_id'])?(int)$d['order_id']:null,(int)($d['page']??1));}catch(\DomainException $e){abort(403,$e->getMessage());}catch(\InvalidArgumentException $e){abort(422,$e->getMessage());} + return $r->is('api/*')?response()->json($data)->header('Cache-Control','no-store'):response()->view('accounting.cost-ledger',['data'=>$data])->header('Cache-Control','no-store'); + } +} diff --git a/app/Modules/Accounting/CostLedgerSource.php b/app/Modules/Accounting/CostLedgerSource.php new file mode 100644 index 0000000..9dc752a --- /dev/null +++ b/app/Modules/Accounting/CostLedgerSource.php @@ -0,0 +1,68 @@ +id()===$u->id&&$ctx->userId()===$u->id&&$ctx->unitId(),403);$s=$ctx->identifiers()+['unit_id'=>$ctx->unitId()]; + foreach(['workshop.view','direct_costs.view'] as $p)app(Permissions::class)->require($u->id,$s['tenant_id'],$s['company_id'],$p,$s['unit_id']); + foreach(['gl_cost_sources','wo_orders','wo_entries','wo_decisions','dc_rates','dc_calculations','dc_decisions'] as $t)abort_unless(DB::getSchemaBuilder()->hasTable($t),503,'Origem de custo não composta neste ensaio.');return $s; + } + private function hash(array $v):string{return hash('sha256',Payables::canonical($v));} + private function facts(User $u,array $s,object $map):array + { + $c=app(DirectCosts::class)->conference($map->order_id,$u->id);$lines=$c['snapshot']['lines']??[];$entries=array_column($lines,'entry_id');$rates=array_values(array_filter(array_column($lines,'rate_id'),fn($id)=>$id!==null)); + return ['mapping'=>(array)$map,'conference'=>$c,'entries'=>DB::table('wo_entries')->where('order_id',$map->order_id)->whereIn('id',$entries)->orderBy('id')->get()->map(fn($r)=>(array)$r)->all(),'technical_decisions'=>DB::table('wo_decisions')->whereIn('entry_id',$entries)->orderBy('id')->get()->map(fn($r)=>(array)$r)->all(),'rates'=>DB::table('dc_rates')->where($s)->where('order_id',$map->order_id)->whereIn('id',$rates)->orderBy('id')->get()->map(fn($r)=>(array)$r)->all(),'rate_decisions'=>DB::table('dc_decisions')->whereIn('rate_id',$rates)->orderBy('id')->get()->map(fn($r)=>(array)$r)->all()]; + } + private function eligible(array $facts):array + { + $m=$facts['mapping'];$c=$facts['conference'];$snap=$c['snapshot'];$decision=$c['decision']; + if(!$c['calculation']||!$c['current']||!$decision||$decision['decision']!=='approved'||$decision['actor_id']===$c['calculation']['actor_id']||$snap['currency']!=='MZN'||$snap['incomplete']||$snap['selected_direct_total_exact']===null)throw new \DomainException('Cálculo actual completo e validado distintamente obrigatório; custo conhecido parcial não é total.'); + $origins=[];foreach($snap['lines'] as $line)$origins[$line['kind']]=$line['origin']; + if($origins!==['time'=>$m['time_origin'],'material'=>$m['material_origin']]&&$origins!==['material'=>$m['material_origin'],'time'=>$m['time_origin']])throw new \DomainException('Perímetro seleccionado mudou; não atribuir outra origem automaticamente.'); + if(config('industrial_ledger.synthetic_enabled')===true){abort_unless(DB::getSchemaBuilder()->hasTable('gl_industrial_sources'),503);if(DB::table('ic_inputs as i')->join('gl_industrial_sources as m','m.lot_id','=','i.lot_id')->where('i.tenant_id',$m['tenant_id'])->where('i.company_id',$m['company_id'])->whereIn('i.source_ref',array_values($origins))->exists())throw new \DomainException('Origem já composta em lote industrial; não reconhecer novamente.');} + try{$amount=BigRational::of($snap['selected_direct_total_exact'])->multipliedBy(100)->toBigInteger()->toInt();}catch(\Brick\Math\Exception\MathException $e){throw new \DomainException('Custo exacto não representável em cêntimos; não arredondar.',0,$e);} + if($amount<=0)throw new \DomainException('Este ensaio exige custo seleccionado positivo.'); + return ['effect_type'=>'workshop.direct_cost.validated','source_id'=>$m['order_id'],'cost_order_id'=>$m['order_id'],'obligation_id'=>$m['order_id'],'origin_key'=>$this->hash(['scope'=>array_intersect_key($m,array_flip(['tenant_id','company_id','unit_id'])),'order'=>$m['order_id'],'material_origin'=>$m['material_origin'],'time_origin'=>$m['time_origin']]),'recognition_revision'=>$this->hash($facts),'principal_minor'=>$amount,'currency'=>'MZN','tax_minor'=>0,'compatible'=>true,'history_imported'=>false,'permitted_period_key'=>$m['period_key'],'calculation_id'=>$c['calculation']['id'],'calculation_version'=>$c['calculation']['version'],'document_revision'=>$c['calculation']['fingerprint'],'cost_evidence'=>$facts,'label'=>'Custo directo conhecido do perímetro seleccionado; não custo completo, margem ou valorização de inventário']; + } + public function source(User $u,int $order):array + { + $s=$this->scope($u);$m=DB::table('gl_cost_sources')->where($s)->where('order_id',$order)->first()??throw new \DomainException('Ordem/perímetro de custo não composto neste âmbito.');return $this->eligible($this->facts($u,$s,$m)); + } + public function period(User $u,array $period):array + { + $s=$this->scope($u);$h=hash_init('sha256');$facts=0;$pending=0; + foreach(DB::table('gl_cost_sources')->where($s)->where('period_key',$period['period_key'])->orderBy('id')->cursor() as $m){$v=$this->facts($u,$s,$m);hash_update($h,Payables::canonical($v));$facts++;try{$source=$this->eligible($v);$j=DB::table('gl_journals')->where($s)->where('snapshot->source->effect_type','workshop.direct_cost.validated')->where('snapshot->source->cost_order_id',$m->order_id)->first();if(!$j||!$this->resolved($s,$j,$source))$pending++;}catch(\DomainException){$pending++;}} + return ['facts'=>$facts,'pending'=>$pending,'hash'=>hash_final($h)]; + } + public function correctionSource(User $u,string $kind,int $journal):array + { + abort_unless(config('cost_ledger.correction_enabled')===true,403,'Correcção de custo não composta neste ensaio.');$s=$this->scope($u);abort_unless(DB::getSchemaBuilder()->hasTable('gl_cost_correction_capability'),503,'Schema de correcção de custo não instalado.'); + if(!in_array($kind,['workshop.direct_cost.reversal','workshop.direct_cost.replacement'],true))throw new \DomainException('Tipo de correcção fora do recorte.');$j=DB::table('gl_journals')->where($s)->where('id',$journal)->first()??throw new \DomainException('Original fora do âmbito.');$original=json_decode($j->snapshot,true,128,JSON_THROW_ON_ERROR);if($original['source']['effect_type']!=='workshop.direct_cost.validated')throw new \DomainException('Só o custo original admite esta correcção.'); + $base=$this->source($u,(int)$original['source']['cost_order_id']);if($base['origin_key']!==$original['source']['origin_key']||$base['permitted_period_key']!==$original['period']['period_key'])throw new \DomainException('Perímetro/período original incompatível.');if($base['recognition_revision']===$original['source']['recognition_revision'])throw new \DomainException('Não há nova versão validada para substituir o original.'); + return array_replace($base,['effect_type'=>$kind,'source_id'=>$journal,'amount_minor'=>$kind==='workshop.direct_cost.reversal'?(int)$j->debit_minor:$base['principal_minor'],'replacement_source_revision'=>$base['recognition_revision'],'recognition_revision'=>$this->hash(['current_source'=>$base,'original'=>(array)$j,'kind'=>$kind]),'original_journal_id'=>$journal,'original_journal_on'=>$j->journal_on,'original_journal_sha256'=>$this->hash((array)$j),'original_cost_source'=>$original['source']]); + } + private function resolved(array $s,object $original,array $source):bool + { + if(json_decode($original->snapshot,true)['source']['recognition_revision']===$source['recognition_revision'])return true; + if(config('cost_ledger.correction_enabled')!==true||!DB::getSchemaBuilder()->hasTable('gl_cost_correction_capability'))return false; + $r=DB::table('gl_correction_results')->where($s)->where('original_journal_id',$original->id)->first();if(!$r)return false;$j=DB::table('gl_journals')->where($s)->where('id',$r->replacement_journal_id)->first();if(!$j)return false;$current=json_decode($j->snapshot,true)['source'];return $current['effect_type']==='workshop.direct_cost.replacement'&&($current['cost_order_id']??null)===$source['cost_order_id']&&($current['replacement_source_revision']??null)===$source['recognition_revision']; + } + public function workspace(User $u,?int $order,int $page):array + { + $s=$this->scope($u);$q=DB::table('gl_cost_sources')->where($s);$p=$q->orderBy('id')->paginate(25,['*'],'page',$page);$chosen=null;$source=null;$pending=null; + if($order!==null){$m=DB::table('gl_cost_sources')->where($s)->where('order_id',$order)->first()??abort(403,'Ordem fora do âmbito composto.');$chosen=$this->facts($u,$s,$m);try{$source=$this->eligible($chosen);}catch(\DomainException $e){$pending=$e->getMessage();}} + $original=$order!==null?DB::table('gl_journals')->where($s)->where('snapshot->source->effect_type','workshop.direct_cost.validated')->where('snapshot->source->cost_order_id',$order)->first():null;$state=$original?($source&&$this->resolved($s,$original,$source)?'current':'requires_correction'):'unposted'; + return ['scope'=>$s,'orders'=>$p->items(),'pagination'=>['page'=>$page,'total'=>$p->total(),'last_page'=>$p->lastPage()],'order_id'=>$order,'facts'=>$chosen,'source'=>$source,'pending'=>$pending,'original_journal'=>$original,'accounting_state'=>$state]; + } +} diff --git a/app/Modules/Accounting/GeneralLedger.php b/app/Modules/Accounting/GeneralLedger.php new file mode 100644 index 0000000..533e890 --- /dev/null +++ b/app/Modules/Accounting/GeneralLedger.php @@ -0,0 +1,143 @@ +environment('payable-testing')||(app()->environment(['testing','browser-testing'])&&(config('sales_ledger.synthetic_enabled')===true||config('cost_ledger.synthetic_enabled')===true||config('industrial_ledger.synthetic_enabled')===true)))&&config('general_ledger.synthetic_enabled')===true,403,'Lançamentos apenas na composição sintética explicitamente preparada.'); + LedgerSchema::assertSynthetic(DB::connection()); + foreach(LedgerSchema::TABLES as $table)abort_unless(DB::getSchemaBuilder()->hasTable($table),503,'Núcleo contabilístico não instalado neste ensaio.'); + } + private function scope(User $user):array + { + self::guard();$context=app(CompanyContext::class); + abort_unless(auth()->id()===$user->id&&$context->userId()===$user->id&&$context->unitId(),403); + if(request()->hasSession())abort_unless(request()->session()->get('company_context.module_id')==='accounting',409,'Seleccione Contabilidade.'); + else abort_unless(app()->runningInConsole(),403); + $scope=$context->identifiers()+['unit_id'=>$context->unitId()]; + app(Permissions::class)->require($user->id,$scope['tenant_id'],$scope['company_id'],'general_ledger.view',$scope['unit_id']);return $scope; + } + public function can(User $user,string $action):bool + { + $scope=$this->scope($user);return app(Permissions::class)->has($user->id,$scope['tenant_id'],$scope['company_id'],'general_ledger.'.$action,$scope['unit_id']); + } + public function engine(User $user,?\Closure $checkpoint=null):PayableJournal + { + $scope=$this->scope($user);$person=DB::table('pa_access')->where($scope)->where(['user_id'=>$user->id,'action'=>'view'])->value('person');abort_unless(is_string($person)&&$person!=='',403); + $authorize=function(string $action,bool $lock=true)use($user,$scope,$person):void{ + self::guard(); + if($lock){DB::table('companies')->where('tenant_id',$scope['tenant_id'])->where('id',$scope['company_id'])->lockForUpdate()->firstOrFail();DB::table('users')->where('id',$user->id)->lockForUpdate()->firstOrFail();} + abort_unless($this->scope($user)===$scope,409,'Contexto alterado.'); + app(CompanyContext::class)->selectFor($user->id,$scope['tenant_id'],$scope['company_id'],$scope['unit_id']); + abort_unless(DB::table('pa_access')->where($scope)->where(['user_id'=>$user->id,'action'=>'view'])->value('person')===$person,409,'Pessoa alterada; reabra a conferência.'); + abort_unless($this->can($user,$action),403); + }; + $sales=config('sales_ledger.synthetic_enabled')===true?app(SalesLedgerSource::class):null; + $cost=config('cost_ledger.synthetic_enabled')===true?app(CostLedgerSource::class):null; + $industrial=config('industrial_ledger.synthetic_enabled')===true?app(IndustrialLedgerSource::class):null; + $providers=array_values(array_filter([$sales,$cost,$industrial])); + $extra=$providers?function($kind,$id)use($sales,$cost,$industrial,$user){if(in_array($kind,['industry.cost.validated','industry.cost.reversal','industry.cost.replacement'],true)){if(!$industrial)throw new \DomainException('Origem industrial não composta.');return $kind==='industry.cost.validated'?$industrial->source($user,$id):$industrial->correctionSource($user,$kind,$id);}if(in_array($kind,['workshop.direct_cost.validated','workshop.direct_cost.reversal','workshop.direct_cost.replacement'],true)){if(!$cost)throw new \DomainException('Origem de custo não composta neste host.');return $kind==='workshop.direct_cost.validated'?$cost->source($user,$id):$cost->correctionSource($user,$kind,$id);}if(!$sales)throw new \DomainException('Origem comercial não composta neste host.');return $sales->source($user,$kind,$id);}:null; + $period=$providers?function($period)use($providers,$user){if(count($providers)===1)return $providers[0]->period($user,$period);$facts=0;$pending=0;$hash=hash_init('sha256');foreach($providers as $provider){$v=$provider->period($user,$period);$facts+=$v['facts'];$pending+=$v['pending'];hash_update($hash,$v['hash']);}return ['facts'=>$facts,'pending'=>$pending,'hash'=>hash_final($hash)];}:null; + return new PayableJournal(DB::connection(),$scope,$user->id,$person,fn(string $a)=>$authorize($a),fn()=>$authorize('view',false),fn(int $id)=>$this->source($user,$scope,$id),$checkpoint,$extra,$period); + } + public function industrial(User $user,?int $lot=null,int $page=1):array{ + $own=DB::transactionLevel()===0;return DB::transaction(function()use($user,$lot,$page,$own){if($own)DB::statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY');$this->scope($user);$origin=app(IndustrialLedgerSource::class)->workspace($user,$lot,$page);$data=$this->listing($user,['page'=>$page]+($lot!==null?['industrial_lot_id'=>$lot]:[]),false);if($lot===null){foreach(['journals','lines','proposals','reviews','events'] as $key)$data[$key]=[];$data['totals']=['debit_minor'=>0,'credit_minor'=>0,'net_minor'=>0];$data['pagination']=['page'=>$page,'last_page'=>1,'total'=>0];foreach($data['evidence_pagination'] as &$p)$p=['page'=>$page,'last_page'=>1,'total'=>0];unset($p);}$closed=DB::table('gl_periods')->where($origin['scope'])->where('period_key','QA-2026-10')->orderByDesc('version')->value('status')==='closed';$cycle=$lot!==null&&config('industrial_ledger.correction_enabled')===true?$this->cycle($user,$page,['industrial_lot_id'=>$lot]):['corrections'=>[],'correction_results'=>[],'pagination'=>[],'permissions'=>[]];foreach($cycle['corrections'] as $group){$v=json_decode($group->replacement_snapshot,true)['source'];$group->current=$group->current&&$origin['source']!==null&&($v['replacement_source_revision']??null)===$origin['source']['recognition_revision'];}return ['industrial'=>$origin,'book'=>$data,'closed'=>$closed,'corrections'=>$cycle['corrections'],'correction_results'=>$cycle['correction_results'],'pagination'=>$cycle['pagination'],'permissions'=>$cycle['permissions']];}); + } + public function costs(User $user,?int $order=null,int $page=1):array + { + abort_unless(config('cost_ledger.synthetic_enabled')===true,403);$own=DB::transactionLevel()===0; + return DB::transaction(function()use($user,$order,$page,$own){if($own)DB::statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY');$commercial=app(CostLedgerSource::class)->workspace($user,$order,$page);$data=$this->cycle($user,$page,$order!==null?['cost_order_id'=>$order]:[]);foreach($data['corrections'] as $group){$source=json_decode($group->replacement_snapshot,true)['source'];if(isset($source['cost_order_id']))$group->current=$group->current&&$commercial['source']!==null&&($source['replacement_source_revision']??null)===$commercial['source']['recognition_revision'];}return ['cost'=>$commercial]+$data;}); + } + private function source(User $user,array $scope,int $id):array + { + $obligation=DB::table('pa_obligations')->where($scope)->where('id',$id)->lockForUpdate()->first()??throw new \DomainException('Obrigação indisponível neste âmbito.'); + $origin=DB::table('pa_sources')->where($scope)->where('id',$obligation->source_id)->lockForUpdate()->first()??throw new \DomainException('Referência factual ausente.'); + $finance=app(SupplierPayables::class);$document=$finance->document($user,(int)$origin->local_source_id); + $position=$finance->engine($user)->positionForSource((int)$origin->local_source_id); + if(!$position||(int)$position['id']!==$id||$position['source_conflict'])throw new \DomainException('Fonte financeira mudou ou não está conferida.'); + $proposal=DB::table('pa_proposals')->where($scope)->where('id',$obligation->proposal_id)->first()??throw new \DomainException('Conferência original ausente.'); + return ['effect_type'=>'supplier_payable.recognised','origin_key'=>$origin->source_key,'obligation_id'=>$id,'local_source_id'=>(int)$origin->local_source_id, + 'document_revision'=>$obligation->source_revision,'recognition_revision'=>hash('sha256',Payables::canonical(['obligation'=>(array)$obligation,'recognition_snapshot'=>$proposal->snapshot])), + 'principal_minor'=>(int)$obligation->principal_minor,'currency'=>$obligation->currency,'due_on'=>$obligation->due_on,'tax_minor'=>$document['tax_minor'], + 'compatible'=>true,'history_imported'=>$position['history_imported']]; + } + public function report(User $user,string $kind,array $options):array + { + if(!in_array($kind,['trial-balance','account-ledger'],true))throw new \InvalidArgumentException('Relatório desconhecido.');$own=DB::transactionLevel()===0; + return DB::transaction(function()use($user,$kind,$options,$own){ + if($own)DB::statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY');$engine=$this->engine($user); + return $kind==='trial-balance'?$engine->trialBalance($options):$engine->accountLedger($options); + }); + } + public function financialReceipt(User $user,string $domain,string $key):?array + { + if(!in_array($domain,['recognition','settlement'],true))throw new \InvalidArgumentException('Domínio de comprovativo inválido.');$own=DB::transactionLevel()===0;return DB::transaction(function()use($user,$domain,$key,$own){if($own)DB::statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY');$this->scope($user);$engine=app(SupplierPayables::class)->engine($user);return $domain==='recognition'?$engine->receipt($key):$engine->settlements()->receipt($key);}); + } + public function receipt(User $user,string $key):?array + { + $own=DB::transactionLevel()===0;return DB::transaction(function()use($user,$key,$own){if($own)DB::statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY');return $this->engine($user)->receipt($key);}); + } + public function listing(User $user,array $options=[],bool $withAccounts=true):array + { + $own=DB::transactionLevel()===0; + return DB::transaction(function()use($user,$options,$own,$withAccounts){ + if($own)DB::statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY'); + $data=$this->engine($user)->listing($options,$withAccounts); + $data['permissions']=array_combine(['prepare','validate','post'],array_map(fn($a)=>$this->can($user,$a),['prepare','validate','post']));return $data; + }); + } + public function cycle(User $user,int $page=1,array $bookOptions=[]):array + { + abort_unless(config('general_ledger.cycle_enabled')===true,403); + $own=DB::transactionLevel()===0; + return DB::transaction(function()use($user,$page,$own,$bookOptions){ + if($own)DB::statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY'); + $data=$this->engine($user)->cycleListing($page,$bookOptions['cost_order_id']??null,$bookOptions['industrial_lot_id']??null); + $data['book']=$this->listing($user,['page'=>$page]+$bookOptions); + $actions=['prepare','validate','post','correct_prepare','correct_validate','correct_post','period_prepare','period_validate','period_close']; + $data['permissions']=array_combine($actions,array_map(fn($a)=>$this->can($user,$a),$actions));return $data; + }); + } + public function sales(User $user,?int $invoice=null,int $page=1):array + { + abort_unless(config('sales_ledger.synthetic_enabled')===true,403);$own=DB::transactionLevel()===0; + return DB::transaction(function()use($user,$invoice,$page,$own){ + if($own)DB::statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY'); + $commercial=app(SalesLedgerSource::class)->workspace($user,$invoice,$page);$data=$this->cycle($user,$page,$invoice!==null?['sales_invoice_id'=>$invoice]:[]);$data['commercial']=$commercial; + if($invoice!==null){$account=DB::table('gl_accounts')->where($data['commercial']['scope'])->where('code','QA-CLIENTES')->value('id');$data['client_account']=$account?$this->listing($user,['page'=>$page,'sales_invoice_id'=>$invoice,'account_id'=>$account])['totals']:null;}return $data; + }); + } + + /** Read one factual chain. No command, inferred association or module switch. */ + public function flow(User $user,int $sourceId):array + { + $own=DB::transactionLevel()===0; + return DB::transaction(function()use($user,$sourceId,$own){ + if($own)DB::statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY'); + $scope=$this->scope($user); + $finance=app(SupplierPayables::class); + abort_unless($finance->can($user,'view'),403); + $page=$finance->listing($user,['source'=>$sourceId,'per_page'=>25]); + $document=$page['documents'][0]??abort(403); + $position=$page['obligations'][0]??null; + $proposal=null;$review=null;$journal=null; + if($position){ + $proposal=DB::table('gl_proposals')->where($scope)->where('obligation_id',$position['id'])->where('snapshot->source->effect_type','supplier_payable.recognised')->orderByDesc('capture_version')->first(); + if($proposal)$review=DB::table('gl_reviews')->where($scope)->where('proposal_id',$proposal->id)->first(); + $journal=DB::table('gl_journals')->where($scope)->where('obligation_id',$position['id'])->where('snapshot->source->effect_type','supplier_payable.recognised')->first(); + } + return compact('scope','document','position','proposal','review','journal')+['source_id'=>$sourceId, + 'financial_proposals'=>$page['proposals'],'financial_events'=>$page['events'], + 'source_conflict'=>$position['source_conflict']??false]; + }); + } +} diff --git a/app/Modules/Accounting/GeneralLedgerController.php b/app/Modules/Accounting/GeneralLedgerController.php new file mode 100644 index 0000000..4b359f5 --- /dev/null +++ b/app/Modules/Accounting/GeneralLedgerController.php @@ -0,0 +1,65 @@ +query()!==[],422);try{$data=$ledger->financialReceipt($r->user(),$domain,$key);}catch(\InvalidArgumentException $e){abort(422,$e->getMessage());}catch(\DomainException $e){abort(403,$e->getMessage());}abort_if($data===null,404,'Comprovativo não encontrado neste domínio, contexto e captura.');return response()->json($data)->header('Cache-Control','no-store'); + } + public function receipt(Request $r,string $key,GeneralLedger $ledger) + { + abort_if($r->query()!==[],422);try{$data=$ledger->receipt($r->user(),$key);}catch(\InvalidArgumentException $e){abort(422,$e->getMessage());}catch(\DomainException $e){abort(403,$e->getMessage());}abort_if($data===null,404,'Comprovativo não encontrado neste contexto e nesta captura.');return response()->json($data)->header('Cache-Control','no-store'); + } + public function report(Request $r,string $kind,GeneralLedger $ledger) + { + $d=$r->validate(['from_on'=>'required|date_format:Y-m-d','to_on'=>'required|date_format:Y-m-d|after_or_equal:from_on','account_id'=>'sometimes|required|integer|min:1','page'=>'sometimes|integer|min:1|max:100000','per_page'=>'sometimes|integer|in:25,100']); + abort_if(array_diff(array_keys($r->query()),array_keys($d))!==[],422); + try{$data=$ledger->report($r->user(),$kind,$d);} + catch(\InvalidArgumentException $e){abort(422,$e->getMessage());} + catch(\DomainException $e){abort(403,$e->getMessage());} + if($r->is('api/*'))return response()->json($data)->header('Cache-Control','no-store'); + return response(\Tempo\Finance\GeneralLedger\ReportsWorkspace::render($data,['host'=>'ERP SGF','return_url'=>'/general-ledger','industrial_links'=>config('industrial_ledger.synthetic_enabled')===true,'cost_links'=>config('cost_ledger.synthetic_enabled')===true,'sales_links'=>config('sales_ledger.synthetic_enabled')===true]))->header('Cache-Control','no-store'); + } + private function options(Request $r):array + { + $d=$r->validate(['industrial_lot_id'=>'sometimes|required|integer|min:1','cost_order_id'=>'sometimes|required|integer|min:1','sales_invoice_id'=>'sometimes|required|integer|min:1','obligation_id'=>'sometimes|required|integer|min:1','page'=>'sometimes|integer|min:1|max:100000','period_key'=>'sometimes|required|string|max:80','account_id'=>'sometimes|nullable|integer|min:1']); + abort_if(array_diff(array_keys($r->query()),array_keys($d))!==[],422);if(array_key_exists('account_id',$d)&&$d['account_id']===null)unset($d['account_id']);return $d; + } + public function index(Request $r,GeneralLedger $ledger) + { + try{return response()->json($ledger->listing($r->user(),$this->options($r)))->header('Cache-Control','no-store');} + catch(\DomainException $e){abort(403,$e->getMessage());} + } + public function page(Request $r,GeneralLedger $ledger) + { + try{return response()->view('accounting.general-ledger',['data'=>$ledger->listing($r->user(),$this->options($r))])->header('Cache-Control','no-store');} + catch(\DomainException $e){abort(403,$e->getMessage());} + } + public function command(Request $r,string $action,GeneralLedger $ledger) + { + if(!in_array($action,['prepare','validate','post'],true))abort_unless(config('general_ledger.cycle_enabled')===true,403); + try{return response()->json($ledger->engine($r->user())->command($action,$r->all(),(string)$r->header('Idempotency-Key')))->header('Cache-Control','no-store');} + catch(\InvalidArgumentException $e){abort(422,$e->getMessage());} + catch(\DomainException $e){abort(409,$e->getMessage());} + } + public function cycle(Request $r,GeneralLedger $ledger) + { + $d=$r->validate(['page'=>'sometimes|integer|min:1|max:100000']);abort_if(array_diff(array_keys($r->query()),['page'])!==[],422); + $page=(int)($d['page']??1);$data=$ledger->cycle($r->user(),$page); + return response(\Tempo\Finance\GeneralLedger\CycleWorkspace::render($data,['host'=>'ERP SGF','csrf'=>csrf_token(),'context'=>$r->session()->get('company_context.token'),'scope'=>$r->session()->get('company_context'),'financial_url'=>'/supplier-payments','return_url'=>'/general-ledger','page_url'=>'/general-ledger/cycle']))->header('Cache-Control','no-store'); + } + public function cycleData(Request $r,GeneralLedger $ledger) + { + $d=$r->validate(['page'=>'sometimes|integer|min:1|max:100000']);abort_if(array_diff(array_keys($r->query()),['page'])!==[],422); + return response()->json($ledger->cycle($r->user(),(int)($d['page']??1)))->header('Cache-Control','no-store'); + } + public function flow(Request $r,GeneralLedger $ledger) + { + $d=$r->validate(['source'=>'required|integer|min:1']); + abort_if(array_diff(array_keys($r->query()),['source'])!==[],422); + return response()->view('accounting.payable-flow',['flow'=>$ledger->flow($r->user(),(int)$d['source'])])->header('Cache-Control','no-store'); + } +} diff --git a/app/Modules/Accounting/IndustrialLedgerController.php b/app/Modules/Accounting/IndustrialLedgerController.php new file mode 100644 index 0000000..61676ba --- /dev/null +++ b/app/Modules/Accounting/IndustrialLedgerController.php @@ -0,0 +1,7 @@ +validate(['lot_id'=>'sometimes|required|integer|min:1','page'=>'sometimes|integer|min:1|max:100000']);abort_if(array_diff(array_keys($r->query()),array_keys($d)),422);try{$data=$ledger->industrial($r->user(),isset($d['lot_id'])?(int)$d['lot_id']:null,(int)($d['page']??1));}catch(\DomainException $e){abort(403,$e->getMessage());}return $r->is('api/*')?response()->json($data)->header('Cache-Control','no-store'):response()->view('accounting.industrial-ledger',['data'=>$data])->header('Cache-Control','no-store');} +} diff --git a/app/Modules/Accounting/IndustrialLedgerSource.php b/app/Modules/Accounting/IndustrialLedgerSource.php new file mode 100644 index 0000000..ba04dcd --- /dev/null +++ b/app/Modules/Accounting/IndustrialLedgerSource.php @@ -0,0 +1,42 @@ +id()===$u->id&&$c->userId()===$u->id&&$c->unitId(),403);$s=$c->identifiers()+['unit_id'=>$c->unitId()];app(Permissions::class)->require($u->id,$s['tenant_id'],$s['company_id'],'industrial_costs.view',$s['unit_id']);foreach(['gl_industrial_sources','ic_lots','ic_results','ic_inputs','ic_decisions'] as $t)abort_unless(DB::getSchemaBuilder()->hasTable($t),503,'Origem industrial indisponível.');return $s; + } + private function facts(User $u,object $map):array{return ['mapping'=>(array)$map,'conference'=>app(IndustrialCosts::class)->conference($map->lot_id,$u->id)];} + private function eligible(array $s,array $facts):array{ + $m=$facts['mapping'];$c=$facts['conference'];$snap=$c['snapshot'];$r=$c['result'];$d=$c['decision']; + if(!$r||!$c['product']||($c['product']['id']??null)!==$c['lot']['product_id']||!$c['current']||!$d||$d['decision']!=='approved'||$d['actor_id']===$r['actor_id']||!$snap||$snap['incomplete']||$snap['selected_total_exact']===null||$snap['currency']!=='MZN'||!$snap['reconciliation']['balanced'])throw new \DomainException('Resultado industrial actual completo e validado distintamente obrigatório.'); + $origins=[];foreach(['material','labour','pool','machine','production'] as $kind)$origins[$kind]=$snap['origins'][$kind]['source_ref'];if(Payables::canonical($origins)!==Payables::canonical(json_decode($m['origins'],true)))throw new \DomainException('Perímetro industrial alterado; nova conferência necessária.'); + if(count(array_unique($origins))!==5)throw new \DomainException('Origem industrial ambígua.'); + if(DB::table('ic_inputs')->where('tenant_id',$s['tenant_id'])->where('company_id',$s['company_id'])->where('lot_id','<>',$m['lot_id'])->whereIn('source_ref',array_values($origins))->exists())throw new \DomainException('Origem reutilizada entre lotes.'); + if(DB::getSchemaBuilder()->hasTable('gl_cost_sources')&&DB::table('gl_cost_sources')->where('tenant_id',$s['tenant_id'])->where('company_id',$s['company_id'])->where(fn($q)=>$q->whereIn('material_origin',array_values($origins))->orWhereIn('time_origin',array_values($origins)))->exists())throw new \DomainException('Origem já composta como custo directo; não reconhecer novamente.'); + try{$amount=BigRational::of($snap['selected_total_exact'])->multipliedBy(100)->toBigInteger()->toInt();}catch(\Brick\Math\Exception\MathException $e){throw new \DomainException('Montante industrial não representável em cêntimos; sem arredondamento.',0,$e);}if($amount<=0)throw new \DomainException('Montante seleccionado deve ser positivo.'); + return ['effect_type'=>'industry.cost.validated','source_id'=>$m['lot_id'],'industrial_lot_id'=>$m['lot_id'],'obligation_id'=>$m['lot_id'],'origin_key'=>hash('sha256',Payables::canonical(['scope'=>$s,'lot'=>$m['lot_id'],'origins'=>$origins])),'recognition_revision'=>hash('sha256',Payables::canonical($facts)),'principal_minor'=>$amount,'currency'=>'MZN','tax_minor'=>0,'compatible'=>true,'history_imported'=>false,'permitted_period_key'=>$m['period_key'],'period_start'=>$c['lot']['period_start'],'period_end'=>$c['lot']['period_end'],'result_id'=>$r['id'],'result_version'=>$r['version'],'document_revision'=>$r['fingerprint'],'good_units'=>$snap['good_units'],'unit_cost_exact'=>$snap['unit_cost_exact'],'residual_exact'=>$snap['residual_exact'],'industrial_evidence'=>$facts,'label'=>'Resultado industrial seleccionado de ensaio; residual separado, sem stock ou salários contabilizados']; + } + public function source(User $u,int $lot):array{$s=$this->scope($u);$m=DB::table('gl_industrial_sources')->where($s)->where('lot_id',$lot)->first()??throw new \DomainException('Lote fora do âmbito composto.');return $this->eligible($s,$this->facts($u,$m));} + public function correctionSource(User $u,string $kind,int $id):array{ + abort_unless(config('industrial_ledger.correction_enabled')===true,403);$s=$this->scope($u);abort_unless(DB::getSchemaBuilder()->hasTable('gl_industrial_correction_capability'),503);if(!in_array($kind,['industry.cost.reversal','industry.cost.replacement'],true))throw new \DomainException('Tipo de correcção industrial inválido.');$j=DB::table('gl_journals')->where($s)->where('id',$id)->first()??throw new \DomainException('Original fora do âmbito.');$old=json_decode($j->snapshot,true);if($old['source']['effect_type']!=='industry.cost.validated')throw new \DomainException('Apenas o original industrial admite esta correcção.');$base=$this->source($u,(int)$old['source']['industrial_lot_id']);if($base['origin_key']!==$old['source']['origin_key']||$base['permitted_period_key']!==$old['period']['period_key']||$base['recognition_revision']===$old['source']['recognition_revision'])throw new \DomainException('Origem/perímetro/período sem sucessora compatível.');return array_replace($base,['effect_type'=>$kind,'source_id'=>$id,'amount_minor'=>$kind==='industry.cost.reversal'?(int)$j->debit_minor:$base['principal_minor'],'replacement_source_revision'=>$base['recognition_revision'],'recognition_revision'=>hash('sha256',Payables::canonical(['current_source'=>$base,'original'=>(array)$j,'kind'=>$kind])),'original_journal_id'=>$id,'original_journal_on'=>$j->journal_on,'original_journal_sha256'=>hash('sha256',Payables::canonical((array)$j)),'original_industrial_source'=>$old['source']]); + } + private function resolved(array $s,object $j,array $source):bool{ + if($j->source_revision===$source['recognition_revision'])return true;if(config('industrial_ledger.correction_enabled')!==true||!DB::getSchemaBuilder()->hasTable('gl_industrial_correction_capability'))return false;$r=DB::table('gl_correction_results')->where($s)->where('original_journal_id',$j->id)->first();if(!$r)return false;$replacement=DB::table('gl_journals')->where($s)->where('id',$r->replacement_journal_id)->first();if(!$replacement)return false;$v=json_decode($replacement->snapshot,true)['source'];return $v['effect_type']==='industry.cost.replacement'&&($v['industrial_lot_id']??null)===$source['industrial_lot_id']&&($v['replacement_source_revision']??null)===$source['recognition_revision']; + } + public function period(User $u,array $period):array{ + $s=$this->scope($u);$h=hash_init('sha256');$facts=0;$pending=0;foreach(DB::table('gl_industrial_sources')->where($s)->where('period_key',$period['period_key'])->orderBy('id')->cursor() as $m){$v=$this->facts($u,$m);hash_update($h,Payables::canonical($v));$facts++;try{$source=$this->eligible($s,$v);$j=DB::table('gl_journals')->where($s)->where('snapshot->source->effect_type','industry.cost.validated')->where('snapshot->source->industrial_lot_id',$m->lot_id)->first();if(!$j||!$this->resolved($s,$j,$source)||$source['period_start']<$period['starts_on']||$source['period_end']>$period['ends_on'])$pending++;}catch(\DomainException){$pending++;}}return ['facts'=>$facts,'pending'=>$pending,'hash'=>hash_final($h)]; + } + public function workspace(User $u,?int $lot,int $page):array{ + $s=$this->scope($u);$p=DB::table('gl_industrial_sources')->where($s)->orderBy('lot_id')->paginate(25,['lot_id','period_key'],'page',$page);$facts=null;$source=null;$pending=null;$journal=null;if($lot!==null){$m=DB::table('gl_industrial_sources')->where($s)->where('lot_id',$lot)->first()??abort(403,'Lote fora do âmbito.');$facts=$this->facts($u,$m);try{$source=$this->eligible($s,$facts);}catch(\DomainException $e){$pending=$e->getMessage();}$journal=DB::table('gl_journals')->where($s)->where('snapshot->source->effect_type','industry.cost.validated')->where('snapshot->source->industrial_lot_id',$lot)->first();}return ['scope'=>$s,'lots'=>$p->items(),'pagination'=>['page'=>$page,'total'=>$p->total(),'last_page'=>$p->lastPage()],'lot_id'=>$lot,'facts'=>$facts,'source'=>$source,'pending'=>$pending,'journal'=>$journal,'accounting_state'=>$journal?($source&&$this->resolved($s,$journal,$source)?'current':'requires_future_correction'):'unposted']; + } + public function cards(User $u,int $page):array{ + $s=$this->scope($u);$p=DB::table('gl_industrial_sources')->where($s)->orderBy('lot_id')->paginate(25,['lot_id','period_key'],'industrial_page',$page);$ids=array_column($p->items(),'lot_id');$results=DB::table('ic_results as r')->where(array_combine(array_map(fn($k)=>'r.'.$k,array_keys($s)),array_values($s)))->whereIn('r.lot_id',$ids)->whereNotExists(fn($q)=>$q->selectRaw('1')->from('ic_results as n')->whereColumn('n.previous_id','r.id'))->get(['r.id','r.lot_id','r.version'])->keyBy('lot_id');$decisions=DB::table('ic_decisions')->whereIn('result_id',$results->pluck('id')->all())->get(['result_id','decision'])->keyBy('result_id');$posted=DB::table('gl_journals')->where($s)->where('snapshot->source->effect_type','industry.cost.validated')->whereIn('snapshot->source->industrial_lot_id',$ids)->select('id')->selectRaw("snapshot->'source'->>'industrial_lot_id' AS lot_id")->get()->keyBy('lot_id');$rows=[];foreach($p->items() as $m){$r=$results->get($m->lot_id);$rows[]=['lot_id'=>$m->lot_id,'period_key'=>$m->period_key,'result_id'=>$r?->id,'result_version'=>$r?->version,'recorded_decision'=>$r?$decisions->get($r->id)?->decision:null,'original_journal_id'=>$posted->get($m->lot_id)?->id,'current_dependency_conference_required'=>true];}return ['allowed'=>true,'rows'=>$rows,'pagination'=>['page'=>$page,'last_page'=>$p->lastPage(),'total'=>$p->total(),'per_page'=>25]]; + } +} diff --git a/app/Modules/Accounting/LedgerComposition.php b/app/Modules/Accounting/LedgerComposition.php new file mode 100644 index 0000000..bfe5bff --- /dev/null +++ b/app/Modules/Accounting/LedgerComposition.php @@ -0,0 +1,35 @@ +hasTable($t),503,'Fonte composta indisponível; não interpretar como zero.');} + private function postings(array $scope,string $kind,string $key,array $ids):array + { + if(!$ids)return [];$rows=DB::table('gl_journals')->where($scope)->where('snapshot->source->effect_type',$kind)->whereIn('snapshot->source->'.$key,$ids)->select('id')->selectRaw("snapshot->'source'->>'$key' AS source_id")->get();$out=[];foreach($rows as $row)$out[(int)$row->source_id]=$row->id;return $out; + } + private function page($pager,array $rows):array{return ['allowed'=>true,'rows'=>$rows,'pagination'=>['page'=>$pager->currentPage(),'total'=>$pager->total(),'last_page'=>$pager->lastPage(),'per_page'=>25]];} + public function workspace(User $user,array $options=[]):array + { + abort_unless(config('general_ledger.composition_enabled')===true&&config('sales_ledger.synthetic_enabled')===true&&config('cost_ledger.synthetic_enabled')===true,403,'Composição disponível apenas no ensaio explicitamente preparado.');$own=DB::transactionLevel()===0; + return DB::transaction(function()use($user,$options,$own){ + if($own)DB::statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY');$ledger=app(GeneralLedger::class);$book=$ledger->listing($user,['page'=>(int)($options['journals_page']??1),'period_key'=>$options['period_key']??'QA-2026-10'],false);$ctx=app(CompanyContext::class);$scope=$ctx->identifiers()+['unit_id'=>$ctx->unitId()];$permissions=app(Permissions::class);$can=fn($right)=>$permissions->has($user->id,$scope['tenant_id'],$scope['company_id'],$right,$scope['unit_id']);$panels=['sales'=>['allowed'=>false],'costs'=>['allowed'=>false],'suppliers'=>['allowed'=>false]]; + if($can('service_invoices.view')&&$can('service_receivables.view')){ + $this->requireTables(['si_invoices','sr_records','sr_effects','gl_sales_capability']);$p=ModuleRecords::query('si_invoices')->where($scope)->orderBy('id')->paginate(25,['id','series_code','number','issued_at'],'invoices_page',(int)($options['invoices_page']??1));$ids=array_column($p->items(),'id');$posted=$this->postings($scope,'sales.invoice','invoice_id',$ids);$records=DB::table('sr_records')->where($scope)->whereIn('invoice_id',$ids)->where('kind','obligation')->get(['id','invoice_id'])->keyBy('invoice_id');$opened=DB::table('sr_effects')->whereIn('record_id',$records->pluck('id')->all())->where('kind','open')->pluck('record_id')->all();$rows=[];foreach($p->items() as $i){$ob=$records->get($i->id);$rows[]=['invoice_id'=>$i->id,'number'=>$i->series_code.'/'.$i->number,'issued_at'=>$i->issued_at,'confirmed_opening'=>$ob&&in_array($ob->id,$opened,true),'original_journal_id'=>$posted[$i->id]??null];}$panels['sales']=$this->page($p,$rows); + } + if($can('workshop.view')&&$can('direct_costs.view')){ + $this->requireTables(['gl_cost_sources','wo_orders','dc_calculations','dc_decisions']);$p=DB::table('gl_cost_sources')->where($scope)->orderBy('order_id')->paginate(25,['order_id','period_key'],'costs_page',(int)($options['costs_page']??1));$ids=array_column($p->items(),'order_id');$calculations=DB::table('dc_calculations as c')->where(array_combine(array_map(fn($k)=>'c.'.$k,array_keys($scope)),array_values($scope)))->whereIn('c.order_id',$ids)->whereNotExists(fn($q)=>$q->selectRaw('1')->from('dc_calculations as n')->whereColumn('n.order_id','c.order_id')->whereColumn('n.version','>','c.version'))->get(['c.id','c.order_id','c.version'])->keyBy('order_id');$decisions=DB::table('dc_decisions')->whereIn('calculation_id',$calculations->pluck('id')->all())->get(['calculation_id','decision'])->keyBy('calculation_id');$posted=$this->postings($scope,'workshop.direct_cost.validated','cost_order_id',$ids);$results=DB::table('gl_correction_results')->where($scope)->whereIn('original_journal_id',array_values($posted))->get(['id','original_journal_id'])->keyBy('original_journal_id');$rows=[];foreach($p->items() as $m){$calc=$calculations->get($m->order_id);$j=$posted[$m->order_id]??null;$rows[]=['order_id'=>$m->order_id,'period_key'=>$m->period_key,'calculation_id'=>$calc?->id,'calculation_version'=>$calc?->version,'recorded_decision'=>$calc?$decisions->get($calc->id)?->decision:null,'original_journal_id'=>$j,'recorded_correction_result_id'=>$j?$results->get($j)?->id:null,'current_dependency_conference_required'=>true];}$panels['costs']=$this->page($p,$rows); + } + if($can('supplier_payables.view')){ + $this->requireTables(['pa_obligations','pa_sources','pa_imported_sources']);$q=DB::table('pa_obligations as o')->join('pa_sources as s','s.id','=','o.source_id')->join('pa_imported_sources as r','r.id','=','s.local_source_id');foreach($scope as $k=>$v)$q->where('o.'.$k,$v)->where('s.'.$k,$v)->where('r.'.$k,$v);$p=$q->orderBy('o.id')->paginate(25,['o.id','o.principal_minor','o.currency','s.local_source_id','r.payload'],'suppliers_page',(int)($options['suppliers_page']??1));$posted=$this->postings($scope,'supplier_payable.recognised','obligation_id',array_column($p->items(),'id'));$rows=[];foreach($p->items() as $o)$rows[]=['obligation_id'=>$o->id,'source_id'=>$o->local_source_id,'document_number'=>json_decode($o->payload,true)['number']??'—','principal_minor'=>(int)$o->principal_minor,'currency'=>$o->currency,'original_journal_id'=>$posted[$o->id]??null];$panels['suppliers']=$this->page($p,$rows); + } + if(config('industrial_ledger.synthetic_enabled')===true)$panels['industrial']=$can('industrial_costs.view')?app(IndustrialLedgerSource::class)->cards($user,(int)($options['industrial_page']??1)):['allowed'=>false]; + $key=$options['period_key']??'QA-2026-10';$period=DB::table('gl_periods')->where($scope)->where('period_key',$key)->orderByDesc('version')->first();$p=DB::table('gl_period_checks')->where($scope)->where('period_key',$key)->orderByDesc('id')->paginate(25,['*'],'checks_page',(int)($options['checks_page']??1));$ids=array_column($p->items(),'id');$reviews=DB::table('gl_period_reviews')->where($scope)->whereIn('check_id',$ids)->get()->keyBy('check_id');$closures=DB::table('gl_period_closures')->where($scope)->whereIn('check_id',$ids)->get()->keyBy('check_id');$checks=[];foreach($p->items() as $c)$checks[]=['capture'=>(array)$c,'review'=>$reviews->get($c->id),'closure'=>$closures->get($c->id)];$periodActions=[];foreach(['period_prepare','period_validate','period_close'] as $a)$periodActions[$a]=$ledger->can($user,$a);return ['synthetic_only'=>true,'scope'=>$scope,'panels'=>$panels,'book'=>$book,'period'=>$period,'checks'=>$this->page($p,$checks),'period_permissions'=>$periodActions,'all_current_source_views'=>!in_array(false,array_column($panels,'allowed'),true),'query'=>$options,'recorded_state_is_not_current_conference'=>true]; + }); + } +} diff --git a/app/Modules/Accounting/LedgerCompositionController.php b/app/Modules/Accounting/LedgerCompositionController.php new file mode 100644 index 0000000..ce30bd2 --- /dev/null +++ b/app/Modules/Accounting/LedgerCompositionController.php @@ -0,0 +1,13 @@ +'sometimes|required|string|max:80'];foreach(['industrial_page','invoices_page','costs_page','suppliers_page','journals_page','checks_page'] as $k)$rules[$k]='sometimes|integer|min:1|max:100000';$d=$r->validate($rules);abort_if(array_diff(array_keys($r->query()),array_keys($d))!==[],422); + try{$data=$workspace->workspace($r->user(),$d);}catch(\DomainException $e){abort(403,$e->getMessage());}catch(\InvalidArgumentException $e){abort(422,$e->getMessage());} + return $r->is('api/*')?response()->json($data)->header('Cache-Control','no-store'):response()->view('accounting.ledger-composition',['data'=>$data])->header('Cache-Control','no-store'); + } +} diff --git a/app/Modules/Accounting/SalesLedgerController.php b/app/Modules/Accounting/SalesLedgerController.php new file mode 100644 index 0000000..4c6c43c --- /dev/null +++ b/app/Modules/Accounting/SalesLedgerController.php @@ -0,0 +1,16 @@ +validate(['invoice_id'=>'sometimes|required|integer|min:1','page'=>'sometimes|integer|min:1|max:100000']);abort_if(array_diff(array_keys($r->query()),array_keys($d))!==[],422); + try{return $ledger->sales($r->user(),isset($d['invoice_id'])?(int)$d['invoice_id']:null,(int)($d['page']??1));} + catch(\DomainException $e){abort(403,$e->getMessage());} + catch(\InvalidArgumentException $e){abort(422,$e->getMessage());} + } + public function page(Request $r,GeneralLedger $ledger){return response()->view('accounting.sales-ledger',['data'=>$this->data($r,$ledger)])->header('Cache-Control','no-store');} + public function index(Request $r,GeneralLedger $ledger){return response()->json($this->data($r,$ledger))->header('Cache-Control','no-store');} +} diff --git a/app/Modules/Accounting/SalesLedgerSource.php b/app/Modules/Accounting/SalesLedgerSource.php new file mode 100644 index 0000000..d647a49 --- /dev/null +++ b/app/Modules/Accounting/SalesLedgerSource.php @@ -0,0 +1,80 @@ +hasTable($table),503,'Composição comercial contabilística não instalada.');$ctx=app(CompanyContext::class); + abort_unless(auth()->id()===$u->id&&$ctx->userId()===$u->id&&$ctx->unitId(),403);$scope=$ctx->identifiers()+['unit_id'=>$ctx->unitId()]; + foreach(['service_invoices.view','service_receivables.view'] as $p)app(Permissions::class)->require($u->id,$scope['tenant_id'],$scope['company_id'],$p,$scope['unit_id']);return $scope; + } + private function hash(array $d):string{return hash('sha256',Payables::canonical($d));} + private function minor(string $value):int{return BigDecimal::of(ServiceReceivables::money($value,false))->multipliedBy(100)->toInt();} + private function effectQuery(array $s){return DB::table('sr_effects as e')->join('sr_records as r','r.id','=','e.record_id')->where(array_combine(array_map(fn($k)=>'r.'.$k,array_keys($s)),array_values($s)))->select('e.*');} + private function invoice(User $u,array $scope,int $id):array + { + $row=DB::table('si_invoices')->where($scope)->where('id',$id)->first()??abort(403,'Factura fora do âmbito.'); + $shown=app(ServiceInvoicing::class)->show($id,$u->id);$snapshot=$shown['snapshot']; + if(($snapshot['simulation_only']??false)!==true||($snapshot['notice']??'')!==ServiceInvoicing::NOTICE||($snapshot['document']['data']['currency']??'')!=='MZN')throw new \DomainException('Só factura efectivamente emitida pelo circuito de teste.'); + $ob=DB::table('sr_records')->where($scope)->where(['invoice_id'=>$id,'kind'=>'obligation'])->first(); + $open=$ob?$this->effectQuery($scope)->where('e.record_id',$ob->id)->where('e.kind','open')->first():null; + if(!$ob||!$open)throw new \DomainException('Conferência financeira de abertura pendente; não presumir dívida aprovada.'); + $origin=json_decode($ob->data,true)['origin']??[]; + if(($origin['invoice_id']??null)!==$id||!hash_equals($origin['snapshot_sha256']??'',hash('sha256',$row->snapshot))||(int)$open->actor_id===(int)$ob->actor_id)throw new \DomainException('Abertura ou fotografia documental divergente.'); + $calc=$snapshot['calculation'];$amount=$this->minor($calc['total_document_proposed']); + if($this->minor($ob->amount)!==$amount||$this->minor($open->amount)!==$amount)throw new \DomainException('Principal não coincide com o documento.'); + return ['effect_type'=>'sales.invoice','origin_key'=>$this->hash(['scope'=>$scope,'invoice'=>$id,'series'=>$row->series_code,'number'=>$row->number]),'source_id'=>$id,'invoice_id'=>$id,'obligation_id'=>(int)$ob->id,'recognition_revision'=>$this->hash(['invoice_snapshot'=>$snapshot,'pdf_sha256'=>$row->pdf_sha256,'opening'=>(array)$open,'obligation'=>(array)$ob]),'principal_minor'=>$amount,'amount_minor'=>$amount,'base_minor'=>$this->minor($calc['base_exact']),'tax_minor'=>$this->minor($calc['vat_document_proposed']),'currency'=>'MZN','compatible'=>true,'history_imported'=>false,'due_on'=>json_decode($ob->data,true)['due_date']??null,'document_revision'=>hash('sha256',$row->snapshot),'document_snapshot'=>$snapshot,'opening_effect_id'=>$open->id]; + } + public function source(User $u,string $kind,int $id):array + { + $scope=$this->scope($u);if($kind==='sales.invoice')return $this->invoice($u,$scope,$id); + $expected=match($kind){'receivable.allocated'=>'allocate','receivable.reversed'=>'reverse_allocation',default=>throw new \DomainException('Efeito comercial não suportado.')}; + $e=$this->effectQuery($scope)->where('e.id',$id)->where('e.kind',$expected)->first()??throw new \DomainException('Afectação/reversão confirmada fora do âmbito.'); + $ob=DB::table('sr_records')->where($scope)->where('id',$e->obligation_id)->where('kind','obligation')->first()??throw new \DomainException('Obrigação a receber indisponível.'); + $base=$this->invoice($u,$scope,(int)$ob->invoice_id); + $receipt=DB::table('sr_records')->where($scope)->where('id',$e->receipt_id)->where(['kind'=>'receipt','obligation_id'=>$ob->id,'invoice_id'=>$ob->invoice_id])->first(); + $confirmation=$receipt?$this->effectQuery($scope)->where('e.record_id',$receipt->id)->where('e.kind','receipt_confirm')->first():null; + if(!$receipt||!$confirmation||$receipt->actor_id===$confirmation->actor_id)throw new \DomainException('Recebimento não confirmado independentemente.'); + if(!DB::table('gl_journals')->where($scope)->where('snapshot->source->effect_type','sales.invoice')->where('snapshot->source->source_id',(int)$ob->invoice_id)->exists())throw new \DomainException('Contabilize primeiro a factura original.'); + if($kind==='receivable.reversed'){ + $target=$this->effectQuery($scope)->where('e.id',$e->target_effect_id)->where('e.kind','allocate')->where('e.obligation_id',$ob->id)->first(); + if(!$target||$target->amount!==$e->amount||!DB::table('gl_journals')->where($scope)->where('snapshot->source->effect_type','receivable.allocated')->where('snapshot->source->source_id',(int)$target->id)->exists())throw new \DomainException('Reversão exige a afectação original contabilizada integralmente.'); + } + return array_replace($base,['effect_type'=>$kind,'source_id'=>$id,'amount_minor'=>$this->minor($e->amount),'tax_minor'=>0,'invoice_tax_minor'=>$base['tax_minor'],'recognition_revision'=>$this->hash(['invoice'=>$base['recognition_revision'],'effect'=>(array)$e,'receipt'=>(array)$receipt,'confirmation'=>(array)$confirmation]),'financial_effect'=>(array)$e,'receipt_confirmation_id'=>$confirmation->id]); + } + public function period(User $u,array $period):array + { + $scope=$this->scope($u);$h=hash_init('sha256');$facts=0;$pending=0; + foreach(DB::table('si_invoices')->where($scope)->orderBy('id')->cursor() as $i){$facts++;hash_update($h,$i->snapshot);hash_update($h,$i->pdf_sha256);if(!DB::table('gl_journals')->where($scope)->where('snapshot->source->effect_type','sales.invoice')->where('snapshot->source->source_id',(int)$i->id)->exists())$pending++;} + foreach(DB::table('sr_records')->where($scope)->orderBy('id')->cursor() as $r){hash_update($h,Payables::canonical((array)$r));if(!$this->effectQuery($scope)->where('e.record_id',$r->id)->where('e.kind','<>','allocate')->exists())$pending++;} + foreach($this->effectQuery($scope)->orderBy('e.id')->cursor() as $e){$facts++;hash_update($h,Payables::canonical((array)$e)); + if(in_array($e->kind,['allocate','reverse_allocation'],true)){if(!DB::table('gl_journals')->where($scope)->where('snapshot->source->effect_type',$e->kind==='allocate'?'receivable.allocated':'receivable.reversed')->where('snapshot->source->source_id',(int)$e->id)->exists())$pending++;} + elseif(!in_array($e->kind,['open','receipt_confirm','refused'],true))$pending++; // Unsupported financial changes are visible blockers, never ignored. + } + return ['facts'=>$facts,'pending'=>$pending,'hash'=>hash_final($h)]; + } + public function workspace(User $u,?int $invoice,int $page=1):array + { + $scope=$this->scope($u);$p=\App\Shared\Context\ModuleRecords::query('si_invoices')->where($scope)->orderByDesc('id')->paginate(25,['id','series_code','number','issued_at'],'page',$page); + $data=['scope'=>$scope,'invoices'=>$p->items(),'pagination'=>['page'=>$page,'last_page'=>$p->lastPage(),'total'=>$p->total()],'invoice'=>null];if($invoice===null)return $data; + $data['invoice']=app(ServiceInvoicing::class)->show($invoice,$u->id); + $row=DB::table('si_invoices')->where($scope)->where('id',$invoice)->first()??abort(403); + $records=DB::table('sr_records')->where($scope)->where('invoice_id',$invoice)->orderByDesc('id')->paginate(25,['*'],'records_page',$page);$data['records']=$records->items();$data['records_pagination']=['page'=>$page,'last_page'=>$records->lastPage(),'total'=>$records->total()]; + $decisions=$this->effectQuery($scope)->whereIn('e.record_id',array_column($records->items(),'id'))->where('e.kind','<>','allocate')->get()->keyBy('record_id');foreach($data['records'] as $r){$r->decision_kind=$decisions->get($r->id)?->kind;$r->decision_id=$decisions->get($r->id)?->id;} + $ob=DB::table('sr_records')->where($scope)->where(['invoice_id'=>$invoice,'kind'=>'obligation'])->first();$data['obligation_id']=$ob?->id; + $data['position']=$ob?app(ServiceReceivables::class)->position($ob->id,$u->id):null; + if($data['position']){unset($data['position']['effects']);$data['position']['receipts']=array_intersect_key($data['position']['receipts'],array_fill_keys(array_column($records->items(),'id'),true));} + $effects=$this->effectQuery($scope)->where('r.invoice_id',$invoice)->orderByDesc('e.id')->paginate(25,['e.*'],'effects_page',$page);$data['effects']=$effects->items();$data['effects_pagination']=['page'=>$page,'last_page'=>$effects->lastPage(),'total'=>$effects->total()]; + $data['finance_permissions']=[];foreach(['prepare','confirm','allocate','correction_request','correction_approve'] as $a)$data['finance_permissions'][$a]=app(Permissions::class)->has($u->id,$scope['tenant_id'],$scope['company_id'],'service_receivables.'.$a,$scope['unit_id']); + return $data; + } +} diff --git a/app/Modules/Accounting/StockValuationRead.php b/app/Modules/Accounting/StockValuationRead.php new file mode 100644 index 0000000..18ed5d0 --- /dev/null +++ b/app/Modules/Accounting/StockValuationRead.php @@ -0,0 +1,49 @@ +validate(['page'=>'sometimes|integer|min:1|max:100000','per_page'=>'sometimes|integer|in:25,100']);abort_if(array_diff(array_keys($r->query()),array_keys($d))!==[],422); + $s=$context->identifiers();$unit=$context->unitId();abort_unless($unit,403); + foreach(['stock.view','general_ledger.view']as$p)$permissions->require($context->userId(),$s['tenant_id'],$s['company_id'],$p,$unit); + $binding=config('stock_ledger.read_sources.'.$s['tenant_id'].':'.$s['company_id'].':'.$unit); + if(!$binding)return response()->json(['status'=>'unavailable','message'=>'Livro de valorização autorizado ainda não ligado a este contexto.'],503)->header('Cache-Control','no-store'); + abort_unless(app()->environment('budget-testing'),403); + $host=DB::connection();$h=$host->getConfig();$run=(string)getenv('SGF_ISOLATED_REGRESSION_RUN'); + abort_unless(preg_match('/^[a-f0-9]{12}$/D',$run)&&($h['driver']??null)==='pgsql'&&($h['host']??null)==='127.0.0.1'&&(string)($h['port']??'')==='55439'&&preg_match('/^budget_core_sgf_([a-f0-9]{12})$/D',$h['database']??'',$hm)&&($h['username']??null)==='stock_ledger_sgf_'.$hm[1]&&empty($h['url'])&&empty($h['read'])&&empty($h['write']),403); + $hi=$host->selectOne("SELECT current_database() db,current_user role,current_setting('cluster_name') cluster");abort_unless($hi->db===$h['database']&&$hi->role===$h['username']&&$hi->cluster==='sgf_modular_regression_'.$run,403); + abort_unless(($binding['connection']??null)==='stock_valuation_source'&&is_int($binding['book_id']??null)&&($binding['book_id']??0)>0,503); + $c=DB::connection('stock_valuation_source');$cfg=$c->getConfig(); + abort_unless(($cfg['driver']??null)==='pgsql'&&($cfg['host']??null)==='127.0.0.1'&&(string)($cfg['port']??'')==='55439'&&preg_match('/^compras_receipts_test_([a-f0-9]{12})$/D',$cfg['database']??'',$m)&&($cfg['username']??null)==='stock_valuation_read_'.$m[1]&&empty($cfg['url'])&&empty($cfg['read'])&&empty($cfg['write'])&&($cfg['search_path']??'public')==='public',403); + $native=$binding['native_scope']??[];abort_unless(array_keys($native)===['tenant_id','company_id','unit_id']&&is_int($native['tenant_id'])&&$native['tenant_id']>0&&$native['company_id']===0&&$native['unit_id']===0,503); + try{$data=$c->transaction(function()use($c,$cfg,$run,$native,$binding,$d){ + abort_unless($c->transactionLevel()===1,503);$c->statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY'); + $i=$c->selectOne("SELECT current_database() db,current_user role,current_setting('cluster_name') cluster,current_setting('default_transaction_read_only') ro,rolsuper OR rolcreatedb OR rolcreaterole OR rolreplication OR rolbypassrls elevated FROM pg_roles WHERE rolname=current_user"); + abort_unless($i->db===$cfg['database']&&$i->role===$cfg['username']&&$i->cluster==='sgf_modular_regression_'.$run&&$i->ro==='on'&&!$i->elevated,403); + foreach(['stock_movements','gl_journals','gl_lines','gl_stock_rates','gl_stock_books']as$table)abort_if($c->selectOne("SELECT has_table_privilege(current_user,?,'INSERT,UPDATE,DELETE') writes",[$table])->writes,403); + $book=$c->table('gl_stock_books')->where($native)->where('id',$binding['book_id'])->first();abort_unless($book,503,'Livro composto incompatível.'); + abort_unless($c->table('stock_items')->where(['tenant_id'=>$native['tenant_id'],'id'=>$book->stock_item_id,'unit'=>$book->unit_code])->exists() + &&$c->table('warehouses')->where(['tenant_id'=>$native['tenant_id'],'id'=>$book->warehouse_id])->exists(),503,'Artigo/armazém/unidade da origem incompatíveis.'); + $page=(int)($d['page']??1);$size=(int)($d['per_page']??25); + $physical=$c->table('stock_movements')->where(['tenant_id'=>$native['tenant_id'],'stock_item_id'=>$book->stock_item_id,'warehouse_id'=>$book->warehouse_id]); + $journals=$c->table('gl_journals')->where($native)->where('snapshot->source->stock_book_id',$book->id);$count=(clone$journals)->count(); + $rows=(clone$journals)->orderBy('id')->offset(($page-1)*$size)->limit($size)->get();$ids=$rows->pluck('id')->all();$lines=$c->table('gl_lines')->where($native)->whereIn('journal_id',$ids)->orderBy('journal_id')->orderBy('line_no')->get(); + $postedIds=(clone$journals)->selectRaw("(snapshot->'source'->>'stock_movement_id')::bigint"); + $unposted=(clone$physical)->whereNotIn('id',$postedIds)->count(); + $rate=$c->table('gl_stock_rates')->where($native)->where('book_id',$book->id)->orderByDesc('version')->first();$review=$rate?$c->table('gl_stock_rate_reviews')->where($native)->where('rate_id',$rate->id)->first():null; + $stale=$rate?(clone$journals)->where('snapshot->source->stock_rate_id','<>',$rate->id)->count():$count; + $net=$c->table('gl_lines as l')->join('gl_accounts as a','a.id','=','l.account_id')->where(['l.tenant_id'=>$native['tenant_id'],'l.company_id'=>0,'l.unit_id'=>0,'a.code'=>'QA-STOCK'])->whereIn('l.journal_id',(clone$journals)->select('id'))->selectRaw('coalesce(sum(l.debit_minor-l.credit_minor),0) net')->first(); + return ['synthetic_only'=>true,'single_canonical_book'=>true,'status'=>$rate&&$review&&$review->decision==='approved'&&$unposted===0&&$stale===0?'reconciled':'pending','reconciliation_scope'=>'physical_movement_coverage_and_rate_ids_only','current_source_dependencies_validated'=>false,'book'=>['id'=>$book->id,'stock_item_id'=>$book->stock_item_id,'warehouse_id'=>$book->warehouse_id,'unit'=>$book->unit_code,'period_key'=>$book->period_key],'physical_quantity_milli'=>(int)(clone$physical)->sum('quantity_milli'),'physical_revision'=>(int)(clone$physical)->max('id'),'posted_stock_value_minor'=>(int)$net->net,'currency'=>'MZN','unposted_movements'=>$unposted,'stale_rate_journals'=>$stale,'journals'=>$rows->all(),'lines'=>$lines->all(),'pagination'=>['page'=>$page,'per_page'=>$size,'total'=>$count],'source_identity'=>['database'=>$i->db,'role'=>$i->role],'operation_executed'=>false]; + });}catch(\PDOException $e){$state=$e->errorInfo[0]??$e->getCode();if(str_starts_with((string)$state,'08')||in_array($state,['28P01','3D000','42P01','42703','57014'],true))return response()->json(['status'=>'unavailable','message'=>'Livro de valorização indisponível ou incompatível.'],503)->header('Cache-Control','no-store');throw$e;} + if($r->is('api/*'))return response()->json($data)->header('Cache-Control','no-store'); + return response()->view('accounting.stock-valuation-read',['data'=>$data])->header('Cache-Control','no-store'); + } +} diff --git a/app/Modules/Identity/Http/RequireCompanyContext.php b/app/Modules/Identity/Http/RequireCompanyContext.php index a229379..a6be762 100644 --- a/app/Modules/Identity/Http/RequireCompanyContext.php +++ b/app/Modules/Identity/Http/RequireCompanyContext.php @@ -27,7 +27,7 @@ final class RequireCompanyContext app(\App\Shared\Context\RequireModuleContext::class)->check($request, $this->context); $response = $next($request); - if ($request->isMethod('GET') && in_array($request->path(), ['supplier-payables','supplier-payments'], true) && $response->isSuccessful()) { + if ($request->isMethod('GET') && in_array($request->path(), ['supplier-payables','supplier-payments','purchasing/internal-requisitions'], true) && $response->isSuccessful()) { $bar = ''; $response->setContent(preg_replace('/(]*>)/i', '$1'.$bar, $response->getContent(), 1)); } diff --git a/app/Modules/Identity/Services/IdentityWorkflow.php b/app/Modules/Identity/Services/IdentityWorkflow.php index 581bc65..d1fe61d 100644 --- a/app/Modules/Identity/Services/IdentityWorkflow.php +++ b/app/Modules/Identity/Services/IdentityWorkflow.php @@ -45,7 +45,20 @@ final class IdentityWorkflow $result['context'] = ['company' => $company, 'unit' => $unit, 'units' => $this->units($user->id, $company->tenant_id, $company->id), 'token' => $selected['token'], 'grants' => $grants, 'modules' => app(\App\Shared\Context\ModuleNavigation::class)->available($this->context), - 'module_id' => $selected['module_id'] ?? null]; + 'module_id' => $selected['module_id'] ?? null, + 'geography_enabled'=>app()->environment('budget-testing')&&config('geography.enabled')===true, + 'stock'=>['period_report'=>app()->environment('budget-testing')&&config('receipt_qa.stock_read_enabled')===true&&config('receipt_qa.stock_period_enabled')===true], + 'purchasing' => ['internal_requisitions' => app()->environment('budget-testing') + && config('internal_requisitions.qa_enabled') === true, + 'receipts'=>app()->environment('budget-testing')&&config('receipt_qa.enabled')===true, + 'orders'=>app()->environment('budget-testing')&&config('receipt_qa.enabled')===true&&config('receipt_qa.orders_enabled')===true, + 'supplier_obligations'=>app()->environment('budget-testing')&&config('receipt_qa.enabled')===true&&config('receipt_qa.obligations_enabled')===true, + 'supplier_invoices'=>app()->environment('budget-testing')&&config('receipt_qa.enabled')===true&&config('receipt_qa.invoices_enabled')===true, + 'source_requests'=>app()->environment('budget-testing')&&config('receipt_qa.enabled')===true&&config('receipt_qa.requests_enabled')===true, + 'suppliers'=>app()->environment('budget-testing')&&config('receipt_qa.enabled')===true&&config('receipt_qa.suppliers_enabled')===true, + 'sourcing'=>app()->environment('budget-testing')&&config('receipt_qa.enabled')===true&&config('receipt_qa.sourcing_enabled')===true], + 'accounting' => ['stock_valuation_read' => app()->environment('budget-testing') + && config('stock_ledger.read_sources.'.$selected['tenant_id'].':'.$selected['company_id'].':'.($selected['unit_id']??'')) !== null]]; if ($result['context']['module_id'] && !in_array($result['context']['module_id'], array_column($result['context']['modules'], 'id'), true)) { $result['context']['module_id'] = null; $result['context']['token'] = bin2hex(random_bytes(24)); diff --git a/app/Modules/Industry/IndustrialCosts.php b/app/Modules/Industry/IndustrialCosts.php index 2e70bb7..89d276a 100644 --- a/app/Modules/Industry/IndustrialCosts.php +++ b/app/Modules/Industry/IndustrialCosts.php @@ -119,6 +119,12 @@ final class IndustrialCosts { $id=DB::table('ic_decisions')->insertGetId([$field=>$r->id,'version'=>$r->version,'decision'=>$d['decision'],'reason'=>$d['reason'],'actor_id'=>$actor,'created_at'=>now()]);return ['id'=>$id,'lot_id'=>$lot,'version'=>$r->version,'kind'=>'decision']; }); } + /** Current owner conference for one lot; no listing universe or writer lock. */ + public function conference(int $lot,int $actor):array { + self::guard();$s=$this->scope($actor,'view');$l=$this->lot($lot,$s);$r=DB::table('ic_results')->where($s)->where('lot_id',$lot)->orderByDesc('version')->first();$snapshot=$r?json_decode($r->snapshot,true,64,JSON_THROW_ON_ERROR):null; + $ids=array_column(array_filter($snapshot['refs']??[]),'id');$inputs=DB::table('ic_inputs')->where($s)->where('lot_id',$lot)->whereIn('id',$ids)->orderBy('id')->get();$decisions=DB::table('ic_decisions')->whereIn('input_id',$ids)->orderBy('id')->get();$decision=$r?DB::table('ic_decisions')->where('result_id',$r->id)->first():null; + return ['lot'=>(array)$l,'product'=>(array)DB::table('ic_products')->where($s)->where('id',$l->product_id)->first(),'result'=>$r?(array)$r:null,'snapshot'=>$snapshot,'decision'=>$decision?(array)$decision:null,'current'=>$r?$this->resultCurrent($r):false,'inputs'=>$inputs->map(fn($i)=>(array)$i)->all(),'input_decisions'=>$decisions->map(fn($i)=>(array)$i)->all()]; + } public function listing(int $actor): array { $s=$this->scope($actor,'view');if(!ServiceCalculation::isolated())return ['blocked'=>true,'lots'=>[],'notice'=>self::NOTICE];self::guard(); return DB::transaction(function()use($s){ diff --git a/app/Modules/Inventory/CompositionStockRead.php b/app/Modules/Inventory/CompositionStockRead.php new file mode 100644 index 0000000..6872e17 --- /dev/null +++ b/app/Modules/Inventory/CompositionStockRead.php @@ -0,0 +1,88 @@ +environment('budget-testing'),403); + BudgetAdapter::guard(); + $d=$r->validate(['view'=>'sometimes|in:items,warehouses,balances,movements,period','search'=>'nullable|string|max:100', + 'warehouse_id'=>'sometimes|integer|min:1','page'=>'sometimes|integer|min:1|max:100000', + 'per_page'=>'sometimes|integer|in:25,100','snapshot'=>'sometimes|string|max:8192', + 'from'=>'required_if:view,period|prohibited_unless:view,period|date_format:Y-m-d|after_or_equal:1900-01-01|before_or_equal:9998-12-31', + 'to'=>'required_if:view,period|prohibited_unless:view,period|date_format:Y-m-d|after_or_equal:from|before_or_equal:9998-12-31']); + abort_if(array_diff(array_keys($r->query()),array_keys($d))!==[],422); + $filters=['view'=>$d['view']??'balances','search'=>$d['search']??'', + 'warehouse_id'=>isset($d['warehouse_id'])?(int)$d['warehouse_id']:null,'page'=>(int)($d['page']??1),'per_page'=>(int)($d['per_page']??25)]; + if($filters['view']==='period'){ + abort_unless(config('receipt_qa.stock_period_enabled')===true,404); + $filters+=['from'=>$d['from'],'to'=>$d['to']]; + }else abort_if(array_key_exists('from',$d)||array_key_exists('to',$d),422); + $host=DB::connection();$c=$host->getConfig();$run=(string)getenv('SGF_ISOLATED_REGRESSION_RUN'); + abort_unless(preg_match('/^budget_core_sgf_([a-f0-9]{12})$/D',$host->getDatabaseName(),$m) + &&($c['username']??null)==='ir_composition_'.$m[1]&&preg_match('/^[a-f0-9]{12}$/D',$run) + &&($c['host']??null)==='127.0.0.1'&&(int)($c['port']??0)===55439&&empty($c['url'])&&empty($c['read'])&&empty($c['write'])&&($c['search_path']??'public')==='public',403); + $identity=$host->selectOne("SELECT current_database() db,current_user role,current_setting('cluster_name') cluster,rolsuper OR rolcreatedb OR rolcreaterole OR rolreplication OR rolbypassrls elevated FROM pg_roles WHERE rolname=current_user"); + abort_unless(!$identity->elevated&&$identity->db===$host->getDatabaseName()&&$identity->role===$c['username']&&$identity->cluster==='sgf_modular_regression_'.$run,403); + $scope=$context->identifiers();$unit=$context->unitId();$user=$context->userId(); + abort_unless($unit&&$r->user()&&(int)$r->user()->id===$user,403); + // Hold only shared host authority locks. Unrelated readers remain concurrent. + try { + return $host->transaction(function()use($host,$scope,$unit,$user,$permissions,$m,$run,$r,$filters,$d){ + $host->statement("SET LOCAL lock_timeout='2s'"); + $host->statement("SET LOCAL statement_timeout='3s'"); + abort_unless($host->table('users')->where('id',$user)->sharedLock()->first(),403); + abort_unless($host->table('company_memberships')->where($scope+['user_id'=>$user])->sharedLock()->first(),403); + foreach(['company.view'=>null,'unit.view'=>$unit,'stock.view'=>$unit]as$right=>$u){ + abort_unless($host->table('permission_grants')->where($scope+['user_id'=>$user,'unit_id'=>$u,'permission'=>$right])->sharedLock()->first(),403); + $permissions->require($user,$scope['tenant_id'],$scope['company_id'],$right,$u); + } + $root='C:/laragon/data/sgf-tempo/run/modular-regression-'.$run.'/private/receipt-composition-'.$m[1]; + $profile=realpath($root.'/stock-binding.json'); + abort_unless($profile&&!is_link($root.'/stock-binding.json')&&strtolower(str_replace('\\','/',$profile))===strtolower($root.'/stock-binding.json'),503,'Fonte de stock indisponível.'); + $p=json_decode(file_get_contents($profile),true,32,JSON_THROW_ON_ERROR); + $key=implode(':',[$scope['tenant_id'],$scope['company_id'],$unit,$user]); + $binding=$p['bindings'][$key]??null;abort_unless(is_array($binding),403); + abort_unless(is_int($binding['source_tenant_id']??null)&&$binding['source_tenant_id']>0 + &&is_array($binding['warehouse_ids']??null)&&count($binding['warehouse_ids'])>0&&count($binding['warehouse_ids'])<=1000 + &&!array_filter($binding['warehouse_ids'],fn($id)=>!is_int($id)||$id<1),503,'Fonte de stock incompatível.'); + $c=$p['connection']??[]; + abort_unless(($c['driver']??null)==='pgsql'&&($c['host']??null)==='127.0.0.1'&&(int)($c['port']??0)===55439 + &&($c['database']??null)==='compras_receipts_test_'.$m[1]&&($c['username']??null)==='stock_receipt_read_'.$m[1] + &&empty($c['url'])&&empty($c['read'])&&empty($c['write'])&&($c['search_path']??null)==='public',403); + // Purge avoids retaining an earlier profile/credential after a configuration change. + DB::purge('composition_stock');config(['database.connections.composition_stock'=>$c]);$source=DB::connection('composition_stock'); + $i=$source->selectOne("SELECT current_database() db,current_user role,current_setting('cluster_name') cluster,current_setting('default_transaction_read_only') read_only,rolsuper OR rolcreatedb OR rolcreaterole OR rolreplication OR rolbypassrls elevated FROM pg_roles WHERE rolname=current_user"); + abort_unless(!$i->elevated&&$i->db===$c['database']&&$i->role===$c['username']&&$i->cluster==='sgf_modular_regression_'.$run&&$i->read_only==='on',403); + $rights=$source->selectOne("SELECT EXISTS(SELECT FROM pg_tables WHERE schemaname='public' AND (has_table_privilege(current_user,quote_ident(schemaname)||'.'||quote_ident(tablename),'INSERT,UPDATE,DELETE,TRUNCATE,REFERENCES,TRIGGER') OR (tablename NOT IN ('stock_items','warehouses','stock_movements') AND has_table_privilege(current_user,quote_ident(schemaname)||'.'||quote_ident(tablename),'SELECT')))) forbidden, + EXISTS(SELECT FROM pg_trigger WHERE tgrelid='public.stock_movements'::regclass AND tgname='composition_stock_append_only' AND tgenabled='O' AND NOT tgisinternal AND (tgtype::int & 26)=26) append_only"); + abort_if($rights->forbidden,403);abort_unless($rights->append_only,503,'Fonte de stock incompatível.'); + abort_unless(($binding['schema']??null)==='public'&&($binding['append_only']??false)===true,503); + if($filters['warehouse_id']!==null)abort_unless(in_array($filters['warehouse_id'],$binding['warehouse_ids'],true),403); + $binding['physical_source']=[$i->db,$i->role,$i->cluster]; + $fingerprint=hash('sha256',json_encode([$scope,$unit,$user,$r->session()->get('company_context.token'),$binding,array_diff_key($filters,['page'=>true])],JSON_THROW_ON_ERROR)); + $result=$filters['view']==='period' + ?(new StockPeriodReport($source))->read($binding,$fingerprint,$filters,$d['snapshot']??null) + :(new \Tempo\Inventory\InventoryReadSession($source))->read($binding,$fingerprint,$filters,$d['snapshot']??null); + $result['capabilities']['receipt_trace']=config('receipt_qa.stock_trace_enabled')===true + &&$permissions->has($user,$scope['tenant_id'],$scope['company_id'],'purchasing_receipts.view',$unit); + return response()->json($result)->header('Cache-Control','no-store'); + }); + }catch(\PDOException $e){ + $state=$e->errorInfo[0]??(string)$e->getCode(); + if(!str_starts_with($state,'08')&&!in_array($state,['28P01','3D000','42P01','42703','42883','55P03','57014'],true))throw $e; + return response()->json(['status'=>'unavailable','message'=>'A fonte de stock está indisponível ou incompatível. Actualize a consulta mais tarde.'],503)->header('Cache-Control','no-store'); + } + } +} diff --git a/app/Modules/Inventory/StockPeriodReport.php b/app/Modules/Inventory/StockPeriodReport.php new file mode 100644 index 0000000..45bef99 --- /dev/null +++ b/app/Modules/Inventory/StockPeriodReport.php @@ -0,0 +1,54 @@ +db->transaction(function()use($binding,$fingerprint,$filters,$token){ + abort_unless($this->db->transactionLevel()===1,503); + $this->db->statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ ONLY'); + $this->db->statement("SET LOCAL statement_timeout='3s'"); + $reader=new \Tempo\Inventory\InventoryReader($this->db,$binding['schema'],$binding['source_tenant_id'],$binding['warehouse_ids']); + try{$revision=$reader->revision();}catch(\UnexpectedValueException){abort(503,'Fonte de stock incompatível.');} + $observed=time(); + if($token!==null){ + try{$cut=json_decode(Crypt::decryptString($token),true,32,JSON_THROW_ON_ERROR);}catch(\Throwable){abort(409,'Referência de relatório inválida. Actualize a consulta.');} + abort_unless(($cut['fingerprint']??null)===$fingerprint&&($cut['revision']??null)===$revision + &&is_int($cut['observed']??null)&&$cut['observed']<=time()&&$cut['observed']>=time()-600,409,'A fonte ou o contexto mudou. Actualize o relatório.'); + $observed=$cut['observed']; + } + $from=$filters['from'].' 00:00:00'; + $until=(new \DateTimeImmutable($filters['to'],new \DateTimeZone('UTC')))->modify('+1 day')->format('Y-m-d').' 00:00:00'; + $q=$this->db->table('public.stock_movements AS m') + ->join('public.stock_items AS i',fn($j)=>$j->on('i.id','=','m.stock_item_id')->on('i.tenant_id','=','m.tenant_id')) + ->join('public.warehouses AS w',fn($j)=>$j->on('w.id','=','m.warehouse_id')->on('w.tenant_id','=','m.tenant_id')) + ->where('m.tenant_id',$binding['source_tenant_id'])->whereIn('m.warehouse_id',$binding['warehouse_ids'])->where('m.moved_at','<',$until); + if($filters['warehouse_id']!==null)$q->where('m.warehouse_id',$filters['warehouse_id']); + if($filters['search']!==''){ + $literal='%'.str_replace(['\\','%','_'],['\\\\','\\%','\\_'],$filters['search']).'%'; + $q->where(fn($s)=>$s->where('i.code','ilike',$literal)->orWhere('i.name','ilike',$literal)); + } + $q->select(['m.stock_item_id','m.warehouse_id','i.code','i.name','i.unit','w.code AS warehouse_code','w.name AS warehouse_name']) + ->selectRaw('SUM(CASE WHEN m.moved_at < ? THEN m.quantity_milli::numeric ELSE 0 END)::text AS opening_milli',[$from]) + ->selectRaw('SUM(CASE WHEN m.moved_at >= ? AND m.quantity_milli > 0 THEN m.quantity_milli::numeric ELSE 0 END)::text AS incoming_milli',[$from]) + ->selectRaw('SUM(CASE WHEN m.moved_at >= ? AND m.quantity_milli < 0 THEN -m.quantity_milli::numeric ELSE 0 END)::text AS outgoing_milli',[$from]) + ->selectRaw('SUM(m.quantity_milli)::text AS closing_milli') + ->selectRaw('COUNT(*) FILTER (WHERE m.moved_at >= ?)::text AS period_movements',[$from]) + ->groupBy('m.stock_item_id','m.warehouse_id','i.code','i.name','i.unit','w.code','w.name') + ->orderBy('m.stock_item_id')->orderBy('m.warehouse_id'); + $total=(int)$this->db->query()->fromSub((clone $q)->reorder(),'stock_period_pairs')->count(); + $rows=$q->limit($filters['per_page'])->offset(($filters['page']-1)*$filters['per_page'])->get()->map(fn($r)=>(array)$r)->all(); + return ['status'=>'available','synthetic_only'=>true,'report'=>'physical_period','period'=>['from'=>$filters['from'],'to'=>$filters['to'],'timezone'=>'UTC','basis'=>'registration_time'], + 'rows'=>$rows,'pagination'=>['total'=>$total,'page'=>$filters['page'],'per_page'=>$filters['per_page'],'last_page'=>max(1,(int)ceil($total/$filters['per_page']))], + 'observed_at'=>gmdate('c',$observed),'snapshot'=>Crypt::encryptString(json_encode(['fingerprint'=>$fingerprint,'revision'=>$revision,'observed'=>$observed],JSON_THROW_ON_ERROR)), + 'ledger_revision'=>$revision,'capabilities'=>['write'=>false,'valuation'=>false,'reserved'=>false,'blocked'=>false], + 'notice'=>'Quantidades por data de registo UTC; designações actuais. Não há total somado entre unidades diferentes. Sem valorização, reservas ou disponibilidade. Pares sem história até ao fecho não são saldos zero.']; + }); + } +} diff --git a/app/Modules/Inventory/StockReadController.php b/app/Modules/Inventory/StockReadController.php index 4830e8b..0168249 100644 --- a/app/Modules/Inventory/StockReadController.php +++ b/app/Modules/Inventory/StockReadController.php @@ -14,6 +14,9 @@ final class StockReadController { public function index(Request $r, CompanyContext $context, Permissions $permissions) { + if (config('receipt_qa.stock_read_enabled') === true) { + return app(CompositionStockRead::class)->index($r, $context, $permissions); + } $d = $r->validate(['view' => 'sometimes|in:items,warehouses,balances,movements','search' => 'nullable|string|max:100', 'warehouse_id' => 'sometimes|integer|min:1','page' => 'sometimes|integer|min:1|max:100000','per_page' => 'sometimes|integer|min:1|max:100', 'snapshot' => 'sometimes|string|max:8192']); diff --git a/app/Modules/Purchasing/DossierController.php b/app/Modules/Purchasing/DossierController.php new file mode 100644 index 0000000..32fd7da --- /dev/null +++ b/app/Modules/Purchasing/DossierController.php @@ -0,0 +1,58 @@ +hasFunctions(['requester','procurement','finance','department_head'])&&RequisitionAccess::allowed($id,$binding),403); + return Requisition::visibleTo($actor)->find($id)??abort(403,'Requisição fora do contexto autorizado.'); + } + private function page($query,array $columns,string $name,array $input):array { + $page=$query->orderBy('id')->paginate(25,$columns,$name,(int)($input[$name]??1)); + return ['accessible'=>true,'data'=>$page->items(),'pagination'=>['page'=>$page->currentPage(),'last_page'=>$page->lastPage(),'total'=>$page->total(),'per_page'=>25]]; + } + public function screen(Request $r,ReceiptRuntime $runtime) { + $this->guard();$runtime->run('purchasing_requests.view',function($a){abort_unless($a->hasFunctions(['requester','procurement','finance','department_head']),403);}); + return response()->view('purchasing-dossier',['context'=>$r->session()->get('company_context.token')]); + } + public function index(Request $r,ReceiptRuntime $runtime) { + $this->guard();$d=$r->validate(['page'=>'sometimes|integer|min:1|max:10000','status'=>'sometimes|in:draft,pending,approved,rejected','search'=>'sometimes|string|max:100']);abort_if(array_diff(array_keys($r->query()),array_keys($d)),422); + return $runtime->run('purchasing_requests.view',function($a,$b)use($d){abort_unless($a->hasFunctions(['requester','procurement','finance','department_head']),403);$q=Requisition::visibleTo($a)->whereIn('id',RequisitionAccess::ids($b));if(isset($d['status']))$q->where('status',$d['status']);if(isset($d['search']))$q->whereRaw('position(lower(?) in lower(number))>0',[$d['search']]);return response()->json($q->orderBy('id')->paginate(25,['id','number','status','process_version'],'page',(int)($d['page']??1)))->header('Cache-Control','no-store');}); + } + public function show(int $id,Request $r,ReceiptRuntime $runtime) { + $this->guard();$rules=[];foreach(['quotes','awards','orders','receipts','invoices','obligations','events']as$key)$rules[$key.'_page']='sometimes|integer|min:1|max:10000';$d=$r->validate($rules);abort_if(array_diff(array_keys($r->query()),array_keys($d)),422); + $host=DB::connection();$c=app(\App\Shared\Context\CompanyContext::class);$scope=$c->identifiers()+['unit_id'=>$c->unitId(),'user_id'=>$c->userId()]; + return $runtime->run('purchasing_requests.view',function($a,$b,$fingerprint)use($id,$d,$host,$scope){ + $request=$this->source($id,$b,$a);$allowed=[]; + foreach(['sourcing','orders','receipts','invoices','obligations']as$stage){$flag=$stage==='receipts'?'enabled':$stage.'_enabled';$allowed[$stage]=config('receipt_qa.'.$flag)===true&&$host->table('permission_grants')->where($scope)->where('permission','purchasing_'.$stage.'.view')->lockForUpdate()->first()!==null;} + $viewer=$a->hasFunctions(['admin','procurement','finance','department_head']);$finance=$a->hasFunctions(['admin','finance']);$allowed['sourcing']=$allowed['sourcing']&&$viewer;$allowed['orders']=$allowed['orders']&&$viewer;$allowed['receipts']=$allowed['receipts']&&Gate::allows('viewAny',GoodsReceipt::class);$allowed['invoices']=$allowed['invoices']&&$finance;$allowed['obligations']=$allowed['obligations']&&$finance; + $orders=fn()=>PurchaseOrder::where('tenant_id',$a->tenant_id)->where('requisition_id',$id)->select('id'); + $invoices=fn()=>Invoice::where('tenant_id',$a->tenant_id)->whereIn('purchase_order_id',$orders()); + $restricted=['accessible'=>false];$stages=['quotes'=>$restricted,'awards'=>$restricted,'orders'=>$restricted,'receipts'=>$restricted,'invoices'=>$restricted,'obligations'=>$restricted];$patterns=['requisition.%','sgf.request.command']; + if($allowed['sourcing']){$stages['quotes']=$this->page(Quotation::where('requisition_id',$id),['id','reference','supplier_id','total_minor','created_by','created_at'],'quotes_page',$d);$stages['awards']=$this->page(PurchaseAward::where('requisition_id',$id),['id','quotation_id','status','total_minor','created_by','created_at'],'awards_page',$d);array_push($patterns,'quotation.%','award.%','sgf.sourcing.command');} + if($allowed['orders']){$stages['orders']=$this->page(PurchaseOrder::visibleTo($a)->where('requisition_id',$id),['id','number','status','total_minor','issued_by','issued_at'],'orders_page',$d);array_push($patterns,'order.%','sgf.order.command');} + if($allowed['receipts']){$stages['receipts']=$this->page(GoodsReceipt::whereIn('purchase_order_id',$orders()),['id','number','purchase_order_id','status','received_on','received_by','confirmed_at'],'receipts_page',$d);array_push($patterns,'receipt.%','sgf.receipt.command','sgf.receipt.document','sgf.receipt.document_downloaded');} + if($allowed['invoices']){$stages['invoices']=$this->page($invoices(),['id','number','purchase_order_id','status','total_minor','created_by','validated_by','validated_at'],'invoices_page',$d);array_push($patterns,'invoice.%','sgf.invoice.command');} + if($allowed['obligations']){ + $service=app(SupplierPayables::class);$service->readContext($a); + // The window is on source invoices, not the complete financial universe. + $window=$invoices()->orderBy('id')->paginate(25,['id'],'obligations_page',(int)($d['obligations_page']??1)); + $positions=$service->engine($a)->positionsPage($window->getCollection()->pluck('id')->map(fn($v)=>(int)$v)->all()); + $stages['obligations']=['accessible'=>true,'data'=>$positions['obligations'],'pagination'=>['page'=>$window->currentPage(),'last_page'=>$window->lastPage(),'total_sources'=>$window->total(),'per_page'=>25],'source_window'=>true];$patterns[]='sgf.obligation.command'; + } + $events=AuditLog::where('requisition_id',$id)->where(function($q)use($patterns){foreach($patterns as$pattern)$q->orWhere('action','like',$pattern);});$history=$this->page($events,['id','user_id','action','created_at'],'events_page',$d); + $view=['request'=>$request->only(['id','number','status','process_version','requester_id','total_minor']),'stages'=>$stages,'events'=>$history,'read_only'=>true,'revision_scope'=>'visible_pages_only']; + $view=app(ProcessNavigation::class)->decorate($view,$allowed,$id); + $view['view_revision']=hash('sha256',Payables::canonical([$fingerprint,$view])); + return response()->json($view)->header('Cache-Control','no-store'); + }); + } +} diff --git a/app/Modules/Purchasing/InternalRequisitionQa.php b/app/Modules/Purchasing/InternalRequisitionQa.php new file mode 100644 index 0000000..46b0f01 --- /dev/null +++ b/app/Modules/Purchasing/InternalRequisitionQa.php @@ -0,0 +1,76 @@ + $hash) { + $file = realpath($root.'/'.$relative); + if ($file === false || ! str_starts_with(strtolower($file), strtolower($root.DIRECTORY_SEPARATOR)) + || ! is_file($file) || ! is_string($hash) || ! preg_match('/^[a-f0-9]{64}$/D', $hash) + || ! hash_equals($hash, hash_file('sha256', $file))) { + throw new LogicException('REQUISITION_QA_SOURCE_REFUSED'); + } + $part = $root; + foreach (explode('/', $relative) as $segment) { + $part .= '/'.$segment; + if (is_link($part)) throw new LogicException('REQUISITION_QA_LINK_REFUSED'); + } + } + return $root; + } + + public static function mount(): ?string + { + if (config('internal_requisitions.qa_enabled') !== true) return null; + if (! app()->environment('budget-testing')) throw new LogicException('REQUISITION_QA_ENVIRONMENT_REFUSED'); + $c = DB::connection(); $config = $c->getConfig(); + $run = (string) getenv('SGF_ISOLATED_REGRESSION_RUN'); + if (! preg_match('/^[a-f0-9]{12}$/D', $run) || ($config['driver'] ?? null) !== 'pgsql' + || ($config['host'] ?? null) !== '127.0.0.1' || (string) ($config['port'] ?? '') !== '55439' + || ! preg_match('/^budget_core_sgf_([a-f0-9]{12})$/D', $config['database'] ?? '', $m) + || ($config['username'] ?? null) !== 'ir_composition_'.$m[1] + || ! empty($config['url']) || ! empty($config['read']) || ! empty($config['write']) + || ($config['search_path'] ?? 'public') !== 'public') throw new LogicException('REQUISITION_QA_DATABASE_REFUSED'); + $identity = $c->selectOne("SELECT current_database() db,current_user role,current_setting('cluster_name') cluster, + rolsuper OR rolcreatedb OR rolcreaterole OR rolreplication OR rolbypassrls elevated FROM pg_roles WHERE rolname=current_user"); + if ($identity->db !== $config['database'] || $identity->role !== $config['username'] || $identity->elevated + || $identity->cluster !== 'sgf_modular_regression_'.$run) throw new LogicException('REQUISITION_QA_IDENTITY_REFUSED'); + $bundle = self::verifiedBundle((string) config('internal_requisitions.qa_bundle'), (string) config('internal_requisitions.qa_manifest_sha256')); + $expected = 'C:/laragon/data/sgf-tempo/run/modular-regression-'.$run.'/private/requisition-composition-'.$m[1].'/bundle'; + if (strtolower(str_replace('\\', '/', $bundle)) !== strtolower($expected)) throw new LogicException('REQUISITION_QA_LOCATION_REFUSED'); + require_once $bundle.'/integrations/sgf/internal-requisitions/bootstrap.php'; + return $bundle.'/integrations/sgf/internal-requisitions/routes.php'; + } +} diff --git a/app/Modules/Purchasing/InvoiceController.php b/app/Modules/Purchasing/InvoiceController.php new file mode 100644 index 0000000..d675758 --- /dev/null +++ b/app/Modules/Purchasing/InvoiceController.php @@ -0,0 +1,41 @@ +hasFunctions(['admin','finance']),403);} + private function hash(mixed $v):string{return hash('sha256',Payables::canonical([$v]));} + private function generation():string{return $this->hash(request()->session()->get('company_context'));} + private function order(int $id,array $b,object $a):PurchaseOrder{$this->viewer($a);$r=PurchaseOrder::visibleTo($a)->where('id',$id)->where(fn($q)=>$q->whereIn('id',$b['order_ids']??[])->orWhereIn('requisition_id',RequisitionAccess::ids($b)))->first();abort_unless($r,403,'Ordem fora da origem autorizada.');return $r;} + private function state(PurchaseOrder $order):array{ + $lines=$order->items()->orderBy('id')->get();$effects=[];foreach($lines as$line)$effects[]=['line'=>$line->id,'returned'=>app(InventoryDispositions::class)->returnedForOrderLine($line->id),'reversed'=>app(InventoryReversals::class)->voidedReceiptQuantity($line->id,'accepted_milli')]; + return ['supplier'=>\Tempo\Purchasing\Embedded\Models\Supplier::findOrFail($order->supplier_id)->toArray(),'request'=>\Tempo\Purchasing\Embedded\Models\Requisition::findOrFail($order->requisition_id)->load('steps')->toArray(),'conflicts'=>\Tempo\Purchasing\Embedded\Models\ConflictDeclaration::where(fn($q)=>$q->where('requisition_id',$order->requisition_id)->orWhere('supplier_id',$order->supplier_id))->orderBy('id')->get()->toArray(),'budgets'=>DB::table('budgets')->whereIn('id',DB::table('budget_entries')->where('requisition_id',$order->requisition_id)->select('budget_id'))->orderBy('id')->get()->map(fn($r)=>(array)$r)->all(),'order'=>$order->load('items')->toArray(),'receipts'=>DB::table('goods_receipt_items')->whereIn('purchase_order_item_id',$lines->pluck('id'))->orderBy('id')->get()->map(fn($r)=>(array)$r)->all(),'physical_corrections'=>$effects,'invoices'=>Invoice::where('purchase_order_id',$order->id)->with('items')->orderBy('id')->get()->toArray(),'budget_entries'=>DB::table('budget_entries')->where('requisition_id',$order->requisition_id)->orderBy('id')->get()->map(fn($r)=>(array)$r)->all(),'budget_consumptions'=>DB::table('budget_consumptions')->whereIn('invoice_id',Invoice::where('purchase_order_id',$order->id)->select('id'))->orderBy('id')->get()->map(fn($r)=>(array)$r)->all()]; + } + private function input(Request $http,array $data,object $actor):Request{$r=Request::create('/embedded/supplier-invoice','POST',$data,[],[],['HTTP_ACCEPT'=>'application/json']);$r->setUserResolver(fn($guard=null)=>$actor);if($http->hasSession())$r->setLaravelSession($http->session());return $r;} + private function dispatch(string $action,array $data,PurchaseOrder $order,object $actor,Request $http):array{ + $workflow=app(InvoiceWorkflow::class); + if($action==='register'){ + abort_if(array_diff(array_keys($data),['number','issued_on','subtotal','tax','total','items']),422);Validator::make($data,['items'=>'required|array|min:1|max:50','items.*'=>'array:purchase_order_item_id,quantity,unit,unit_price,tax_rate'])->validate(); + (new \Tempo\Purchasing\Embedded\Http\Controllers\InvoiceController)->store($this->input($http,$data,$actor),$order,$workflow); + $invoice=Invoice::where('purchase_order_id',$order->id)->where('created_by',$actor->id)->orderByDesc('id')->firstOrFail(); + }else{ + abort_if(array_diff(array_keys($data),['invoice_id']),422);$d=Validator::make($data,['invoice_id'=>'required|integer|min:1'])->validate();$invoice=Invoice::where('purchase_order_id',$order->id)->findOrFail($d['invoice_id']);$workflow->validate($actor,$invoice);$invoice->refresh(); + } + return ['invoice'=>$invoice,'result'=>['invoice_id'=>$invoice->id,'order_id'=>$order->id,'status'=>$invoice->status],'impact'=>['operation'=>$action==='register'?'Registar factura recebida pendente':'Validar conferência da factura','invoice'=>$invoice->load('items')->toArray(),'budget_consumption_minor'=>$action==='validate'?(int)$invoice->total_minor:0,'stock_changed'=>false,'payable_created'=>false,'payment_created'=>false,'ledger_posted'=>false]]; + } + private function rights():array{$c=app(\App\Shared\Context\CompanyContext::class);$s=$c->identifiers();$p=app(\App\Modules\Identity\Services\Permissions::class);$out=[];foreach(['prepare','validate']as$r)$out[$r]=$p->has($c->userId(),$s['tenant_id'],$s['company_id'],'purchasing_invoices.'.$r,$c->unitId());return $out;} + public function screen(Request $r,ReceiptRuntime $rt){$this->guard();$rt->run('purchasing_invoices.view',fn($a)=>$this->viewer($a));$c=app(\App\Shared\Context\CompanyContext::class);$s=$c->identifiers();$link=config('receipt_qa.obligations_enabled')===true&&app(\App\Modules\Identity\Services\Permissions::class)->has($c->userId(),$s['tenant_id'],$s['company_id'],'purchasing_obligations.view',$c->unitId());return response()->view('supplier-invoice-workspace',['obligations'=>$link,'context'=>$r->session()->get('company_context.token'),'csrf'=>csrf_token()]);} + public function index(Request $r,ReceiptRuntime $rt){$this->guard();$d=$r->validate(['page'=>'sometimes|integer|min:1|max:10000']);abort_if(array_diff(array_keys($r->query()),array_keys($d)),422);return $rt->run('purchasing_invoices.view',function($a,$b)use($d){$this->viewer($a);return response()->json(PurchaseOrder::visibleTo($a)->where(fn($q)=>$q->whereIn('id',$b['order_ids']??[])->orWhereIn('requisition_id',RequisitionAccess::ids($b)))->orderBy('id')->paginate(25,['id','number','status','currency'],'page',(int)($d['page']??1)));});} + public function show(int $id,ReceiptRuntime $rt){$this->guard();$rights=$this->rights();return $rt->run('purchasing_invoices.view',function($a,$b)use($id,$rights){$order=$this->order($id,$b,$a);$state=$this->state($order);$revision=$this->hash($state);$matching=config('receipt_qa.invoice_progress_enabled')===true?app(InvoiceMatchingProgress::class)->forOrder($order,$state):null;$workflow=app(InvoiceWorkflow::class);foreach($state['invoices']as&$i)$i['can_validate']=$rights['validate']&&$workflow->reviewerEligible($a,Invoice::findOrFail($i['id']));unset($i);return response()->json(['order'=>$state['order'],'invoices'=>$state['invoices'],'revision'=>$revision,'matching_progress'=>$matching,'can_prepare'=>$rights['prepare']&&$a->hasFunctions(['finance'])&&!app(OrganizationAccess::class)->maintenanceOnly($a),'receipt_progress'=>app(ReceiptWorkflow::class)->progress($order),'physical_corrections'=>$state['physical_corrections']]);});} + public function history(int $id,Request $r,ReceiptRuntime $rt){$this->guard();$d=$r->validate(['page'=>'sometimes|integer|min:1|max:10000']);abort_if(array_diff(array_keys($r->query()),array_keys($d)),422);return $rt->run('purchasing_invoices.view',function($a,$b)use($id,$d){$order=$this->order($id,$b,$a);return response()->json(AuditLog::where('requisition_id',$order->requisition_id)->whereIn('action',['invoice.created','invoice.validated','sgf.invoice.command'])->orderByDesc('id')->paginate(15,['id','user_id','action','created_at','before','after'],'page',(int)($d['page']??1)));});} + public function preview(int $id,Request $r,ReceiptRuntime $rt){$this->guard();$d=$r->validate(['operation_key'=>'required|uuid','revision'=>'required|string|size:64','action'=>'required|in:register,validate','reason'=>'required|string|min:10|max:2000','data'=>'required|array']);abort_if(array_diff(array_keys($r->all()),array_keys($d))||strlen(json_encode($d['data']))>65536,422);$d['operation_key']=strtolower($d['operation_key']);$generation=$this->generation();return $rt->run('purchasing_invoices.'.($d['action']==='register'?'prepare':'validate'),function($a,$b,$f)use($id,$d,$r,$generation){$order=$this->order($id,$b,$a);$a=app(CurrentActor::class)->lock($a,['finance']);abort_unless(hash_equals($this->hash($this->state($order)),$d['revision']),409,'A conferência mudou. Actualize a ordem.');$db=DB::connection();$level=$db->transactionLevel();$db->beginTransaction();try{$out=$this->dispatch($d['action'],$d['data'],$order,$a,$r);}finally{while($db->transactionLevel()>$level)$db->rollBack();}if($d['action']==='register'){unset($out['impact']['invoice']['id']);foreach($out['impact']['invoice']['items']as&$line)unset($line['id'],$line['invoice_id']);unset($line);}$cut=$d+['order_id'=>$id,'actor'=>$a->id,'binding'=>$f,'generation'=>$generation,'observed'=>time()];return response()->json(['preview'=>Crypt::encryptString(json_encode($cut,JSON_THROW_ON_ERROR)),'impact'=>$out['impact']+['reason'=>$d['reason']]]);});} + public function confirm(int $id,Request $r,ReceiptRuntime $rt){$this->guard();$d=$r->validate(['preview'=>'required|string|max:131072']);abort_if(array_diff(array_keys($r->all()),['preview']),422);try{$cut=json_decode(Crypt::decryptString($d['preview']),true,128,JSON_THROW_ON_ERROR);}catch(\Throwable){abort(409,'Prévia inválida.');}abort_unless(in_array($cut['action']??'', ['register','validate'],true),409);$generation=$this->generation();return $rt->run('purchasing_invoices.'.($cut['action']==='register'?'prepare':'validate'),function($a,$b,$f,$origin)use($id,$r,$cut,$generation){$order=$this->order($id,$b,$a);$a=app(CurrentActor::class)->lock($a,['finance']);abort_unless(($cut['order_id']??null)===$id&&($cut['actor']??null)===$a->id&&($cut['binding']??null)===$f&&($cut['generation']??null)===$generation&&is_int($cut['observed']??null)&&$cut['observed']>=time()-600&&$cut['observed']<=time(),409,'O contexto ou a prévia mudou.');$hash=$this->hash([$id,$cut['action'],$cut['data'],$cut['reason']]);$old=AuditLog::where('requisition_id',$order->requisition_id)->where('user_id',$a->id)->where('action','sgf.invoice.command')->where('after->operation_key',$cut['operation_key'])->first();if($old){abort_unless(($old->after['request_hash']??null)===$hash&&($old->after['binding_revision']??null)===$f,409,'Chave usada com outro conteúdo.');return response()->json($old->after['result']+['replayed'=>true]);}abort_unless(hash_equals($this->hash($this->state($order)),$cut['revision']),409,'A base mudou desde a conferência.');$before=$this->state($order);$out=$this->dispatch($cut['action'],$cut['data'],$order,$a,$r);app(RequisitionWorkflow::class)->audit($a,'sgf.invoice.command',\Tempo\Purchasing\Embedded\Models\Requisition::findOrFail($order->requisition_id),['invoices'=>$before['invoices']],$origin+['operation_key'=>$cut['operation_key'],'request_hash'=>$hash,'binding_revision'=>$f,'reason'=>$cut['reason'],'command'=>$cut['action'],'result'=>$out['result'],'invoice'=>$out['invoice']->load('items')->toArray()]);return response()->json($out['result']+['replayed'=>false],201);});} +} diff --git a/app/Modules/Purchasing/InvoiceMatchingProgress.php b/app/Modules/Purchasing/InvoiceMatchingProgress.php new file mode 100644 index 0000000..2c02bac --- /dev/null +++ b/app/Modules/Purchasing/InvoiceMatchingProgress.php @@ -0,0 +1,25 @@ +$ordered,'accepted_milli'=>$accepted,'returned_milli'=>$returned,'reversed_milli'=>$reversed,'accepted_net_milli'=>$net,'validated_milli'=>$validated,'pending_milli'=>$pending,'remaining_milli'=>max(0,$ceiling-$validated),'deficit_milli'=>max(0,$validated-$ceiling)]; + } + public function forOrder(object $order,array $state):array + { + $ids=array_column($state['order']['items'],'id');if($ids===[])return []; + $accepted=DB::table('goods_receipt_items')->where('tenant_id',$order->tenant_id)->whereIn('purchase_order_item_id',$ids)->groupBy('purchase_order_item_id')->selectRaw('purchase_order_item_id,SUM(accepted_milli) AS accepted')->get()->keyBy('purchase_order_item_id'); + $invoiced=DB::table('invoice_items as l')->join('invoices as i','i.id','=','l.invoice_id')->where(['l.tenant_id'=>$order->tenant_id,'i.tenant_id'=>$order->tenant_id,'i.purchase_order_id'=>$order->id])->whereIn('l.purchase_order_item_id',$ids)->groupBy('l.purchase_order_item_id')->selectRaw("l.purchase_order_item_id,SUM(CASE WHEN i.status='validated' THEN l.quantity_milli ELSE 0 END) AS validated,SUM(CASE WHEN i.status='pending' THEN l.quantity_milli ELSE 0 END) AS pending")->get()->keyBy('purchase_order_item_id'); + $effects=array_column($state['physical_corrections'],null,'line');$rows=[]; + foreach($state['order']['items']as$line){$id=$line['id']; + $rows[]=['line_id'=>$id,'description'=>$line['description'],'unit'=>$line['unit']]+$this->quantities(ReceiptWorkflow::milli($line['quantity']),(int)($accepted[$id]->accepted??0),(int)($effects[$id]['returned']??0),(int)($effects[$id]['reversed']??0),(int)($invoiced[$id]->validated??0),(int)($invoiced[$id]->pending??0)); + }return $rows; + } +} diff --git a/app/Modules/Purchasing/ObligationController.php b/app/Modules/Purchasing/ObligationController.php new file mode 100644 index 0000000..9fbff4f --- /dev/null +++ b/app/Modules/Purchasing/ObligationController.php @@ -0,0 +1,71 @@ +hash([request()->session()->get('company_context')]); } + private function orders(object $a,array $b) { + return PurchaseOrder::visibleTo($a)->where(fn($q)=>$q->whereIn('id',$b['order_ids']??[])->orWhereIn('requisition_id',RequisitionAccess::ids($b))); + } + private function invoice(int $id,object $a,array $b):Invoice { + return Invoice::where('tenant_id',$a->tenant_id)->whereIn('purchase_order_id',$this->orders($a,$b)->select('id'))->find($id)??abort(403,'Documento fora da origem autorizada.'); + } + private function adapter(object $a):SupplierPayables { + $service=app(SupplierPayables::class);$service->readContext($a);return $service; + } + private function state(object $a,Invoice $invoice,SupplierPayables $service):array { + $scope=['tenant_id'=>$a->tenant_id,'company_id'=>0,'unit_id'=>0]; + $sources=DB::table('pa_sources')->where($scope)->where('local_source_id',$invoice->id)->select('id'); + return ['document'=>$service->document($a,$invoice->id), + 'proposals'=>DB::table('pa_proposals')->where($scope)->whereIn('source_id',$sources)->orderByDesc('id')->limit(1)->get()->all(), + 'obligations'=>DB::table('pa_obligations')->where($scope)->whereIn('source_id',$sources)->orderBy('id')->get()->all(), + 'identity'=>DB::table('pa_access')->where($scope)->where('user_id',$a->id)->orderBy('action')->get(['action','person'])->all()]; + } + private function rights():array { + $c=app(\App\Shared\Context\CompanyContext::class);$s=$c->identifiers();$p=app(\App\Modules\Identity\Services\Permissions::class);$rights=[]; + foreach(['prepare','validate']as$r)$rights[$r]=$p->has($c->userId(),$s['tenant_id'],$s['company_id'],'purchasing_obligations.'.$r,$c->unitId());return $rights; + } + private function commandId(string $action,int $proposal,Invoice $invoice,object $a):int { + if($action==='prepare')return $invoice->id; + abort_unless(DB::table('pa_proposals as p')->join('pa_sources as s','s.id','=','p.source_id')->where(['p.id'=>$proposal,'p.tenant_id'=>$a->tenant_id,'p.company_id'=>0,'p.unit_id'=>0,'s.tenant_id'=>$a->tenant_id,'s.company_id'=>0,'s.unit_id'=>0,'s.local_source_id'=>$invoice->id])->exists(),403,'Proposta fora do documento autorizado.');return $proposal; + } + private function execute(Payables $engine,array $cut,Invoice $invoice,object $a):array { + try{return $engine->command($cut['action'],$this->commandId($cut['action'],$cut['proposal_id'],$invoice,$a),$cut['reason'],$cut['operation_key']);} + catch(\DomainException|\InvalidArgumentException $e){abort(422,$e->getMessage());} + } + public function screen(Request $r,ReceiptRuntime $rt) { + $this->guard();$rt->run('purchasing_obligations.view',fn($a)=>$this->adapter($a));return response()->view('supplier-obligation-workspace',['context'=>$r->session()->get('company_context.token'),'csrf'=>csrf_token()]); + } + public function index(Request $r,ReceiptRuntime $rt) { + $this->guard();$d=$r->validate(['page'=>'sometimes|integer|min:1|max:10000','status'=>'sometimes|in:pending,validated','search'=>'sometimes|string|max:100']);abort_if(array_diff(array_keys($r->query()),array_keys($d)),422); + return $rt->run('purchasing_obligations.view',function($a,$b)use($d){$this->adapter($a);$q=Invoice::where('tenant_id',$a->tenant_id)->whereIn('purchase_order_id',$this->orders($a,$b)->select('id'));if(isset($d['status']))$q->where('status',$d['status']);if(isset($d['search']))$q->whereRaw('position(? in number)>0',[$d['search']]);return response()->json($q->orderBy('id')->paginate(25,['id','number','status','total_minor','purchase_order_id'],'page',(int)($d['page']??1)));}); + } + public function show(int $id,Request $r,ReceiptRuntime $rt) { + $this->guard();$d=$r->validate(['proposal_page'=>'sometimes|integer|min:1|max:10000','event_page'=>'sometimes|integer|min:1|max:10000']);abort_if(array_diff(array_keys($r->query()),array_keys($d)),422);$rights=$this->rights(); + return $rt->run('purchasing_obligations.view',function($a,$b)use($id,$d,$rights){$invoice=$this->invoice($id,$a,$b);$service=$this->adapter($a);$out=$service->engine($a)->listingPage([$id],$d['proposal_page']??1,$d['event_page']??1,25);foreach($rights as$right=>$allowed)$out['permissions'][$right]=$allowed&&$service->can($a,$right);return response()->json($out+['revision'=>$this->hash($this->state($a,$invoice,$service))]);}); + } + public function preview(int $id,Request $r,ReceiptRuntime $rt) { + $this->guard();$d=$r->validate(['action'=>'required|in:prepare,validate','proposal_id'=>'required|integer|min:0','operation_key'=>'required|uuid','revision'=>'required|string|size:64','reason'=>'required|string|min:10|max:2000']);abort_if(array_diff(array_keys($r->all()),array_keys($d)),422);$d['operation_key']=strtolower($d['operation_key']);$generation=$this->generation(); + return $rt->run('purchasing_obligations.'.$d['action'],function($a,$b,$f)use($id,$d,$generation){$invoice=$this->invoice($id,$a,$b);$service=$this->adapter($a);abort_unless(hash_equals($this->hash($this->state($a,$invoice,$service)),$d['revision']),409,'A conferência mudou.');$db=DB::connection();$level=$db->transactionLevel();$db->beginTransaction();try{$result=$this->execute($service->engine($a),$d,$invoice,$a);}finally{while($db->transactionLevel()>$level)$db->rollBack();} + unset($result['proposal_id'],$result['obligation_id']);$cut=$d+['person_revision'=>$this->hash($this->state($a,$invoice,$service)['identity']),'invoice_id'=>$id,'actor'=>$a->id,'binding'=>$f,'generation'=>$generation,'observed'=>time()];return response()->json(['preview'=>Crypt::encryptString(json_encode($cut,JSON_THROW_ON_ERROR)),'impact'=>['result'=>$result,'principal_minor'=>$invoice->total_minor,'due_on'=>null,'due_status'=>'unknown','budget_changed'=>false,'stock_changed'=>false,'payment_created'=>false,'ledger_posted'=>false,'reason'=>$d['reason']]]);}); + } + public function confirm(int $id,Request $r,ReceiptRuntime $rt) { + $this->guard();$d=$r->validate(['preview'=>'required|string|max:131072']);abort_if(array_diff(array_keys($r->all()),['preview']),422);try{$cut=json_decode(Crypt::decryptString($d['preview']),true,64,JSON_THROW_ON_ERROR);}catch(\Throwable){abort(409,'Prévia inválida.');}abort_unless(in_array($cut['action']??'', ['prepare','validate'],true),409);$generation=$this->generation(); + return $rt->run('purchasing_obligations.'.$cut['action'],function($a,$b,$f,$origin)use($id,$cut,$generation){$invoice=$this->invoice($id,$a,$b);$service=$this->adapter($a);$engine=$service->engine($a);abort_unless(($cut['invoice_id']??null)===$id&&($cut['actor']??null)===$a->id&&($cut['binding']??null)===$f&&($cut['generation']??null)===$generation&&is_int($cut['observed']??null)&&$cut['observed']>=time()-600&&$cut['observed']<=time(),409,'O contexto ou a prévia mudou.'); + // A committed retry still calls the kernel: current source/payment eligibility is rechecked. + $receipt=DB::table('pa_commands')->where(['tenant_id'=>$a->tenant_id,'company_id'=>0,'unit_id'=>0,'actor_id'=>$a->id,'command_key'=>$cut['operation_key']])->first();if($receipt)abort_unless((json_decode($receipt->result,true)['local_source_id']??null)===$id,409); + $before=$this->state($a,$invoice,$service);abort_unless(($cut['person_revision']??null)===$this->hash($before['identity']),409,'Identidade alterada.');if(!$receipt)abort_unless(hash_equals($this->hash($before),$cut['revision']),409,'A base mudou desde a conferência.'); + $result=$this->execute($engine,$cut,$invoice,$a); + if(!($result['replayed']??false))app(RequisitionWorkflow::class)->audit($a,'sgf.obligation.command',Requisition::findOrFail(PurchaseOrder::findOrFail($invoice->purchase_order_id)->requisition_id),$before,$origin+['operation_key'=>$cut['operation_key'],'reason'=>$cut['reason'],'result'=>$result,'after'=>$this->state($a,$invoice,$service)]); + return response()->json($result,($result['state']??'')==='conflict'?409:(($result['replayed']??false)?200:201));}); + } +} diff --git a/app/Modules/Purchasing/OrderController.php b/app/Modules/Purchasing/OrderController.php new file mode 100644 index 0000000..123740f --- /dev/null +++ b/app/Modules/Purchasing/OrderController.php @@ -0,0 +1,31 @@ +hasFunctions(['admin','procurement','finance','department_head']),403);} + private function award(int $id,array $binding,object $actor):array{ + $this->viewActor($actor); + $award=PurchaseAward::where('id',$id)->where(fn($q)=>$q->whereIn('id',$binding['award_ids']??[])->orWhereIn('requisition_id',RequisitionAccess::ids($binding)))->first();abort_unless($award,403); + $request=Requisition::visibleTo($actor)->findOrFail($award->requisition_id); + return [$award,$request]; + } + private function basis(PurchaseAward $award,Requisition $request):array{ + $quote=Quotation::findOrFail($award->quotation_id)->load(['items','supplier']); + $basis=['award'=>$award->load('approvals')->toArray(),'requisition'=>$request->load(['items','steps'])->toArray(),'quote'=>$quote->toArray(),'comparison'=>app(ProposalComparison::class)->inspect($request)]; + return ['revision'=>hash('sha256',json_encode($basis,JSON_THROW_ON_ERROR)),'basis'=>$basis]; + } + private function output(PurchaseOrder $order,bool $replayed):array{return ['order'=>$order->load('items')->toArray(),'replayed'=>$replayed,'receipt_url'=>'/purchasing/receipts','stock_created'=>false,'invoice_created'=>false,'payment_created'=>false];} + public function screen(Request $r,ReceiptRuntime $runtime){$this->guard();$runtime->run('purchasing_orders.view',fn($actor)=>$this->viewActor($actor));return response()->view('order-workspace',['context'=>$r->session()->get('company_context.token'),'csrf'=>csrf_token()]);} + public function index(Request $r,ReceiptRuntime $runtime){$this->guard();$d=$r->validate(['page'=>'sometimes|integer|min:1|max:10000']);abort_if(array_diff(array_keys($r->query()),array_keys($d)),422);return $runtime->run('purchasing_orders.view',function($actor,$binding)use($d){$this->viewActor($actor);return response()->json(PurchaseAward::where(fn($q)=>$q->whereIn('id',$binding['award_ids']??[])->orWhereIn('requisition_id',RequisitionAccess::ids($binding)))->whereIn('requisition_id',Requisition::visibleTo($actor)->select('id'))->orderBy('id')->paginate(25,['id','requisition_id','status','total_minor'],'page',(int)($d['page']??1)));});} + public function show(int $id,ReceiptRuntime $runtime){$this->guard();$ctx=app(\App\Shared\Context\CompanyContext::class);$scope=$ctx->identifiers();$can=app(\App\Modules\Identity\Services\Permissions::class)->has($ctx->userId(),$scope['tenant_id'],$scope['company_id'],'purchasing_orders.issue',$ctx->unitId());return $runtime->run('purchasing_orders.view',function($actor,$binding)use($id,$can){[$award,$request]=$this->award($id,$binding,$actor);$basis=$this->basis($award,$request);$order=PurchaseOrder::where('requisition_id',$request->id)->first();return response()->json($basis+['can_issue'=>$can&&app(PurchaseWorkflow::class)->canIssue($actor,$award,$request),'existing'=>$order?$this->output($order,true):null]);});} + public function preview(int $id,Request $r,ReceiptRuntime $runtime){$this->guard();$d=$r->validate(['revision'=>'required|string|size:64']);abort_if(array_diff(array_keys($r->all()),['revision']),422);return $runtime->run('purchasing_orders.issue',function($actor,$binding,$fingerprint)use($id,$d){[$award,$request]=$this->award($id,$binding,$actor);abort_unless(app(PurchaseWorkflow::class)->canIssue($actor,$award,$request),403);$basis=$this->basis($award,$request);abort_unless(hash_equals($basis['revision'],$d['revision']),409,'A base aprovada mudou. Confira novamente.');$cut=['award'=>$id,'actor'=>$actor->id,'binding'=>$fingerprint,'revision'=>$basis['revision'],'observed'=>time()];return response()->json(['preview'=>Crypt::encryptString(json_encode($cut,JSON_THROW_ON_ERROR)),'impact'=>['supplier'=>$basis['basis']['quote']['supplier']['name'],'total_minor'=>$award->total_minor,'currency'=>$basis['basis']['quote']['currency'],'delivery_date'=>$basis['basis']['award']['delivery_date'],'delivery_location'=>$award->delivery_location,'items'=>$basis['basis']['quote']['items'],'budget'=>'O workflow original revalida e regista o compromisso, se configurado.','stock'=>false,'invoice'=>false,'payment'=>false]]);});} + public function issue(int $id,Request $r,ReceiptRuntime $runtime){$this->guard();$d=$r->validate(['preview'=>'required|string|max:32768']);abort_if(array_diff(array_keys($r->all()),['preview']),422);try{$cut=json_decode(Crypt::decryptString($d['preview']),true,64,JSON_THROW_ON_ERROR);}catch(\Throwable){abort(409,'Prévia inválida.');}return $runtime->run('purchasing_orders.issue',function($actor,$binding,$fingerprint,$origin)use($id,$cut){[$award,$request]=$this->award($id,$binding,$actor);abort_unless(($cut['award']??null)===$id&&($cut['actor']??null)===$actor->id&&($cut['binding']??null)===$fingerprint&&is_int($cut['observed']??null)&&$cut['observed']<=time()&&$cut['observed']>=time()-600,409,'O contexto ou a prévia mudou.');$existing=PurchaseOrder::where('requisition_id',$request->id)->first();abort_unless($existing||hash_equals($this->basis($award,$request)['revision'],$cut['revision']),409,'A base mudou desde a conferência.');$order=app(PurchaseWorkflow::class)->issue($actor,$award);if(!$existing)app(RequisitionWorkflow::class)->audit($actor,'sgf.order.issued',$request,null,$origin+['order_id'=>$order->id,'award_id'=>$award->id,'binding_revision'=>$fingerprint]);return response()->json($this->output($order,(bool)$existing),$existing?200:201);});} +} diff --git a/app/Modules/Purchasing/ProcessHistory.php b/app/Modules/Purchasing/ProcessHistory.php new file mode 100644 index 0000000..a9136a8 --- /dev/null +++ b/app/Modules/Purchasing/ProcessHistory.php @@ -0,0 +1,18 @@ +['requisition.%','sgf.request.command'], + 'sourcing'=>['requisition.%','sgf.request.command','quotation.%','award.%','sgf.sourcing.command'], + default=>throw new \InvalidArgumentException('Unknown history stage'), + }; + return AuditLog::where('requisition_id',$request)->where(function($q)use($patterns){foreach($patterns as$pattern)$q->orWhere('action','like',$pattern);}); + } +} diff --git a/app/Modules/Purchasing/ProcessNavigation.php b/app/Modules/Purchasing/ProcessNavigation.php new file mode 100644 index 0000000..3fa7d25 --- /dev/null +++ b/app/Modules/Purchasing/ProcessNavigation.php @@ -0,0 +1,32 @@ +['href'=>'/purchasing/'.$stage.'?'.http_build_query($ids),'label'=>$label]; + $view['_links']=[$link('requests',['request'=>$request],'Consultar esta requisição')]; + if($allowed['sourcing'])$view['_links'][]=$link('sourcing',['request'=>$request],'Consultar propostas desta requisição'); + foreach($view['stages']as$key=>&$stage){ + if(!($stage['accessible']??false))continue; + $stage['data']=array_map(function($record)use($key,$allowed,$request,$link){ + $row=is_array($record)?$record:(method_exists($record,'toArray')?$record->toArray():(array)$record);$links=[]; + if($key==='quotes'&&$allowed['sourcing'])$links[]=$link('sourcing',['request'=>$request],'Consultar propostas desta requisição'); + if($key==='awards'&&$allowed['orders'])$links[]=$link('orders',['award'=>$row['id']],'Consultar esta adjudicação e ordem'); + if($key==='orders'){ + if($allowed['receipts'])$links[]=$link('receipts',['order'=>$row['id']],'Consultar recepções desta ordem'); + if($allowed['invoices'])$links[]=$link('invoices',['order'=>$row['id']],'Consultar facturas desta ordem'); + } + if($key==='receipts'&&$allowed['receipts'])$links[]=$link('receipts',['order'=>$row['purchase_order_id'],'receipt'=>$row['id']],'Consultar esta recepção e os seus anexos'); + if($key==='invoices'){ + if($allowed['invoices'])$links[]=$link('invoices',['order'=>$row['purchase_order_id'],'invoice'=>$row['id']],'Consultar esta factura'); + if($allowed['obligations'])$links[]=$link('obligations',['invoice'=>$row['id']],'Consultar obrigação desta factura'); + } + return $row+['_links'=>$links]; + },$stage['data']); + }unset($stage);return $view; + } +} diff --git a/app/Modules/Purchasing/PurchasingEntry.php b/app/Modules/Purchasing/PurchasingEntry.php new file mode 100644 index 0000000..d5aca76 --- /dev/null +++ b/app/Modules/Purchasing/PurchasingEntry.php @@ -0,0 +1,54 @@ +['Solicitante','Prepara e submete a necessidade.'],'approver'=>['Chefia','Decide requisições e adjudicações por identidade distinta.'],'actor'=>['Compras','Prepara fornecedores, propostas, comparação e ordens.'],'issuer'=>['Finanças','Revê fornecedores, avalia propostas, regista facturas e prepara obrigações.'],'validator'=>['Armazém','Confere e confirma a recepção física.'],'reviewer'=>['Revisor financeiro','Valida facturas e obrigações por identidade distinta.'],'auditor'=>['Consulta financeira','Consulta autorizada dos documentos financeiros.']]; + $stages=['requests'=>'Requisições','suppliers'=>'Fornecedores','sourcing'=>'Propostas e adjudicação','orders'=>'Ordens','receipts'=>'Recepções','invoices'=>'Facturas','obligations'=>'Obrigações'];$profiles=[]; + $grants=DB::table('permission_grants')->where($fixture['scope'])->whereIn('user_id',array_intersect_key($fixture,$definitions))->get(['user_id','permission'])->groupBy('user_id'); + foreach($definitions as$key=>[$label,$description]){ + if(!isset($fixture[$key]))continue;$available=[]; + $rights=($grants[$fixture[$key]]??collect())->pluck('permission')->all();foreach($stages as$stage=>$name)if(in_array('purchasing_'.$stage.'.view',$rights,true))$available[$stage]=$name; + $profiles[$key]=['user_id'=>$fixture[$key],'label'=>$label,'description'=>$description,'stages'=>$available]; + }return $profiles; + } + private static function guard():void + { + abort_unless(config('purchasing_workspace.single_installation')===true&&app()->environment('budget-testing')&&in_array(request()->ip(),['127.0.0.1','::1'],true),404); + BudgetAdapter::guard(); + $id=(string)config('purchasing_workspace.id');$db=DB::connection();$run=(string)getenv('SGF_ISOLATED_REGRESSION_RUN'); + abort_unless(preg_match('/^[a-f0-9]{12}$/D',$id)&&preg_match('/^[a-f0-9]{12}$/D',$run) + &&$db->getDatabaseName()==='budget_core_sgf_'.$id&&$db->getConfig('username')==='ir_composition_'.$id&&(int)$db->getConfig('port')===55439,403); + $identity=$db->selectOne("SELECT current_user role,current_setting('cluster_name') cluster,rolsuper OR rolcreatedb OR rolcreaterole OR rolreplication OR rolbypassrls elevated FROM pg_roles WHERE rolname=current_user"); + abort_unless(!$identity->elevated&&$identity->role==='ir_composition_'.$id&&$identity->cluster==='sgf_modular_regression_'.$run,403); + } + public function screen(Request $r) + { + self::guard();$scope=config('purchasing_workspace.scope'); + return response()->view('purchasing-entry',['profiles'=>config('purchasing_workspace.profiles'),'company'=>DB::table('companies')->find($scope['company_id']),'unit'=>DB::table('units')->find($scope['unit_id']),'returnTo'=>(string)$r->query('return_to','')])->header('Cache-Control','no-store')->header('X-SGF-Installation',config('purchasing_workspace.id')); + } + public function enter(Request $r) + { + self::guard();$d=$r->validate(['role'=>'required|string','stage'=>'required|string','return_to'=>'nullable|string|max:300']);abort_if(array_diff(array_keys($r->all()),['_token','role','stage','return_to']),422); + $profile=config('purchasing_workspace.profiles.'.$d['role']);abort_unless(is_array($profile)&&isset($profile['stages'][$d['stage']]),403); + $target='/purchasing/'.$d['stage']; + if(!empty($d['return_to'])){ + $parts=parse_url($d['return_to']);abort_unless(is_array($parts)&&!isset($parts['scheme'])&&!isset($parts['host'])&&!isset($parts['fragment'])&&($parts['path']??null)===$target,422); + parse_str($parts['query']??'',$query);$allowed=['requests'=>['request'],'suppliers'=>['supplier'],'sourcing'=>['request'],'orders'=>['award'],'receipts'=>['order','receipt','movement'],'invoices'=>['order','invoice'],'obligations'=>['invoice']][$d['stage']]; + abort_if(array_diff(array_keys($query),$allowed),422);foreach($query as$v)abort_unless(is_string($v)&&preg_match('/^[1-9][0-9]{0,14}$/D',$v),422); + $pairs=isset($parts['query'])?explode('&',$parts['query']):[];abort_unless(count($pairs)===count($query),422); + if($query){$primary=$d['stage']==='receipts'&&isset($query['movement'])?'movement':$allowed[0];abort_unless(isset($query[$primary]),422);if($primary==='movement')abort_unless(count($query)===1,422);} + $target.=isset($parts['query'])?'?'.http_build_query($query):''; + } + $user=User::findOrFail($profile['user_id']);auth()->login($user);$scope=config('purchasing_workspace.scope');$r->session()->put('auth_version',$user->auth_version); + $r->session()->put('company_context',$scope+['module_id'=>'purchasing','token'=>bin2hex(random_bytes(24))]); + return redirect($target); + } +} diff --git a/app/Modules/Purchasing/ReceiptCatalogue.php b/app/Modules/Purchasing/ReceiptCatalogue.php new file mode 100644 index 0000000..32829ae --- /dev/null +++ b/app/Modules/Purchasing/ReceiptCatalogue.php @@ -0,0 +1,33 @@ +whereRaw('lower(btrim(unit))=lower(btrim(?))',[$line->unit]); + if($line->purchase_type==='service')return $q->whereRaw('1=0'); + $fixed=$order->snapshot['catalogue_sources'][$line->requisition_item_id]['stock_item_id']??null; + if($fixed!==null)$q->whereKey($fixed); + if(Schema::hasTable('supply_records')){ + $mapping=app(SupplyPlanning::class)->latest('delivery')->where('purchase_order_id',$order->id)->where('data->purchase_order_item_id',$line->id)->first(); + if($mapping)$q->whereKey($mapping->stock_item_id); + } + if($line->purchase_type==='spare_part'){ + abort_unless($line->spare_part_id&&$line->equipment_id,422,'A ordem não contém associação autorizada da peça.'); + $part=app(EquipmentWorkflow::class)->linkedPart((int)$line->spare_part_id,(int)$line->equipment_id,Requisition::findOrFail($order->requisition_id)->department_id);$q->whereKey($part->stock_item_id); + } + return $q; + } + public function revision(StockItem $item):string { return hash('sha256',Payables::canonical($item->toArray())); } + public function selected(array $data):array { + $ids=array_values(array_unique(array_filter(array_column($data['items'],'stock_item_id'))));sort($ids,SORT_NUMERIC);$revisions=[]; + foreach($ids as$id){$item=StockItem::whereKey($id)->lockForUpdate()->first();abort_unless($item,422,'Artigo fora do catálogo autorizado.');$revisions[(string)$id]=$this->revision($item);} + ksort($revisions);return $revisions; + } +} diff --git a/app/Modules/Purchasing/ReceiptController.php b/app/Modules/Purchasing/ReceiptController.php new file mode 100644 index 0000000..df77521 --- /dev/null +++ b/app/Modules/Purchasing/ReceiptController.php @@ -0,0 +1,28 @@ +identifiers();return app(\App\Modules\Identity\Services\Permissions::class)->has($ctx->userId(),$s['tenant_id'],$s['company_id'],'purchasing_receipts.confirm',$ctx->unitId());} + private function order(int $id,array $binding):PurchaseOrder{$order=PurchaseOrder::where('id',$id)->where(fn($q)=>$q->whereIn('id',$binding['order_ids'])->orWhereIn('requisition_id',RequisitionAccess::ids($binding)))->first();abort_unless($order,403);Gate::authorize('viewOrder',[GoodsReceipt::class,$order]);return $order;} + private function revision(PurchaseOrder $order,array $binding):string{return hash('sha256',json_encode([$order->getAttributes(),app(ReceiptWorkflow::class)->progress($order),$binding],JSON_THROW_ON_ERROR));} + private function result(GoodsReceipt $receipt,bool $replayed):array{return ['receipt'=>$receipt->load('items')->toArray(),'replayed'=>$replayed,'movements'=>DB::table('stock_movements')->where('tenant_id',$receipt->tenant_id)->whereIn('goods_receipt_item_id',$receipt->items->pluck('id'))->orderBy('id')->get(['id','goods_receipt_item_id','quantity_milli','warehouse_id','stock_item_id','movement_type'])->all()];} + public function catalogue(int $id,int $line,Request $r,ReceiptRuntime $runtime) { + $d=$r->validate(['page'=>'sometimes|integer|min:1|max:10000','per_page'=>'sometimes|integer|in:25,100','search'=>'sometimes|nullable|string|max:100']);abort_if(array_diff(array_keys($r->query()),array_keys($d)),422); + return $runtime->run('purchasing_receipts.confirm',function($actor,$binding)use($id,$line,$d){$order=$this->order($id,$binding);Gate::authorize('create',[GoodsReceipt::class,$order]);$source=$order->items()->find($line);abort_unless($source,403,'Linha fora da ordem autorizada.');$catalogue=app(ReceiptCatalogue::class);$q=$catalogue->query($order,$source);if(isset($d['search'])&&$d['search']!=='')$q->where(fn($w)=>$w->whereRaw('position(lower(?) in lower(code))>0',[$d['search']])->orWhereRaw('position(lower(?) in lower(name))>0',[$d['search']]));$page=$q->orderBy('code')->orderBy('id')->paginate((int)($d['per_page']??25),['*'],'page',(int)($d['page']??1));$page->through(fn($item)=>$item->only(['id','code','name','unit'])+['selection_revision'=>$catalogue->revision($item)]);return response()->json($page)->header('Cache-Control','no-store');}); + } + public function history(int $id,Request $r,ReceiptRuntime $runtime) { + $d=$r->validate(['page'=>'sometimes|integer|min:1|max:10000']);abort_if(array_diff(array_keys($r->query()),array_keys($d)),422);return $runtime->run('purchasing_receipts.view',function($actor,$binding)use($id,$d){$order=$this->order($id,$binding);return response()->json(GoodsReceipt::where('purchase_order_id',$order->id)->orderByDesc('id')->paginate(25,['id','number','status','received_on','received_by'],'page',(int)($d['page']??1)))->header('Cache-Control','no-store');}); + } + public function screen(Request $r,ReceiptRuntime $runtime){$runtime->run('purchasing_receipts.view',fn()=>true);return response()->view('receipt-workspace',['context'=>$r->session()->get('company_context.token'),'csrf'=>csrf_token()]);} + public function index(Request $r,ReceiptRuntime $runtime){$d=$r->validate(['page'=>'sometimes|integer|min:1|max:10000','per_page'=>'sometimes|integer|in:25,100']);abort_if(array_diff(array_keys($r->query()),array_keys($d)),422);return $runtime->run('purchasing_receipts.view',function($actor,$binding)use($d){Gate::authorize('viewAny',GoodsReceipt::class);$orders=PurchaseOrder::where(fn($q)=>$q->whereIn('id',$binding['order_ids'])->orWhereIn('requisition_id',RequisitionAccess::ids($binding)))->orderBy('id')->paginate((int)($d['per_page']??25),['id','number','status'], 'page',(int)($d['page']??1));return response()->json($orders);});} + public function show(int $id,Request $r,ReceiptRuntime $runtime){$d=$r->validate(['page'=>'sometimes|integer|min:1|max:10000']);abort_if(array_diff(array_keys($r->query()),array_keys($d)),422);$can=$this->canConfirm();return $runtime->run('purchasing_receipts.view',function($actor,$binding)use($id,$d,$can){$order=$this->order($id,$binding);return response()->json(['order'=>$order->only(['id','number','status']),'progress'=>app(ReceiptWorkflow::class)->progress($order),'revision'=>$this->revision($order,$binding),'can_confirm'=>$can&&Gate::allows('create',[GoodsReceipt::class,$order]),'warehouses'=>Warehouse::whereIn('id',$binding['warehouse_ids'])->orderBy('id')->get(['id','code','name']),'items'=>StockItem::orderBy('id')->limit(25)->get(['id','code','name','unit']),'history'=>GoodsReceipt::where('purchase_order_id',$id)->orderByDesc('id')->paginate(25,['id','number','status','received_on','received_by'],'page',(int)($d['page']??1))]);});} + public function preview(int $id,Request $r,ReceiptRuntime $runtime){return $runtime->run('purchasing_receipts.confirm',function($actor,$binding,$fingerprint)use($id,$r){$order=$this->order($id,$binding);Gate::authorize('create',[GoodsReceipt::class,$order]);$input=$r->all();$revision=$input['revision']??null;$selected=$input['item_revisions']??null;unset($input['revision'],$input['item_revisions']);abort_if(array_diff(array_keys($input),['idempotency_key','delivery_note','received_on','warehouse_id','items']),422);$rules=(new \Tempo\Purchasing\Embedded\Http\Requests\ConfirmReceiptRequest)->setUserResolver(fn()=>$actor)->rules();$data=Validator::make($input,$rules)->validate();abort_unless(in_array((int)($data['warehouse_id']??0),$binding['warehouse_ids'],true),403);abort_unless(is_string($revision)&&hash_equals($this->revision($order,$binding),$revision),409,'A origem mudou. Actualize e confira novamente.');$items=app(ReceiptCatalogue::class)->selected($data);if($selected!==null){Validator::make(['selected'=>$selected],['selected'=>'array|max:50','selected.*'=>'required|string|size:64'])->validate();foreach($selected as$key=>$value)abort_unless(isset($items[(string)$key])&&hash_equals($items[(string)$key],$value),409,'O artigo mudou desde a escolha. Pesquise novamente.');} $cut=['item_revisions'=>$items,'actor'=>$actor->id,'fingerprint'=>$fingerprint,'order'=>$id,'revision'=>$revision,'data'=>$data,'observed'=>time()];return response()->json(['preview'=>Crypt::encryptString(json_encode($cut,JSON_THROW_ON_ERROR)),'impact'=>['document'=>'Recepção confirmada, com histórico imutável','stock'=>'Apenas quantidades físicas aceites geram entrada, uma única vez.','payments'=>false,'accounting'=>false],'data'=>$data]);});} + public function confirm(int $id,Request $r,ReceiptRuntime $runtime){$d=$r->validate(['preview'=>'required|string|max:100000']);abort_if(array_diff(array_keys($r->all()),['preview']),422);try{$cut=json_decode(Crypt::decryptString($d['preview']),true,128,JSON_THROW_ON_ERROR);}catch(\Throwable){abort(409,'Prévia inválida. Confira novamente.');}return $runtime->run('purchasing_receipts.confirm',function($actor,$binding,$fingerprint,$origin)use($id,$cut){$order=$this->order($id,$binding);abort_unless(($cut['actor']??null)===$actor->id&&($cut['order']??null)===$id&&($cut['fingerprint']??null)===$fingerprint&&is_int($cut['observed']??null)&&$cut['observed']<=time()&&$cut['observed']>=time()-600,409,'A prévia ou o contexto mudou. Confira novamente.');$existing=GoodsReceipt::where('purchase_order_id',$id)->where('idempotency_key',$cut['data']['idempotency_key'])->first();abort_unless($existing||hash_equals($this->revision($order,$binding),$cut['revision']),409,'Recepção alterada por outra operação. Confira novamente.');if(!$existing){$current=app(ReceiptCatalogue::class)->selected($cut['data']);abort_unless(($cut['item_revisions']??null)===$current,409,'O artigo mudou desde a previa. Confira novamente.');}$receipt=app(ReceiptWorkflow::class)->confirm($actor,$order,$cut['data']);if(!$existing)app(\Tempo\Purchasing\Embedded\Services\RequisitionWorkflow::class)->audit($actor,'sgf.receipt.confirmed',\Tempo\Purchasing\Embedded\Models\Requisition::findOrFail($order->requisition_id),null,$origin+['receipt_id'=>$receipt->id,'binding_revision'=>$fingerprint]);return response()->json($this->result($receipt,(bool)$existing),$existing?200:201);});} + public function receipt(int $id,ReceiptRuntime $runtime){$can=$this->canConfirm();return $runtime->run('purchasing_receipts.view',function($actor,$binding)use($id,$can){$receipt=GoodsReceipt::findOrFail($id);$this->order($receipt->purchase_order_id,$binding);Gate::authorize('view',$receipt);return response()->json($this->result($receipt,true)+['documents_enabled'=>config('receipt_qa.receipt_documents_enabled')===true,'document_revision'=>hash('sha256',\Tempo\Finance\Payables\Payables::canonical([$receipt->getAttributes()])),'can_attach'=>$can&&config('receipt_qa.receipt_documents_enabled')===true&&app(\Tempo\Purchasing\Embedded\Services\ReceiptDocuments::class)->canAdd($actor,$receipt)]);});} +} diff --git a/app/Modules/Purchasing/ReceiptDocumentsController.php b/app/Modules/Purchasing/ReceiptDocumentsController.php new file mode 100644 index 0000000..27dc275 --- /dev/null +++ b/app/Modules/Purchasing/ReceiptDocumentsController.php @@ -0,0 +1,55 @@ +hash([request()->session()->get('company_context')]); } + private function source(int $id,array $binding):GoodsReceipt { + $receipt=GoodsReceipt::findOrFail($id); + $order=PurchaseOrder::where('id',$receipt->purchase_order_id)->where(fn($q)=>$q->whereIn('id',$binding['order_ids'])->orWhereIn('requisition_id',RequisitionAccess::ids($binding)))->first(); + abort_unless($order,403);Gate::authorize('viewOrder',[GoodsReceipt::class,$order]);Gate::authorize('view',$receipt);return $receipt; + } + private function meta(UploadedFile $file):array { return ['sha256'=>hash_file('sha256',$file->getPathname()),'size'=>$file->getSize(),'mime'=>$file->getMimeType(),'name'=>$file->getClientOriginalName()]; } + private function integrity(ReceiptDocument $doc,string $root):void { + $file=app(SupplierDocumentFiles::class)->path($root,$doc->path,(int)$doc->tenant_id,(int)$doc->goods_receipt_id); + abort_unless(filesize($file)===(int)$doc->size&&hash_equals($doc->sha256,hash_file('sha256',$file)),409,'O ficheiro difere da evidência registada.'); + } + private function same(GoodsReceipt $receipt,array $cut):?ReceiptDocument { return ReceiptDocument::where('goods_receipt_id',$receipt->id)->where('document_type',$cut['document_type'])->where('sha256',$cut['file']['sha256'])->first(); } + public function index(int $id,Request $r,ReceiptRuntime $runtime) { + $this->guard();$d=$r->validate(['page'=>'sometimes|integer|min:1|max:10000']);abort_if(array_diff(array_keys($r->query()),array_keys($d)),422); + return $runtime->run('purchasing_receipts.view',function($a,$b)use($id,$d){$receipt=$this->source($id,$b);abort_unless(app(ReceiptDocuments::class)->canRead($a,$receipt),403);return response()->json(ReceiptDocument::where('goods_receipt_id',$id)->orderByDesc('id')->paginate(15,self::FIELDS,'page',(int)($d['page']??1)))->header('Cache-Control','private, no-store');}); + } + public function preview(int $id,Request $r,ReceiptRuntime $runtime) { + $this->guard();$d=$r->validate(['operation_key'=>'required|uuid','revision'=>'required|string|size:64','reason'=>'required|string|min:10|max:2000','document_type'=>'required|string|max:30','file'=>'required|file|max:2048']);abort_if(array_diff(array_keys($r->all()),array_keys($d)),422);unset($d['file']);$d['operation_key']=strtolower($d['operation_key']);$generation=$this->generation();$meta=$this->meta($r->file('file')); + return $runtime->run('purchasing_receipts.confirm',function($a,$b,$f)use($id,$r,$d,$generation,$meta){$receipt=$this->source($id,$b);$service=app(ReceiptDocuments::class);abort_unless($service->canAdd($a,$receipt),403);abort_unless(hash_equals($this->hash([$receipt->getAttributes()]),$d['revision']),409,'A recepção mudou. Confira novamente.');$files=app(SupplierDocumentFiles::class);$stage=$files->root(true,'receipt');$db=DB::connection();$level=$db->transactionLevel();$document=null;$existing=$this->same($receipt,$d+['file'=>$meta]);$db->beginTransaction(); + try{$document=$files->using($stage,fn()=>$service->add($a,$receipt,$d,$r->file('file')),'receipt_documents');$impact=['document'=>$document->only(self::FIELDS),'reused'=>$existing!==null,'receipt_unchanged'=>true,'stock_unchanged'=>true,'reason'=>$d['reason']];unset($impact['document']['id'],$impact['document']['created_at']);} + finally{while($db->transactionLevel()>$level)$db->rollBack();if($document&&!$existing)$files->discard($stage,$document->path,(int)$receipt->tenant_id,$id,'receipt_documents');} + // A reused document belongs to permanent storage; never delete or stage it. + if($existing)$this->integrity($existing,$files->root(false,'receipt')); + $cut=$d+['receipt_id'=>$id,'actor'=>$a->id,'binding'=>$f,'generation'=>$generation,'file'=>$meta,'observed'=>time()];return response()->json(['preview'=>Crypt::encryptString(json_encode($cut,JSON_THROW_ON_ERROR)),'impact'=>$impact]);}); + } + public function confirm(int $id,Request $r,ReceiptRuntime $runtime) { + $this->guard();$d=$r->validate(['preview'=>'required|string|max:131072','file'=>'required|file|max:2048']);abort_if(array_diff(array_keys($r->all()),array_keys($d)),422);try{$cut=json_decode(Crypt::decryptString($d['preview']),true,64,JSON_THROW_ON_ERROR);}catch(\Throwable){abort(409,'Prévia inválida.');}$meta=$this->meta($r->file('file'));$generation=$this->generation();$created=null; + try{return $runtime->run('purchasing_receipts.confirm',function($a,$b,$f,$o)use($id,$r,$cut,$meta,$generation,&$created){$receipt=$this->source($id,$b);$service=app(ReceiptDocuments::class);abort_unless($service->canAdd($a,$receipt),403); + abort_unless(($cut['receipt_id']??null)===$id&&($cut['actor']??null)===$a->id&&($cut['binding']??null)===$f&&($cut['generation']??null)===$generation&&($cut['file']??null)===$meta&&is_int($cut['observed']??null)&&$cut['observed']<=time()&&$cut['observed']>=time()-600,409,'O ficheiro, contexto ou prévia mudou.'); + $hash=$this->hash([$id,$cut['file'],$cut['document_type'],$cut['reason']]);$files=app(SupplierDocumentFiles::class);$root=$files->root(false,'receipt');$old=AuditLog::where('action','sgf.receipt.document')->where('after->operation_key',$cut['operation_key'])->first(); + if($old){abort_unless($old->user_id===$a->id&&($old->after['request_hash']??null)===$hash&&($old->after['binding']??null)===$f,409,'Chave usada com outro conteúdo.');$doc=ReceiptDocument::where('goods_receipt_id',$id)->findOrFail($old->after['result']['document_id']);$this->integrity($doc,$root);return response()->json($old->after['result']+['replayed'=>true]);} + abort_unless(hash_equals($this->hash([$receipt->getAttributes()]),$cut['revision']),409,'A recepção mudou desde a conferência.');$existing=$this->same($receipt,$cut);$document=$files->using($root,fn()=>$service->add($a,$receipt,$cut,$r->file('file')),'receipt_documents');if(!$existing)$created=['root'=>$root,'path'=>$document->path,'tenant'=>(int)$receipt->tenant_id,'receipt'=>$id];$this->integrity($document,$root); + $result=['receipt_id'=>$id,'document_id'=>$document->id,'document'=>$document->only(self::FIELDS),'reused'=>$existing!==null,'receipt_unchanged'=>true,'stock_unchanged'=>true];$order=PurchaseOrder::findOrFail($receipt->purchase_order_id);app(RequisitionWorkflow::class)->audit($a,'sgf.receipt.document',Requisition::findOrFail($order->requisition_id),null,$o+['operation_key'=>$cut['operation_key'],'request_hash'=>$hash,'binding'=>$f,'reason'=>$cut['reason'],'result'=>$result]);return response()->json($result+['replayed'=>false],201);});} + catch(\Throwable $e){if($created){try{$exists=DB::connection('receipt_native')->table('receipt_documents')->where(['tenant_id'=>$created['tenant'],'goods_receipt_id'=>$id,'path'=>$created['path']])->exists();if(!$exists)app(SupplierDocumentFiles::class)->discard($created['root'],$created['path'],$created['tenant'],$id,'receipt_documents');}catch(\Throwable){/* An uncertain commit retains its evidence. */}}throw $e;} + } + public function download(int $id,int $document,Request $r,ReceiptRuntime $runtime) { + $this->guard();abort_if($r->query(),422);return $runtime->run('purchasing_receipts.view',function($a,$b,$f,$o)use($id,$document,$r){$receipt=$this->source($id,$b);$doc=ReceiptDocument::where('goods_receipt_id',$id)->findOrFail($document);$files=app(SupplierDocumentFiles::class);$root=$files->root(false,'receipt');$files->path($root,$doc->path,(int)$doc->tenant_id,$id);$input=Request::create('/embedded/receipt-document','GET');$input->setUserResolver(fn($guard=null)=>$a); + $response=$files->using($root,fn()=>(new \Tempo\Purchasing\Embedded\Http\Controllers\ReceiptDocumentController)->download($input,$receipt,$document,app(ReceiptDocuments::class)),'receipt_documents');$order=PurchaseOrder::findOrFail($receipt->purchase_order_id);app(RequisitionWorkflow::class)->audit($a,'sgf.receipt.document_downloaded',Requisition::findOrFail($order->requisition_id),null,$o+['receipt_id'=>$id,'document_id'=>$document,'sha256'=>$doc->sha256]);return $response;}); + } +} diff --git a/app/Modules/Purchasing/ReceiptRuntime.php b/app/Modules/Purchasing/ReceiptRuntime.php new file mode 100644 index 0000000..e40768d --- /dev/null +++ b/app/Modules/Purchasing/ReceiptRuntime.php @@ -0,0 +1,94 @@ +'app/','Laravel\\Fortify\\'=>'fortify/']as$prefix=>$directory){ + if(!str_starts_with($class,$prefix))continue; + $tail=substr($class,strlen($prefix));abort_unless(preg_match('/^[A-Za-z0-9_\\\\]+$/D',$tail),503); + $relative=$directory.str_replace('\\','/',$tail).'.php';$pin=$files[$relative]??null;$file=realpath($bundle.'/'.$relative);$base=realpath($bundle); + abort_unless(is_string($pin)&&preg_match('/^[a-f0-9]{64}$/D',$pin)&&$base&&$file&&str_starts_with(strtolower($file),strtolower($base.DIRECTORY_SEPARATOR))&&!is_link($bundle.'/'.$relative)&&hash_equals($pin,hash_file('sha256',$file)),503,'Dependência do pacote incompatível.'); + require_once $file;return; + } + } + public function run(string $right,\Closure $work):mixed + { + abort_unless(config('receipt_qa.enabled')===true,404); + if(str_starts_with($right,'purchasing_obligations.'))abort_unless(config('receipt_qa.obligations_enabled')===true,404); + if(str_starts_with($right,'purchasing_invoices.'))abort_unless(config('receipt_qa.invoices_enabled')===true,404); + if(str_starts_with($right,'purchasing_requests.'))abort_unless(config('receipt_qa.requests_enabled')===true,404); + if(str_starts_with($right,'purchasing_orders.'))abort_unless(config('receipt_qa.orders_enabled')===true,404); + if(str_starts_with($right,'purchasing_suppliers.'))abort_unless(config('receipt_qa.suppliers_enabled')===true,404); + if(str_starts_with($right,'purchasing_sourcing.'))abort_unless(config('receipt_qa.sourcing_enabled')===true,404); + abort_unless(app()->environment('budget-testing'),403); + BudgetAdapter::guard(); + $host=DB::connection();$db=$host->getDatabaseName();$role=$host->getConfig('username'); + abort_unless(preg_match('/^budget_core_sgf_([a-f0-9]{12})$/D',$db,$m)&&$role==='ir_composition_'.$m[1],403); + $run=(string)getenv('SGF_ISOLATED_REGRESSION_RUN'); + $hostConfig=$host->getConfig();abort_unless(preg_match('/^[a-f0-9]{12}$/D',$run)&&($hostConfig['host']??null)==='127.0.0.1'&&(int)($hostConfig['port']??0)===55439&&empty($hostConfig['read'])&&empty($hostConfig['write'])&&($hostConfig['search_path']??'public')==='public',403); + $identity=$host->selectOne("SELECT current_user role,current_setting('cluster_name') cluster,rolsuper OR rolcreatedb OR rolcreaterole OR rolreplication OR rolbypassrls elevated FROM pg_roles WHERE rolname=current_user"); + abort_unless(!$identity->elevated&&$identity->role===$role&&$identity->cluster==='sgf_modular_regression_'.$run,403); + $expected='C:/laragon/data/sgf-tempo/run/modular-regression-'.$run.'/private/receipt-composition-'.$m[1]; + $profile=realpath((string)config('receipt_qa.profile')); + abort_unless($profile&&strtolower(str_replace('\\','/',$profile))===strtolower($expected.'/binding.json'),403); + $p=json_decode(file_get_contents($profile),true,64,JSON_THROW_ON_ERROR); + $ctx=app(CompanyContext::class);$scope=$ctx->identifiers()+['unit_id'=>$ctx->unitId()];$user=$ctx->userId(); + abort_unless($scope['unit_id']&&request()->user()->id===$user,403); + $key=implode(':',array_values($scope)).':'.$user;$binding=$p['bindings'][$key]??null;abort_unless($binding,403,'Origem de recepção não autorizada neste contexto.'); + if(config('receipt_qa.obligations_enabled')===true)abort_unless(($binding['payable_instance']??null)==='qa-stock-ledger-'.$m[1]&&config('common-payables.source_instance')===$binding['payable_instance']&&config('common-payables.history_enabled')===false&&config('common-payables.history_decisions_enabled')===false,403); + $p['context_key']=$key; + $bundle=realpath($expected.'/bundle');$manifest=$bundle.'/manifest.json'; + abort_unless($bundle&&hash_equals($p['manifest_sha256'],hash_file('sha256',$manifest)),503); + $files=json_decode(file_get_contents($manifest),true,64,JSON_THROW_ON_ERROR)['files']; + foreach($files as$file=>$pin)abort_unless(preg_match('~^(app|fortify)/[A-Za-z0-9_/]+\.php$~D',$file)&&!str_contains($file,'..')&&is_string($pin)&&preg_match('/^[a-f0-9]{64}$/D',$pin),503); + if(config('receipt_qa.orders_enabled')===true||config('receipt_qa.sourcing_enabled')===true){ + $economic=$expected.'/economic';abort_unless(isset($p['economic_manifest_sha256'])&&is_file($economic.'/manifest.json')&&hash_equals($p['economic_manifest_sha256'],hash_file('sha256',$economic.'/manifest.json')),503); + $economicFiles=json_decode(file_get_contents($economic.'/manifest.json'),true,32,JSON_THROW_ON_ERROR)['files'];$names=array_keys($economicFiles);sort($names);abort_unless($names===['ProposalScoring.php','QuotationPricing.php'],503); + foreach($economicFiles as$file=>$pin){abort_unless(is_file($economic.'/'.$file)&&!is_link($economic.'/'.$file)&&hash_equals($pin,hash_file('sha256',$economic.'/'.$file)),503);$class='Tempo\\Purchasing\\Economic\\'.basename($file,'.php');if(class_exists($class,false)){abort_unless(hash_equals($pin,hash_file('sha256',(new \ReflectionClass($class))->getFileName())),503);}else require_once $economic.'/'.$file;} + } + if(config('receipt_qa.requests_enabled')===true){ + $internal=$expected.'/internal';abort_unless(isset($p['internal_manifest_sha256'])&&hash_equals($p['internal_manifest_sha256'],hash_file('sha256',$internal.'/manifest.json')),503);$pins=json_decode(file_get_contents($internal.'/manifest.json'),true,32,JSON_THROW_ON_ERROR)['files'];$names=array_keys($pins);sort($names);abort_unless($names===['InternalRequisitions.php','RequisitionFailure.php','RequisitionPort.php'],503);foreach(['RequisitionPort.php','RequisitionFailure.php','InternalRequisitions.php']as$file){$pin=$pins[$file];abort_unless(preg_match('/^[a-f0-9]{64}$/D',$pin)&&!is_link($internal.'/'.$file)&&hash_equals($pin,hash_file('sha256',$internal.'/'.$file)),503);$class='Tempo\\Purchasing\\Internal\\'.basename($file,'.php');if(class_exists($class,false)||interface_exists($class,false)){abort_unless(hash_equals($pin,hash_file('sha256',(new \ReflectionClass($class))->getFileName())),503);}else require_once $internal.'/'.$file;} + } + if(!isset(self::$loaded[$bundle])){ + abort_unless(self::$loaded===[],503,'Uma só versão do workflow por processo.'); + spl_autoload_register(fn($class)=>self::loadClass($class,$bundle,$files)); + Gate::policy(\Tempo\Purchasing\Embedded\Models\GoodsReceipt::class,\Tempo\Purchasing\Embedded\Policies\GoodsReceiptPolicy::class);Gate::policy(\Tempo\Purchasing\Embedded\Models\Supplier::class,\Tempo\Purchasing\Embedded\Policies\SupplierPolicy::class);self::$loaded[$bundle]=true; + app()->singleton(\Tempo\Purchasing\Embedded\Services\ReplenishmentRun::class); + } + $connection=$p['connection'];abort_unless(($connection['driver']??null)==='pgsql'&&($connection['host']??null)==='127.0.0.1'&&(int)($connection['port']??0)===55439 + &&($connection['database']??null)==='compras_receipts_test_'.$m[1]&&($connection['username']??null)==='payable_history_native_'.$m[1] + &&empty($connection['url'])&&empty($connection['read'])&&empty($connection['write'])&&($connection['search_path']??null)==='public',403); + config(['database.connections.receipt_native'=>$connection]);$native=DB::connection('receipt_native'); + $i=$native->selectOne("SELECT current_user role,current_database() db,current_setting('cluster_name') cluster,rolsuper OR rolcreatedb OR rolcreaterole OR rolreplication OR rolbypassrls elevated FROM pg_roles WHERE rolname=current_user"); + abort_unless(!$i->elevated&&$i->role===$connection['username']&&$i->db===$connection['database']&&$i->cluster==='sgf_modular_regression_'.$run,403); + return $host->transaction(function()use($host,$scope,$user,$right,$binding,$work,$p,$native){ + // Hold existing authority until the native transaction ends; no host business writes. + abort_unless($host->table('users')->where('id',$user)->lockForUpdate()->first(),403); + abort_unless($host->table('company_memberships')->where(['user_id'=>$user,'tenant_id'=>$scope['tenant_id'],'company_id'=>$scope['company_id']])->lockForUpdate()->first(),403); + $view=str_starts_with($right,'purchasing_invoices.')?'purchasing_invoices.view':(str_starts_with($right,'purchasing_requests.')?'purchasing_requests.view':(str_starts_with($right,'purchasing_suppliers.')?'purchasing_suppliers.view':(str_starts_with($right,'purchasing_sourcing.')?'purchasing_sourcing.view':(str_starts_with($right,'purchasing_orders.')?'purchasing_orders.view':'purchasing_receipts.view')))); + if(str_starts_with($right,'purchasing_obligations.'))$view='purchasing_obligations.view'; + foreach(['company.view'=>null,'unit.view'=>$scope['unit_id'],$view=>$scope['unit_id'],$right=>$scope['unit_id']]as$permission=>$unit) + abort_unless($host->table('permission_grants')->where(['user_id'=>$user,'tenant_id'=>$scope['tenant_id'],'company_id'=>$scope['company_id'],'unit_id'=>$unit,'permission'=>$permission])->lockForUpdate()->first(),403); + $default=DB::getDefaultConnection();$guard=Auth::getDefaultDriver();$environment=app()->environment(); + config(['auth.guards.receipt_native'=>['driver'=>'session','provider'=>'receipt_native'],'auth.providers.receipt_native'=>['driver'=>'eloquent','model'=>\Tempo\Purchasing\Embedded\Models\User::class]]); + DB::setDefaultConnection('receipt_native');Schema::clearResolvedInstance('db.schema');Auth::shouldUse('receipt_native');app()->instance('env','testing'); + try{ + $actor=\Tempo\Purchasing\Embedded\Models\User::where('tenant_id',$binding['tenant_id'])->findOrFail($binding['actor_id']);Auth::guard('receipt_native')->setUser($actor); + return $native->transaction(function()use($native,$actor,$binding,$work,$p){ + $native->table('tenants')->where('id',$actor->tenant_id)->lockForUpdate()->firstOrFail(); + $version=[$p['context_key'],$binding,$p['manifest_sha256']];$origin=['sgf_context_key'=>$p['context_key'],'workflow_manifest'=>$p['manifest_sha256']]; + if(isset($p['internal_manifest_sha256'])){$version[]=$p['internal_manifest_sha256'];$origin['internal_manifest']=$p['internal_manifest_sha256'];} + if(isset($p['economic_manifest_sha256'])){$version[]=$p['economic_manifest_sha256'];$origin['economic_manifest']=$p['economic_manifest_sha256'];} + return $work($actor,$binding,hash('sha256',json_encode($version,JSON_THROW_ON_ERROR)),$origin); + }); + }finally{Auth::forgetGuards();Auth::shouldUse($guard);DB::setDefaultConnection($default);Schema::clearResolvedInstance('db.schema');app()->instance('env',$environment);} + }); + } +} diff --git a/app/Modules/Purchasing/RequestController.php b/app/Modules/Purchasing/RequestController.php new file mode 100644 index 0000000..534f1a6 --- /dev/null +++ b/app/Modules/Purchasing/RequestController.php @@ -0,0 +1,53 @@ +load(['items','steps'])->toArray();} + private function source(int $id,array $b,object $a):?Requisition{abort_unless($a->hasFunctions(['requester','procurement','finance','department_head']),403);if(!$id)return null;abort_unless(RequisitionAccess::allowed($id,$b),403);return Requisition::visibleTo($a)->findOrFail($id);} + private function right(string $a):string{return ['save'=>'prepare','submit'=>'submit','decide'=>'approve'][$a];} + private function rights():array{$c=app(\App\Shared\Context\CompanyContext::class);$s=$c->identifiers();$p=app(\App\Modules\Identity\Services\Permissions::class);$v=[];foreach(['prepare','submit','approve']as$r)$v[$r]=$p->has($c->userId(),$s['tenant_id'],$s['company_id'],'purchasing_requests.'.$r,$c->unitId());return $v;} + private function historyPage(int $id,object $actor,string $binding,int $size=25,?string $token=null):array { + $generation=$this->hash(request()->session()->get('company_context'));$cursor=null; + if($token!==null){try{$cut=json_decode(Crypt::decryptString($token),true,32,JSON_THROW_ON_ERROR);}catch(\Throwable){abort(409,'Cursor inválido. Actualize o histórico.');} + abort_unless(($cut['request']??null)===$id&&($cut['actor']??null)===$actor->id&&($cut['binding']??null)===$binding&&($cut['generation']??null)===$generation&&($cut['size']??null)===$size&&is_int($cut['observed']??null)&&$cut['observed']>=time()-600&&$cut['observed']<=time()&&is_string($cut['cursor']??null),409,'A consulta ou o contexto mudou. Actualize o histórico.'); + $cursor=\Illuminate\Pagination\Cursor::fromEncoded($cut['cursor']);abort_unless($cursor,409,'Cursor inválido. Actualize o histórico.'); + } + $page=app(ProcessHistory::class)->query($id,'requests')->orderByDesc('id')->cursorPaginate($size,['id','user_id','action','created_at','before','after'],'cursor',$cursor); + $encode=fn($value)=>$value?Crypt::encryptString(json_encode(['request'=>$id,'actor'=>$actor->id,'binding'=>$binding,'generation'=>$generation,'size'=>$size,'observed'=>time(),'cursor'=>$value->encode()],JSON_THROW_ON_ERROR)):null; + return ['data'=>$page->items(),'navigation'=>['next'=>$encode($page->nextCursor()),'previous'=>$encode($page->previousCursor()),'per_page'=>$size,'order'=>'sequence_desc']]; + } + public function history(int $id,Request $r,ReceiptRuntime $rt){ + $this->guard();abort_unless(config('receipt_qa.request_history_enabled')===true,404);abort_unless($id>0,404);$d=$r->validate(['per_page'=>'sometimes|integer|in:25,100','cursor'=>'sometimes|required|string|max:16384']);abort_if(array_diff(array_keys($r->query()),array_keys($d)),422); + return $rt->run('purchasing_requests.view',function($a,$b,$fingerprint)use($id,$d){$this->source($id,$b,$a);return response()->json($this->historyPage($id,$a,$fingerprint,(int)($d['per_page']??25),$d['cursor']??null))->header('Cache-Control','private, no-store');}); + } + private function dispatch(string $action,array $data,?Requisition $record,object $actor,array $binding,string $key):array{ + $workflow=app(RequisitionWorkflow::class);$before=$this->state($record); + if($action==='save'){ + abort_if(array_diff(array_keys($data),['cost_center_id','priority','needed_by','justification','items']),422); + Validator::make($data,['items'=>'required|array|min:1|max:50','items.*'=>'array:description,category,purchase_type,unit,quantity,unit_price,tax_rate','items.*.purchase_type'=>'required|in:consumable,service,other'])->validate(); + $input=(new \Tempo\Purchasing\Embedded\Http\Requests\StoreRequisitionRequest)->setUserResolver(fn()=>$actor); + $data=Validator::make($data,$input->rules())->validate();abort_unless(in_array((int)$data['cost_center_id'],$binding['centre_ids']??[],true),403); + $record=$workflow->save($actor,$data+['operation_key'=>$key]+($record?['process_version'=>(int)$record->process_version]:[]),$record); + }elseif($action==='submit'){ + abort_unless($record&&$data===[],422);$workflow->submit($actor,$record,$key,(int)$record->process_version); + }else{ + abort_unless($record,422);abort_if(array_diff(array_keys($data),['decision','comment']),422);$data=Validator::make($data,['decision'=>'required|in:approved,rejected','comment'=>'required|string|min:10|max:2000'])->validate();$workflow->decide($actor,$record,$data['decision'],$data['comment'],$key,(int)$record->process_version); + } + $record->refresh();return ['result'=>['request_id'=>$record->id,'status'=>$record->status,'version'=>(int)$record->process_version],'impact'=>['operation'=>$action,'before'=>$before,'after'=>$this->state($record),'budget_authority'=>'Compras: mesmo livro da ordem; sem reserva no host SGF','reservation_on_submit'=>$action==='submit','release_on_rejection'=>$action==='decide'&&$data['decision']==='rejected']]; + } + public function screen(Request $r,ReceiptRuntime $rt){$this->guard();$rt->run('purchasing_requests.view',fn($a)=>$this->source(0,[],$a));return response()->view('request-workspace',['context'=>$r->session()->get('company_context.token'),'csrf'=>csrf_token()]);} + public function index(Request $r,ReceiptRuntime $rt){$this->guard();$rights=$this->rights();$d=$r->validate(['page'=>'sometimes|integer|min:1|max:10000','status'=>'nullable|in:draft,pending,approved,rejected']);abort_if(array_diff(array_keys($r->query()),array_keys($d)),422);return $rt->run('purchasing_requests.view',function($a,$b)use($d,$rights){$this->source(0,$b,$a);$q=Requisition::visibleTo($a)->whereIn('id',RequisitionAccess::ids($b));if($d['status']??'')$q->where('status',$d['status']);return response()->json(['requests'=>$q->orderByDesc('id')->paginate(15,['id','number','status','process_version'],'page',(int)($d['page']??1)),'centres'=>CostCenter::whereIn('id',$b['centre_ids']??[])->where('department_id',$a->department_id)->get(['id','code','name']),'new_revision'=>$this->hash(null),'can_prepare'=>$rights['prepare']&&app(OrganizationAccess::class)->canRequest($a)]);});} + public function show(int $id,ReceiptRuntime $rt){$this->guard();abort_unless($id>0,404);$rights=$this->rights();return $rt->run('purchasing_requests.view',function($a,$b,$fingerprint)use($id,$rights){$r=$this->source($id,$b,$a);$state=$this->state($r);$own=$r->requester_id===$a->id&&$r->status==='draft';$paged=config('receipt_qa.request_history_enabled')===true?$this->historyPage($id,$a,$fingerprint):null;return response()->json(['request'=>$state,'revision'=>$this->hash($state),'capabilities'=>['save'=>$rights['prepare']&&$own,'submit'=>$rights['submit']&&$own,'decide'=>$rights['approve']&&$r->canDecide($a)],'history'=>$paged?$paged['data']:app(ProcessHistory::class)->query($id,'requests')->orderByDesc('id')->limit(25)->get(['id','user_id','action','created_at','before','after']),'history_navigation'=>$paged['navigation']??null]);});} + public function preview(int $id,Request $r,ReceiptRuntime $rt){$this->guard();$d=$r->validate(['operation_key'=>'required|uuid','revision'=>'required|string|size:64','action'=>'required|in:save,submit,decide','data'=>'present|array']);abort_if(array_diff(array_keys($r->all()),array_keys($d))||strlen(json_encode($d['data']))>65536||($id===0&&$d['action']!=='save'),422);$d['operation_key']=strtolower($d['operation_key']);return $rt->run('purchasing_requests.'.$this->right($d['action']),function($a,$b,$f)use($r,$id,$d){$record=$this->source($id,$b,$a);abort_unless(hash_equals($this->hash($this->state($record)),$d['revision']),409,'A requisição mudou. Confira novamente.');$db=DB::connection();$level=$db->transactionLevel();$db->beginTransaction();try{$out=$this->dispatch($d['action'],$d['data'],$record,$a,$b,$d['operation_key']);}finally{while($db->transactionLevel()>$level)$db->rollBack();}if(!$id){unset($out['impact']['after']['id'],$out['impact']['after']['number']);foreach($out['impact']['after']['items']as&$line)unset($line['id'],$line['requisition_id']);unset($line);}$cut=$d+['id'=>$id,'actor'=>$a->id,'binding'=>$f,'observed'=>time()];return response()->json(['preview'=>Crypt::encryptString(json_encode($cut,JSON_THROW_ON_ERROR)),'impact'=>$out['impact']]);});} + public function confirm(int $id,Request $r,ReceiptRuntime $rt){$this->guard();$d=$r->validate(['preview'=>'required|string|max:131072']);abort_if(array_diff(array_keys($r->all()),['preview']),422);try{$cut=json_decode(Crypt::decryptString($d['preview']),true,128,JSON_THROW_ON_ERROR);}catch(\Throwable){abort(409,'Prévia inválida.');}abort_unless(in_array($cut['action']??'',['save','submit','decide'],true),409);return $rt->run('purchasing_requests.'.$this->right($cut['action']),function($a,$b,$f,$o)use($id,$cut){$record=$this->source($id,$b,$a);abort_unless(($cut['id']??null)===$id&&($cut['actor']??null)===$a->id&&($cut['binding']??null)===$f&&is_int($cut['observed']??null)&&$cut['observed']>=time()-600&&$cut['observed']<=time(),409,'A prévia ou o contexto mudou.');$hash=$this->hash([$id,$cut['action'],$cut['data']]);$old=AuditLog::where('user_id',$a->id)->where('action','sgf.request.command')->where('after->operation_key',$cut['operation_key'])->first();if($old){abort_unless(($old->after['request_hash']??null)===$hash&&($old->after['binding_revision']??null)===$f,409,'Chave usada com outros dados.');return response()->json($old->after['result']+['replayed'=>true]);}abort_unless(hash_equals($this->hash($this->state($record)),$cut['revision']),409,'A requisição mudou desde a conferência.');$before=$this->state($record);$out=$this->dispatch($cut['action'],$cut['data'],$record,$a,$b,$cut['operation_key']);$record=Requisition::findOrFail($out['result']['request_id']);app(RequisitionWorkflow::class)->audit($a,'sgf.request.command',$record,$before,$o+['request_scope'=>RequisitionAccess::scope(),'operation_key'=>$cut['operation_key'],'request_hash'=>$hash,'binding_revision'=>$f,'command'=>$cut['action'],'result'=>$out['result']]);return response()->json($out['result']+['replayed'=>false],201);});} +} diff --git a/app/Modules/Purchasing/RequisitionAccess.php b/app/Modules/Purchasing/RequisitionAccess.php new file mode 100644 index 0000000..47feb98 --- /dev/null +++ b/app/Modules/Purchasing/RequisitionAccess.php @@ -0,0 +1,12 @@ +identifiers()+['unit_id'=>$c->unitId()],JSON_THROW_ON_ERROR));} + public static function ids(array $binding){return Requisition::query()->select('requisitions.id')->where(function($q)use($binding){$q->whereIn('requisitions.id',$binding['requisition_ids']??[]);if(config('receipt_qa.requests_enabled')===true)$q->orWhereExists(fn($a)=>$a->selectRaw('1')->from('audit_logs as ra')->whereColumn('ra.tenant_id','requisitions.tenant_id')->whereColumn('ra.requisition_id','requisitions.id')->where('ra.action','sgf.request.command')->where('ra.after->request_scope',self::scope()));});} + public static function allowed(int $id,array $binding):bool{return self::ids($binding)->where('requisitions.id',$id)->exists();} +} diff --git a/app/Modules/Purchasing/SourcingController.php b/app/Modules/Purchasing/SourcingController.php new file mode 100644 index 0000000..37f7bb6 --- /dev/null +++ b/app/Modules/Purchasing/SourcingController.php @@ -0,0 +1,77 @@ +['procurement'],'evaluate'=>['procurement','finance','department_head'],'select'=>['procurement'],'decide'=>['procurement','finance','department_head']]; + private const RIGHTS=['quote'=>'prepare','evaluate'=>'evaluate','select'=>'select','decide'=>'approve']; + private function guard():void{abort_unless(config('receipt_qa.sourcing_enabled')===true,404);} + private function viewer(object $actor):void{abort_unless($actor->hasFunctions(['admin','procurement','finance','department_head']),403);} + private function source(int $id,array $binding,object $actor):Requisition{$this->viewer($actor);abort_unless(RequisitionAccess::allowed($id,$binding),403);return Requisition::visibleTo($actor)->findOrFail($id);} + private function hash(mixed $value):string{return hash('sha256',Payables::canonical($value));} + private function state(Requisition $request):array{ + return ['request'=>$request->load(['items','steps'])->toArray(),'quotes'=>Quotation::where('requisition_id',$request->id)->with(['items','supplier','evaluations'])->orderBy('id')->get()->toArray(),'award'=>PurchaseAward::where('requisition_id',$request->id)->with('approvals')->first()?->toArray(),'comparison'=>app(ProposalComparison::class)->inspect($request)]; + } + private function rights():array{$c=app(\App\Shared\Context\CompanyContext::class);$s=$c->identifiers();$p=app(\App\Modules\Identity\Services\Permissions::class);$out=[];foreach(['prepare','evaluate','select','approve']as$r)$out[$r]=$p->has($c->userId(),$s['tenant_id'],$s['company_id'],'purchasing_sourcing.'.$r,$c->unitId());return $out;} + private function input(Request $r,array $data,object $actor):Request{$input=Request::create('/embedded/sourcing','POST',$data,[],[],['HTTP_ACCEPT'=>'application/json']);$input->setUserResolver(fn($guard=null)=>$actor);if($r->hasSession())$input->setLaravelSession($r->session());return $input;} + private function supplierAccess(string $action,array $data,array $binding,string $context):?string { + if($action!=='quote')return null; + $d=Validator::make($data,['supplier_id'=>'required|integer|min:1','supplier_revision'=>'sometimes|required|string|size:64'])->validate(); + $supplier=SupplierAccess::query($binding,$context)->find($d['supplier_id']);abort_unless($supplier,404); + $revision=$this->hash($supplier->toArray()); + if(isset($d['supplier_revision']))abort_unless(hash_equals($revision,$d['supplier_revision']),409,'O fornecedor mudou desde a selecção. Pesquise e confira novamente.'); + return $revision; + } + private function eligibleSuppliers(array $binding,string $context) { + return SupplierAccess::query($binding,$context)->where('status','active')->where('blocked',false)->whereDate('next_review','>=',today()); + } + public function suppliers(int $id,Request $r,ReceiptRuntime $runtime) { + $this->guard();$d=$r->validate(['page'=>'sometimes|integer|min:1|max:10000','per_page'=>'sometimes|integer|in:25,100','search'=>'sometimes|nullable|string|max:100']);abort_if(array_diff(array_keys($r->query()),array_keys($d)),422); + return $runtime->run('purchasing_sourcing.prepare',function($actor,$binding,$fingerprint,$origin)use($id,$d){ + $request=$this->source($id,$binding,$actor);abort_unless(app(QuotationParticipation::class)->canPrepare($actor,$request),403); + $q=$this->eligibleSuppliers($binding,$origin['sgf_context_key']); + if(isset($d['search'])&&$d['search']!=='')$q->where(fn($query)=>$query->whereRaw('position(lower(?) in lower(suppliers.name))>0',[$d['search']])->orWhereRaw('position(? in suppliers.nuit)>0',[$d['search']])); + $page=$q->orderBy('suppliers.name')->orderBy('suppliers.id')->paginate((int)($d['per_page']??25),['suppliers.*'],'page',(int)($d['page']??1)); + $page->through(fn($s)=>['id'=>$s->id,'name'=>$s->name,'nuit'=>$s->nuit,'version'=>$s->version,'selection_revision'=>$this->hash($s->toArray())]); + return response()->json($page)->header('Cache-Control','no-store'); + }); + } + private function dispatch(string $action,array $data,Requisition $request,object $actor,Request $http):array{ + $keys=match($action){'quote'=>['supplier_id','supplier_revision','reference','delivery_days','valid_until','payment_terms','no_conflict','items'],'evaluate'=>['quotation_id','quality','history','payment','comment','no_conflict'],'select'=>['quotation_id','justification','delivery_date','delivery_location'],'decide'=>['award_id','decision','comment']};abort_if(array_diff(array_keys($data),$keys),422); + $audit=app(RequisitionWorkflow::class); + if($action==='quote'){ + (new \Tempo\Purchasing\Embedded\Http\Controllers\QuotationController)->store($this->input($http,array_diff_key($data,['supplier_revision'=>true]),$actor),$request,$audit); + $quote=Quotation::where('requisition_id',$request->id)->where('supplier_id',$data['supplier_id'])->with(['supplier','items'])->firstOrFail(); + return ['result'=>['quotation_id'=>$quote->id],'impact'=>['operation'=>'Registar proposta','supplier'=>$quote->supplier->name,'total_minor'=>$quote->total_minor,'currency'=>$quote->currency,'lines'=>$quote->items->map(fn($i)=>$i->only(['description','quantity','unit_price_minor','tax_minor','total_minor']))->all()]]; + } + if($action==='evaluate'){ + $quote=Quotation::where('requisition_id',$request->id)->findOrFail($data['quotation_id']??0);$payload=$data;unset($payload['quotation_id']); + (new \Tempo\Purchasing\Embedded\Http\Controllers\QuotationController)->evaluate($this->input($http,$payload,$actor),$quote,$audit); + return ['result'=>['quotation_id'=>$quote->id,'evaluator_id'=>$actor->id],'impact'=>['operation'=>'Registar avaliação individual','supplier'=>$quote->supplier->name,'quality'=>$data['quality'],'history'=>$data['history'],'payment'=>$data['payment'],'comment'=>$data['comment']]]; + } + if($action==='select'){ + $validated=Validator::make($data,['quotation_id'=>'required|integer','justification'=>'required|string|min:10|max:5000','delivery_date'=>'required|date_format:Y-m-d|after_or_equal:today','delivery_location'=>'required|string|min:3|max:500'])->validate(); + $award=app(PurchaseWorkflow::class)->select($actor,$request,$validated); + return ['result'=>['award_id'=>$award->id,'status'=>$award->status],'impact'=>['operation'=>'Submeter adjudicação para aprovação distinta','supplier'=>Quotation::findOrFail($award->quotation_id)->supplier->name,'total_minor'=>$award->total_minor,'delivery_date'=>$validated['delivery_date'],'delivery_location'=>$award->delivery_location,'required_approvals'=>$award->approvals->pluck('role')->all()]]; + } + $validated=Validator::make($data,['award_id'=>'required|integer','decision'=>'required|in:approved,rejected','comment'=>'nullable|required_if:decision,rejected|string|max:2000'])->validate();$award=PurchaseAward::where('requisition_id',$request->id)->findOrFail($validated['award_id']); + app(PurchaseWorkflow::class)->decide($actor,$award,$validated['decision'],$validated['comment']??null);$award->refresh(); + return ['result'=>['award_id'=>$award->id,'status'=>$award->status],'impact'=>['operation'=>'Decidir adjudicação','decision'=>$validated['decision'],'resulting_status'=>$award->status,'total_minor'=>$award->total_minor,'comment'=>$validated['comment']??null]]; + } + public function screen(Request $r,ReceiptRuntime $runtime){$this->guard();$runtime->run('purchasing_sourcing.view',fn($actor)=>$this->viewer($actor));return response()->view('sourcing-workspace',['context'=>$r->session()->get('company_context.token'),'csrf'=>csrf_token()]);} + public function index(Request $r,ReceiptRuntime $runtime){$this->guard();$d=$r->validate(['page'=>'sometimes|integer|min:1|max:10000']);abort_if(array_diff(array_keys($r->query()),array_keys($d)),422);return $runtime->run('purchasing_sourcing.view',function($actor,$binding)use($d){$this->viewer($actor);return response()->json(Requisition::visibleTo($actor)->whereIn('id',RequisitionAccess::ids($binding))->where('status','approved')->orderBy('id')->paginate(25,['id','number','status'],'page',(int)($d['page']??1)));});} + public function history(int $id,Request $r,ReceiptRuntime $runtime){$this->guard();$d=$r->validate(['page'=>'sometimes|integer|min:1|max:10000']);abort_if(array_diff(array_keys($r->query()),array_keys($d)),422);return $runtime->run('purchasing_sourcing.view',function($actor,$binding)use($id,$d){$this->source($id,$binding,$actor);return response()->json(app(ProcessHistory::class)->query($id,'sourcing')->orderByDesc('id')->paginate(25,['id','user_id','action','created_at','before','after'],'page',(int)($d['page']??1)));});} + public function show(int $id,ReceiptRuntime $runtime){$this->guard();$rights=$this->rights();return $runtime->run('purchasing_sourcing.view',function($actor,$binding,$fingerprint,$origin)use($id,$rights){$request=$this->source($id,$binding,$actor);$state=$this->state($request);$part=app(QuotationParticipation::class);$quotes=Quotation::where('requisition_id',$id)->get()->keyBy('id');foreach($state['comparison']['rows']as&$row)$row['can_evaluate']=$rights['evaluate']&&$part->canEvaluate($actor,$request,$quotes[$row['id']]);unset($row);$award=PurchaseAward::where('requisition_id',$id)->first();return response()->json($state+['revision'=>$this->hash($this->state($request)),'capabilities'=>['quote'=>$rights['prepare']&&$part->canPrepare($actor,$request),'select'=>$rights['select']&&$actor->hasFunctions(['procurement'])&&$actor->id!==$request->requester_id&&!$award&&$state['comparison']['ready'],'decide'=>$rights['approve']&&$award&&app(PurchaseWorkflow::class)->canDecide($actor,$award,$request)],'suppliers'=>SupplierAccess::query($binding,$origin['sgf_context_key'])->where('status','active')->where('blocked',false)->whereDate('next_review','>=',today())->orderBy('id')->limit(25)->get(['id','name']),'history'=>app(ProcessHistory::class)->query($id,'sourcing')->orderByDesc('id')->limit(25)->get(['id','user_id','action','created_at'])]);});} + public function preview(int $id,Request $r,ReceiptRuntime $runtime){$this->guard();$d=$r->validate(['operation_key'=>'required|uuid','revision'=>'required|string|size:64','action'=>'required|in:quote,evaluate,select,decide','data'=>'required|array']);abort_if(array_diff(array_keys($r->all()),array_keys($d))||strlen(json_encode($d['data'],JSON_THROW_ON_ERROR))>65536,422);$d['operation_key']=strtolower($d['operation_key']);return $runtime->run('purchasing_sourcing.'.self::RIGHTS[$d['action']],function($actor,$binding,$fingerprint,$origin)use($id,$d,$r){$request=$this->source($id,$binding,$actor);$actor=app(CurrentActor::class)->lock($actor,self::ROLES[$d['action']]);abort_unless(hash_equals($this->hash($this->state($request)),$d['revision']),409,'O processo mudou. Actualize e confira novamente.'); + // Exact native validation/pricing in a rollback-only savepoint; no preview record is committed. + $db=DB::connection();$level=$db->transactionLevel();$db->beginTransaction();try{$supplierRevision=$this->supplierAccess($d['action'],$d['data'],$binding,$origin['sgf_context_key']);$out=$this->dispatch($d['action'],$d['data'],$request,$actor,$r);}finally{while($db->transactionLevel()>$level)$db->rollBack();} + $cut=$d+['supplier_revision'=>$supplierRevision,'request_id'=>$id,'actor'=>$actor->id,'binding'=>$fingerprint,'observed'=>time()];return response()->json(['preview'=>Crypt::encryptString(json_encode($cut,JSON_THROW_ON_ERROR)),'impact'=>$out['impact']+['stock'=>false,'order'=>false,'payment'=>false],'operation_key'=>$d['operation_key']]);});} + public function confirm(int $id,Request $r,ReceiptRuntime $runtime){$this->guard();$d=$r->validate(['preview'=>'required|string|max:131072']);abort_if(array_diff(array_keys($r->all()),['preview']),422);try{$cut=json_decode(Crypt::decryptString($d['preview']),true,128,JSON_THROW_ON_ERROR);}catch(\Throwable){abort(409,'Prévia inválida.');}abort_unless(isset(self::RIGHTS[$cut['action']??'']),409);return $runtime->run('purchasing_sourcing.'.self::RIGHTS[$cut['action']],function($actor,$binding,$fingerprint,$origin)use($id,$cut,$r){$request=$this->source($id,$binding,$actor);$actor=app(CurrentActor::class)->lock($actor,self::ROLES[$cut['action']]);abort_unless(($cut['request_id']??null)===$id&&($cut['actor']??null)===$actor->id&&($cut['binding']??null)===$fingerprint&&is_int($cut['observed']??null)&&$cut['observed']<=time()&&$cut['observed']>=time()-600,409,'A prévia ou o contexto mudou.');$hash=$this->hash([$cut['action'],$cut['data']]);$old=AuditLog::where('requisition_id',$id)->where('user_id',$actor->id)->where('action','sgf.sourcing.command')->where('after->operation_key',$cut['operation_key'])->first();if($old){$receipt=$old->after;abort_unless(($receipt['request_hash']??null)===$hash&&($receipt['binding_revision']??null)===$fingerprint,409,'Chave já usada com outros dados.');return response()->json($receipt['result']+['replayed'=>true]);}abort_unless(hash_equals($this->hash($this->state($request)),$cut['revision']),409,'O processo mudou desde a conferência.');$supplierRevision=$this->supplierAccess($cut['action'],$cut['data'],$binding,$origin['sgf_context_key']);if($cut['action']==='quote')abort_unless(is_string($cut['supplier_revision']??null)&&hash_equals($cut['supplier_revision'],$supplierRevision),409,'Fornecedor alterado; exige nova conferencia.');$out=$this->dispatch($cut['action'],$cut['data'],$request,$actor,$r);app(RequisitionWorkflow::class)->audit($actor,'sgf.sourcing.command',$request,null,$origin+['operation_key'=>$cut['operation_key'],'request_hash'=>$hash,'binding_revision'=>$fingerprint,'command'=>$cut['action'],'supplier_revision'=>$supplierRevision,'result'=>$out['result']]);return response()->json($out['result']+['replayed'=>false],201);});} +} diff --git a/app/Modules/Purchasing/StockReceiptTraceController.php b/app/Modules/Purchasing/StockReceiptTraceController.php new file mode 100644 index 0000000..b71ea80 --- /dev/null +++ b/app/Modules/Purchasing/StockReceiptTraceController.php @@ -0,0 +1,44 @@ +query()!==[],422); + $scope=$ctx->identifiers()+['unit_id'=>$ctx->unitId()];$user=$ctx->userId();$host=DB::connection(); + return $runtime->run('purchasing_receipts.view',function($actor,$binding)use($id,$scope,$user,$host){ + abort_unless($host->table('permission_grants')->where($scope+['user_id'=>$user,'permission'=>'stock.view'])->sharedLock()->first(),403); + $tag=substr($host->getDatabaseName(),strlen('budget_core_sgf_')); + $file='C:/laragon/data/sgf-tempo/run/modular-regression-'.getenv('SGF_ISOLATED_REGRESSION_RUN').'/private/receipt-composition-'.$tag.'/stock-binding.json'; + abort_unless(is_file($file)&&!is_link($file),503,'Origem de stock indisponível.'); + try{$profile=json_decode(file_get_contents($file),true,32,JSON_THROW_ON_ERROR);}catch(\JsonException){abort(503,'Origem de stock incompatível.');} + $stock=$profile['bindings'][implode(':',array_values($scope)).':'.$user]??null; + abort_unless($stock&&($stock['source_tenant_id']??null)===$binding['tenant_id'] + &&($profile['connection']['database']??null)===DB::connection()->getDatabaseName() + &&($stock['schema']??null)==='public'&&($stock['append_only']??false)===true,403); + $movement=DB::table('stock_movements')->where('tenant_id',$binding['tenant_id'])->where('id',$id) + ->whereIn('warehouse_id',array_values(array_intersect($stock['warehouse_ids']??[],$binding['warehouse_ids']))) + ->where('movement_type','receipt_in')->first(['id','goods_receipt_item_id','stock_item_id','warehouse_id','quantity_milli','snapshot']); + abort_unless($movement,403,'Movimento fora da origem autorizada.'); + $line=DB::table('goods_receipt_items')->where('tenant_id',$binding['tenant_id'])->where('id',$movement->goods_receipt_item_id)->first(); + abort_unless($line,409,'A evidência de origem exige nova conferência.'); + $receipt=GoodsReceipt::findOrFail($line->goods_receipt_id); + $order=PurchaseOrder::where('id',$receipt->purchase_order_id)->where(fn($q)=>$q->whereIn('id',$binding['order_ids'])->orWhereIn('requisition_id',RequisitionAccess::ids($binding)))->first(); + abort_unless($order,403);Gate::authorize('viewOrder',[GoodsReceipt::class,$order]);Gate::authorize('view',$receipt); + try{$snapshot=json_decode($movement->snapshot,true,64,JSON_THROW_ON_ERROR);}catch(\JsonException){abort(409,'A evidência de origem exige nova conferência.');} + abort_unless($receipt->tenant_id===$binding['tenant_id']&&(int)$receipt->warehouse_id===(int)$movement->warehouse_id + &&(int)$line->stock_item_id===(int)$movement->stock_item_id&&(string)$line->accepted_milli===(string)$movement->quantity_milli + &&(int)$movement->quantity_milli>0&&($snapshot['receipt_id']??null)===$receipt->id,409,'O movimento e a recepção exigem nova conferência.'); + return response()->json(['movement_id'=>(int)$movement->id,'order_id'=>$order->id,'receipt_id'=>$receipt->id, + 'href'=>'/purchasing/receipts?order='.$order->id.'&receipt='.$receipt->id,'read_only'=>true])->header('Cache-Control','no-store'); + }); + } +} diff --git a/app/Modules/Purchasing/SupplierAccess.php b/app/Modules/Purchasing/SupplierAccess.php new file mode 100644 index 0000000..c0b6ed0 --- /dev/null +++ b/app/Modules/Purchasing/SupplierAccess.php @@ -0,0 +1,16 @@ +where(function($q)use($binding,$context){ + $q->whereIn('suppliers.id',$binding['supplier_ids']??[]); + if(config('receipt_qa.suppliers_enabled')===true)$q->orWhereExists(fn($a)=>$a->selectRaw('1')->from('audit_logs as sa')->whereColumn('sa.tenant_id','suppliers.tenant_id')->where('sa.action','sgf.supplier.command')->where('sa.after->supplier_scope',self::scope($context))->whereRaw("sa.after->'result'->>'supplier_id'=suppliers.id::text")); + }); + } +} diff --git a/app/Modules/Purchasing/SupplierController.php b/app/Modules/Purchasing/SupplierController.php new file mode 100644 index 0000000..1036233 --- /dev/null +++ b/app/Modules/Purchasing/SupplierController.php @@ -0,0 +1,41 @@ +hasFunctions(['admin','procurement','finance','department_head']),403);} + private function hash(mixed $data):string{return hash('sha256',Payables::canonical([$data]));} + private function source(int $id,array $b,object $a,string $context):?Supplier{$this->viewer($a);return $id===0?null:SupplierAccess::query($b,$context)->findOrFail($id);} + private function revision(?Supplier $s):string{return $this->hash($s?->toArray());} + private function rights():array{$c=app(\App\Shared\Context\CompanyContext::class);$s=$c->identifiers();$p=app(\App\Modules\Identity\Services\Permissions::class);$out=[];foreach(['prepare','review']as$r)$out[$r]=$p->has($c->userId(),$s['tenant_id'],$s['company_id'],'purchasing_suppliers.'.$r,$c->unitId());return $out;} + private function right(string $action):string{return $action==='review'?'review':'prepare';} + private function dispatch(string $action,array $data,?Supplier $supplier,object $actor,Request $http):array{ + $controller=new \Tempo\Purchasing\Embedded\Http\Controllers\SupplierController;$workflow=app(RequisitionWorkflow::class); + $class=$action==='review'?Request::class:\Tempo\Purchasing\Embedded\Http\Requests\SaveSupplierRequest::class; + $input=$class::create('/embedded/suppliers','POST',$data,[],[],['HTTP_ACCEPT'=>'application/json']); + $input->setUserResolver(fn($guard=null)=>$actor);if($http->hasSession())$input->setLaravelSession($http->session()); + if($action!=='review'){ + $input->setContainer(app())->setRedirector(app('redirect')); + $route=new \Illuminate\Routing\Route(['POST'],'embedded/suppliers/{supplier}',fn()=>null);$route->bind($input);if($supplier)$route->setParameter('supplier',$supplier);else $route->forgetParameter('supplier');$input->setRouteResolver(fn()=>$route); + abort_if(array_diff(array_keys($data),array_keys($input->rules())),422);$input->validateResolved(); + }else abort_if(array_diff(array_keys($data),['status','comment','version']),422); + if($action==='create'){$controller->store($input,$workflow);$supplier=Supplier::where('nuit',$data['nuit'])->firstOrFail();} + elseif($action==='update')$controller->update($input,$supplier,$workflow); + else $controller->review($input,$supplier,$workflow); + $supplier->refresh();return ['result'=>['supplier_id'=>$supplier->id,'status'=>$supplier->status,'version'=>$supplier->version],'impact'=>['operation'=>$action,'before'=>$action==='create'?null:$supplier->getOriginal(),'after'=>$supplier->toArray()]]; + } + public function screen(Request $r,ReceiptRuntime $rt){$this->guard();$rt->run('purchasing_suppliers.view',fn($a)=>$this->viewer($a));return response()->view('supplier-workspace',['context'=>$r->session()->get('company_context.token'),'csrf'=>csrf_token()]);} + public function index(Request $r,ReceiptRuntime $rt){$this->guard();$rights=$this->rights();$d=$r->validate(['page'=>'sometimes|integer|min:1|max:10000','search'=>'nullable|string|max:100','status'=>'nullable|in:pending,active,suspended']);abort_if(array_diff(array_keys($r->query()),array_keys($d)),422);return $rt->run('purchasing_suppliers.view',function($a,$b,$f,$o)use($d,$rights){$this->viewer($a);$q=SupplierAccess::query($b,$o['sgf_context_key']);if($d['search']??'')$q->where(fn($w)=>$w->where('name','ilike','%'.$d['search'].'%')->orWhere('nuit','like','%'.$d['search'].'%'));if($d['status']??'')$q->where('status',$d['status']);$part=app(SupplierParticipation::class);return response()->json(['suppliers'=>$q->orderBy('name')->orderBy('id')->paginate(15,['id','name','nuit','status','version'],'page',(int)($d['page']??1)),'new_revision'=>$this->revision(null),'can_prepare'=>$rights['prepare']&&$part->canPrepare($a)]);});} + public function show(int $supplier,ReceiptRuntime $rt){$this->guard();abort_unless($supplier>0,404);$rights=$this->rights();return $rt->run('purchasing_suppliers.view',function($a,$b,$f,$o)use($supplier,$rights){$s=$this->source($supplier,$b,$a,$o['sgf_context_key']);$part=app(SupplierParticipation::class);return response()->json(['supplier'=>$s,'revision'=>$this->revision($s),'documents_enabled'=>config('receipt_qa.supplier_documents_enabled')===true&&\Illuminate\Support\Facades\Gate::allows('viewDocuments',$s),'geography_enabled'=>config('geography.enabled')===true,'capabilities'=>['prepare'=>$rights['prepare']&&$part->canPrepare($a),'review'=>$rights['review']&&$part->canReview($a,$s)]]);});} + public function history(int $supplier,Request $r,ReceiptRuntime $rt){$this->guard();abort_unless($supplier>0,404);$d=$r->validate(['page'=>'sometimes|integer|min:1|max:10000']);return $rt->run('purchasing_suppliers.view',function($a,$b,$f,$o)use($supplier,$d){$s=$this->source($supplier,$b,$a,$o['sgf_context_key']);return response()->json(AuditLog::where('tenant_id',$s->tenant_id)->where(function($q)use($supplier){$q->where(fn($w)=>$w->whereIn('action',['supplier.created','supplier.updated','supplier.reviewed'])->where('after->id',$supplier))->orWhere(fn($w)=>$w->where('action','supplier.document_uploaded')->where('after->document->supplier_id',$supplier))->orWhere(fn($w)=>$w->where('action','supplier.document_downloaded')->where('after->supplier_id',$supplier))->orWhere(fn($w)=>$w->where('action','sgf.supplier.document')->where('after->result->supplier_id',$supplier))->orWhere(fn($w)=>$w->where('action','sgf.supplier.command')->where('after->result->supplier_id',$supplier));})->orderByDesc('id')->paginate(15,['id','user_id','action','created_at','before','after'],'page',(int)($d['page']??1)));});} + public function preview(int $supplier,Request $r,ReceiptRuntime $rt){$this->guard();$d=$r->validate(['operation_key'=>'required|uuid','revision'=>'required|string|size:64','action'=>'required|in:create,update,review','data'=>'required|array']);abort_if(array_diff(array_keys($r->all()),array_keys($d))||strlen(json_encode($d['data']))>16384,422);abort_unless(($supplier===0)===($d['action']==='create'),422);$d['operation_key']=strtolower($d['operation_key']);return $rt->run('purchasing_suppliers.'.$this->right($d['action']),function($a,$b,$f,$o)use($supplier,$r,$d){$s=$this->source($supplier,$b,$a,$o['sgf_context_key']);$a=app(CurrentActor::class)->lock($a,[$d['action']==='review'?'finance':'procurement']);abort_unless(hash_equals($this->revision($s),$d['revision']),409,'A ficha mudou. Confira novamente.');$before=$s?->toArray();$db=DB::connection();$level=$db->transactionLevel();$db->beginTransaction();try{$out=$this->dispatch($d['action'],$d['data'],$s,$a,$r);}finally{while($db->transactionLevel()>$level)$db->rollBack();}$out['impact']['before']=$before;if($d['action']==='create')unset($out['impact']['after']['id'],$out['impact']['after']['created_at'],$out['impact']['after']['updated_at']);$cut=$d+['supplier_id'=>$supplier,'actor'=>$a->id,'binding'=>$f,'observed'=>time()];return response()->json(['preview'=>Crypt::encryptString(json_encode($cut,JSON_THROW_ON_ERROR)),'impact'=>$out['impact']]);});} + public function confirm(int $supplier,Request $r,ReceiptRuntime $rt){$this->guard();$d=$r->validate(['preview'=>'required|string|max:65536']);abort_if(array_diff(array_keys($r->all()),['preview']),422);try{$cut=json_decode(Crypt::decryptString($d['preview']),true,64,JSON_THROW_ON_ERROR);}catch(\Throwable){abort(409,'Prévia inválida.');}abort_unless(in_array($cut['action']??'', ['create','update','review'],true),409);return $rt->run('purchasing_suppliers.'.$this->right($cut['action']),function($a,$b,$f,$o)use($supplier,$r,$cut){$s=$this->source($supplier,$b,$a,$o['sgf_context_key']);$a=app(CurrentActor::class)->lock($a,[$cut['action']==='review'?'finance':'procurement']);abort_unless(($cut['supplier_id']??null)===$supplier&&($cut['actor']??null)===$a->id&&($cut['binding']??null)===$f&&is_int($cut['observed']??null)&&$cut['observed']<=time()&&$cut['observed']>=time()-600,409,'A prévia ou contexto mudou.');$hash=$this->hash([$supplier,$cut['action'],$cut['data']]);$old=AuditLog::where('user_id',$a->id)->where('action','sgf.supplier.command')->where('after->operation_key',$cut['operation_key'])->first();if($old){abort_unless(($old->after['request_hash']??null)===$hash&&($old->after['binding_revision']??null)===$f,409,'Chave usada com outros dados.');return response()->json($old->after['result']+['replayed'=>true]);}abort_unless(hash_equals($this->revision($s),$cut['revision']),409,'A ficha mudou desde a conferência.');$before=$s?->toArray();$out=$this->dispatch($cut['action'],$cut['data'],$s,$a,$r);app(RequisitionWorkflow::class)->audit($a,'sgf.supplier.command',null,$before,$o+['supplier_scope'=>SupplierAccess::scope($o['sgf_context_key']),'operation_key'=>$cut['operation_key'],'binding_revision'=>$f,'request_hash'=>$hash,'command'=>$cut['action'],'result'=>$out['result']]);return response()->json($out['result']+['replayed'=>false],201);});} +} diff --git a/app/Modules/Purchasing/SupplierDocumentFiles.php b/app/Modules/Purchasing/SupplierDocumentFiles.php new file mode 100644 index 0000000..091d61c --- /dev/null +++ b/app/Modules/Purchasing/SupplierDocumentFiles.php @@ -0,0 +1,32 @@ +['driver'=>'local','root'=>$root,'throw'=>true,'serve'=>false]]);Storage::forgetDisk($disk); + try{return $work(Storage::disk($disk));}finally{Storage::forgetDisk($disk);config(['filesystems.disks.'.$disk=>$before]);} + } + public function path(string $root,string $path,int $tenant,int $supplier):string { + abort_unless(preg_match('~^'.$tenant.'/'.$supplier.'/[A-Za-z0-9]{40}\.(pdf|png|jpe?g)$~D',$path),409,'Referência de anexo inválida.'); + $file=realpath($root.'/'.$path);$base=realpath($root);abort_unless($file&&$base&&!is_link($root.'/'.$path)&&str_starts_with(strtolower($file),strtolower($base.DIRECTORY_SEPARATOR)),409,'Anexo indisponível.');return $file; + } + public function discard(string $root,string $path,int $tenant,int $supplier,string $disk='supplier_documents'):void { + $this->path($root,$path,$tenant,$supplier);$this->using($root,fn($storage)=>$storage->delete($path),$disk); + } +} diff --git a/app/Modules/Purchasing/SupplierDocumentsController.php b/app/Modules/Purchasing/SupplierDocumentsController.php new file mode 100644 index 0000000..9800799 --- /dev/null +++ b/app/Modules/Purchasing/SupplierDocumentsController.php @@ -0,0 +1,57 @@ +hash([request()->session()->get('company_context')]); } + private function source(int $id,array $binding,string $context):Supplier { return SupplierAccess::query($binding,$context)->find($id)??abort(404); } + private function meta(UploadedFile $file):array { return ['sha256'=>hash_file('sha256',$file->getPathname()),'size'=>$file->getSize(),'mime'=>$file->getMimeType(),'name'=>$file->getClientOriginalName()]; } + private function input(Request $http,object $actor,string $type):Request { + $files=$http->file('file')?['file'=>$http->file('file')]:[]; + $r=Request::create('/embedded/supplier-documents','POST',['document_type'=>$type],[],$files,['HTTP_ACCEPT'=>'application/json']);$r->setUserResolver(fn($guard=null)=>$actor);if($http->hasSession())$r->setLaravelSession($http->session());return $r; + } + private function store(Request $http,object $actor,Supplier $supplier,string $type):SupplierDocument { + (new \Tempo\Purchasing\Embedded\Http\Controllers\SupplierDocumentController)->store($this->input($http,$actor,$type),$supplier,app(RequisitionWorkflow::class));return $supplier->documents()->orderByDesc('id')->firstOrFail(); + } + private function document(Supplier $supplier,int $id):SupplierDocument { return $supplier->documents()->find($id)??abort(404); } + private function integrity(SupplierDocument $document,string $root):void { + $file=app(SupplierDocumentFiles::class)->path($root,$document->path,(int)$document->tenant_id,(int)$document->supplier_id); + abort_unless(filesize($file)===(int)$document->size&&hash_equals($document->sha256,hash_file('sha256',$file)),409,'O ficheiro difere da evidência registada.'); + } + public function index(int $supplier,Request $r,ReceiptRuntime $runtime) { + $this->guard();$d=$r->validate(['page'=>'sometimes|integer|min:1|max:10000']);abort_if(array_diff(array_keys($r->query()),array_keys($d)),422); + return $runtime->run('purchasing_suppliers.view',function($a,$b,$f,$o)use($supplier,$d){$s=$this->source($supplier,$b,$o['sgf_context_key']);Gate::authorize('viewDocuments',$s);return response()->json($s->documents()->orderByDesc('id')->paginate(15,['id','supplier_id','document_type','original_name','mime_type','size','sha256','uploaded_by','created_at'],'page',(int)($d['page']??1)))->header('Cache-Control','private, no-store');}); + } + public function preview(int $supplier,Request $r,ReceiptRuntime $runtime) { + $this->guard();$d=$r->validate(['operation_key'=>'required|uuid','revision'=>'required|string|size:64','reason'=>'required|string|min:10|max:2000','document_type'=>'required|string|max:30','file'=>'required|file|max:2048']);abort_if(array_diff(array_keys($r->all()),array_keys($d)),422);unset($d['file']);$d['operation_key']=strtolower($d['operation_key']);$generation=$this->generation();$meta=$this->meta($r->file('file')); + return $runtime->run('purchasing_suppliers.prepare',function($a,$b,$f,$o)use($supplier,$r,$d,$generation,$meta){$s=$this->source($supplier,$b,$o['sgf_context_key']);$a=app(CurrentActor::class)->lock($a,['procurement']);Gate::authorize('update',$s);abort_unless(hash_equals($this->hash([$s->toArray()]),$d['revision']),409,'A ficha mudou. Confira novamente.');$files=app(SupplierDocumentFiles::class);$stage=$files->root(true);$db=DB::connection();$level=$db->transactionLevel();$document=null;$db->beginTransaction(); + try{$files->using($stage,function()use($r,$a,$s,$d,&$document){$document=$this->store($r,$a,$s,$d['document_type']);});$impact=['document'=>$document->toArray(),'supplier_status'=>'pending','supplier_version'=>$s->fresh()->version,'reason'=>$d['reason']];unset($impact['document']['id'],$impact['document']['created_at'],$impact['document']['updated_at']);} + finally{while($db->transactionLevel()>$level)$db->rollBack();if($document)$files->discard($stage,$document->path,(int)$s->tenant_id,$s->id);} + $cut=$d+['supplier_id'=>$supplier,'actor'=>$a->id,'binding'=>$f,'generation'=>$generation,'file'=>$meta,'observed'=>time()];return response()->json(['preview'=>Crypt::encryptString(json_encode($cut,JSON_THROW_ON_ERROR)),'impact'=>$impact]);}); + } + public function confirm(int $supplier,Request $r,ReceiptRuntime $runtime) { + $this->guard();$d=$r->validate(['preview'=>'required|string|max:131072','file'=>'required|file|max:2048']);abort_if(array_diff(array_keys($r->all()),array_keys($d)),422);try{$cut=json_decode(Crypt::decryptString($d['preview']),true,64,JSON_THROW_ON_ERROR);}catch(\Throwable){abort(409,'Prévia inválida.');}$generation=$this->generation();$meta=$this->meta($r->file('file'));$created=null; + try{return $runtime->run('purchasing_suppliers.prepare',function($a,$b,$f,$o)use($supplier,$r,$cut,$generation,$meta,&$created){$s=$this->source($supplier,$b,$o['sgf_context_key']);$a=app(CurrentActor::class)->lock($a,['procurement']);Gate::authorize('update',$s);abort_unless(($cut['supplier_id']??null)===$supplier&&($cut['actor']??null)===$a->id&&($cut['binding']??null)===$f&&($cut['generation']??null)===$generation&&($cut['file']??null)===$meta&&is_int($cut['observed']??null)&&$cut['observed']<=time()&&$cut['observed']>=time()-600,409,'O ficheiro, contexto ou prévia mudou.'); + $hash=$this->hash([$supplier,$cut['file'],$cut['document_type'],$cut['reason']]);$files=app(SupplierDocumentFiles::class);$root=$files->root();$old=AuditLog::where('user_id',$a->id)->where('action','sgf.supplier.document')->where('after->operation_key',$cut['operation_key'])->first(); + if($old){abort_unless(($old->after['request_hash']??null)===$hash&&($old->after['binding']??null)===$f,409,'Chave usada com outro conteúdo.');$this->integrity($this->document($s,$old->after['result']['document_id']),$root);return response()->json($old->after['result']+['replayed'=>true]);} + abort_unless(hash_equals($this->hash([$s->toArray()]),$cut['revision']),409,'A ficha mudou desde a conferência.');$before=$s->toArray();$document=$files->using($root,fn()=>$this->store($r,$a,$s,$cut['document_type']));$created=['root'=>$root,'path'=>$document->path,'tenant'=>(int)$s->tenant_id,'supplier'=>$s->id];$this->integrity($document,$root);$result=['supplier_id'=>$s->id,'document_id'=>$document->id,'document'=>$document->toArray(),'supplier_version'=>$s->fresh()->version,'supplier_status'=>'pending']; + app(RequisitionWorkflow::class)->audit($a,'sgf.supplier.document',null,$before,$o+['operation_key'=>$cut['operation_key'],'request_hash'=>$hash,'binding'=>$f,'reason'=>$cut['reason'],'result'=>$result]);return response()->json($result+['replayed'=>false],201);});} + catch(\Throwable $e){ + // Delete only a newly created file after observing that its DB row did not commit. + // If rollback/commit is uncertain or verification fails, retain it for recovery. + if($created){try{$exists=DB::connection('receipt_native')->table('supplier_documents')->where(['tenant_id'=>$created['tenant'],'supplier_id'=>$created['supplier'],'path'=>$created['path']])->exists();if(!$exists)app(SupplierDocumentFiles::class)->discard($created['root'],$created['path'],$created['tenant'],$created['supplier']);}catch(\Throwable){/* Preserve evidence if outcome cannot be verified. */}}throw $e; + } + } + public function download(int $supplier,int $document,Request $r,ReceiptRuntime $runtime) { + $this->guard();abort_if($r->query(),422);return $runtime->run('purchasing_suppliers.view',function($a,$b,$f,$o)use($supplier,$document,$r){$s=$this->source($supplier,$b,$o['sgf_context_key']);Gate::authorize('viewDocuments',$s);$doc=$this->document($s,$document);$files=app(SupplierDocumentFiles::class);$root=$files->root();$this->integrity($doc,$root);return $files->using($root,fn()=>(new \Tempo\Purchasing\Embedded\Http\Controllers\SupplierDocumentController)->download($this->input($r,$a,$doc->document_type),$s,$doc,app(RequisitionWorkflow::class)));}); + } +} diff --git a/app/Modules/Purchasing/SupplierHistoryReceipts.php b/app/Modules/Purchasing/SupplierHistoryReceipts.php index 03edb84..e8891ac 100644 --- a/app/Modules/Purchasing/SupplierHistoryReceipts.php +++ b/app/Modules/Purchasing/SupplierHistoryReceipts.php @@ -5,6 +5,7 @@ namespace App\Modules\Purchasing; use App\Models\User; use Illuminate\Support\Facades\DB; use Tempo\Finance\Payables\HistoricalPayments; +use Tempo\Finance\Payables\HistoricalCapture; use Tempo\Finance\Payables\Payables; /** Reads explicitly reconciled immutable receipts; never imports or decides payments. */ @@ -34,7 +35,7 @@ final class SupplierHistoryReceipts } /** Local read snapshots only; no command obtains its source through this batch. */ - public function page(User $user, array $documents): array + public function page(User $user, array $documents, bool $validatedCapture = false): array { abort_unless($this->available(), 503); $adapter = app(SupplierPayables::class); $scope = $adapter->scope($user); @@ -43,14 +44,14 @@ final class SupplierHistoryReceipts ->distinct('local_source_id')->orderBy('local_source_id')->orderByDesc('version')->get()->keyBy('local_source_id'); $result = []; foreach ($documents as $id => $source) { - try { $result[$id] = $this->decode($source, $receipts->get($id)); } + try { $result[$id] = $this->decode($source, $receipts->get($id), $validatedCapture ? $scope : null); } catch (\DomainException $e) { $result[$id] = $e; } } return $result; } - private function decode(array $source, ?object $receipt): array + private function decode(array $source, ?object $receipt, ?array $captureScope = null): array|HistoricalCapture { if (! $receipt) { throw new \DomainException('Histórico não reconciliado para esta origem e contexto.'); @@ -66,11 +67,12 @@ final class SupplierHistoryReceipts && is_array($payload['payments'] ?? null) && array_is_list($payload['payments']))) { throw new \DomainException('Recibo histórico antigo ou incompatível; exige nova conferência da origem.'); } - $capture = HistoricalPayments::capture($source, $payload['payments']); + $value = $captureScope === null ? null : HistoricalCapture::fromPayments($captureScope, $source, $payload['payments']); + $capture = $value ? $value->forSource($captureScope, $source) : HistoricalPayments::capture($source, $payload['payments']); if (($payload['history_hash'] ?? null) !== $capture['history_hash']) { throw new \DomainException('Fotografia histórica incompatível com os pagamentos originais.'); } - return $capture['payments']; + return $value ?? $capture['payments']; } } diff --git a/app/Modules/Purchasing/SupplierPayableReportController.php b/app/Modules/Purchasing/SupplierPayableReportController.php new file mode 100644 index 0000000..81cd29a --- /dev/null +++ b/app/Modules/Purchasing/SupplierPayableReportController.php @@ -0,0 +1,26 @@ +validate(['q' => 'sometimes|nullable|string|max:100', 'source' => 'sometimes|required|integer|min:1']); + abort_if(array_diff(array_keys($request->query()), array_keys($data)) !== [], 422); + return $data; + } + + public function index(Request $request, SupplierPayables $service) + { + return response()->json($service->report($request->user(), $this->criteria($request)))->header('Cache-Control', 'no-store'); + } + + public function page(Request $request, SupplierPayables $service) + { + return response()->view('purchasing.payable-report', ['report' => $service->report($request->user(), $this->criteria($request))])->header('Cache-Control', 'no-store'); + } +} diff --git a/app/Modules/Purchasing/SupplierPayables.php b/app/Modules/Purchasing/SupplierPayables.php index cc32645..fce0ba5 100644 --- a/app/Modules/Purchasing/SupplierPayables.php +++ b/app/Modules/Purchasing/SupplierPayables.php @@ -13,7 +13,9 @@ final class SupplierPayables public static function guard(): void { $c = DB::connection(); - abort_unless(app()->environment('payable-testing'), 403, 'Obrigações apenas no ensaio isolado.'); + $composedQa=app()->environment(['testing','browser-testing'])&&(config('sales_ledger.synthetic_enabled')===true||config('cost_ledger.synthetic_enabled')===true); + abort_unless(app()->environment('payable-testing')||$composedQa, 403, 'Obrigações apenas no ensaio isolado.'); + if($composedQa)\App\Shared\Testing\TestingDatabaseGuard::assertSafe(); if ($c->getDriverName() !== 'pgsql' || ! preg_match('/^payable_sgf_[a-f0-9]{12}$/D', $c->getDatabaseName()) || $c->getConfig('host') !== '127.0.0.1' || $c->selectOne('select current_database() as d')->d !== $c->getDatabaseName()) { throw new \LogicException('PAYABLE_QA_DATABASE_REFUSED'); } @@ -81,7 +83,32 @@ final class SupplierPayables }; return new Payables(DB::connection(), $u->id, $person, $scope, fn (string $a) => $authorize($a), $source, - app(SupplierHistoryReceipts::class)->available() ? $history : null, fn () => $authorize('view', false)); + app(SupplierHistoryReceipts::class)->available() ? $history : null, fn () => $authorize('view', false), fn () => $authorize('payments_view', false)); + } + + /** One predicate for list windows and complete position reports. */ + private function sourceQuery(array $scope, array $options): array + { + $q = trim((string) ($options['q'] ?? '')); $recognition = $options['recognition'] ?? 'all'; + abort_unless(mb_strlen($q) <= 100 && in_array($recognition, ['all', 'recognised', 'unrecognised'], true), 422); + $query = DB::table('pa_imported_sources AS r')->where($scope); + $sourceId = array_key_exists('source', $options) ? filter_var($options['source'], FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]]) : null; + abort_if($sourceId === false || (isset($options['source']) && is_bool($options['source'])), 422, 'Origem inválida.'); + if ($sourceId !== null) { + abort_unless((clone $query)->where('r.id', $sourceId)->exists(), 403, 'Origem não mapeada neste contexto.'); + $query->where('r.id', $sourceId); + } + if ($q !== '') { + $needle = '%'.str_replace(['\\', '%', '_'], ['\\\\', '\\%', '\\_'], $q).'%'; + $query->where(fn ($w) => $w->whereRaw("payload->>'number' ILIKE ?", [$needle])->orWhereRaw("payload->>'supplier_name' ILIKE ?", [$needle])); + } + if ($recognition !== 'all') { + $method = $recognition === 'recognised' ? 'whereExists' : 'whereNotExists'; + $query->$method(fn ($w) => $w->selectRaw('1')->from('pa_sources AS s')->join('pa_obligations AS o', 'o.source_id', '=', 's.id') + ->whereColumn('s.local_source_id', 'r.id')->whereColumn('s.tenant_id', 'r.tenant_id')->whereColumn('s.company_id', 'r.company_id')->whereColumn('s.unit_id', 'r.unit_id') + ->whereColumn('o.tenant_id', 'r.tenant_id')->whereColumn('o.company_id', 'r.company_id')->whereColumn('o.unit_id', 'r.unit_id')); + } + return [$query, $sourceId]; } public function listing(User $u, array $options = []): array @@ -93,17 +120,7 @@ final class SupplierPayables $page = (int) ($options['page'] ?? 1); $perPage = (int) ($options['per_page'] ?? 25); $q = trim((string) ($options['q'] ?? '')); $recognition = $options['recognition'] ?? 'all'; abort_unless($page >= 1 && $page <= 100000 && in_array($perPage, [25, 100], true) && mb_strlen($q) <= 100 && in_array($recognition, ['all', 'recognised', 'unrecognised'], true), 422); - $query = DB::table('pa_imported_sources AS r')->where($scope); - if ($q !== '') { - $needle = '%'.str_replace(['\\', '%', '_'], ['\\\\', '\\%', '\\_'], $q).'%'; - $query->where(fn ($w) => $w->whereRaw("payload->>'number' ILIKE ?", [$needle])->orWhereRaw("payload->>'supplier_name' ILIKE ?", [$needle])); - } - if ($recognition !== 'all') { - $method = $recognition === 'recognised' ? 'whereExists' : 'whereNotExists'; - $query->$method(fn ($w) => $w->selectRaw('1')->from('pa_sources AS s')->join('pa_obligations AS o', 'o.source_id', '=', 's.id') - ->whereColumn('s.local_source_id', 'r.id')->whereColumn('s.tenant_id', 'r.tenant_id')->whereColumn('s.company_id', 'r.company_id')->whereColumn('s.unit_id', 'r.unit_id') - ->whereColumn('o.tenant_id', 'r.tenant_id')->whereColumn('o.company_id', 'r.company_id')->whereColumn('o.unit_id', 'r.unit_id')); - } + [$query, $sourceId] = $this->sourceQuery($scope, $options); $pager = $query->orderByDesc('r.id')->paginate($perPage, ['r.*'], 'page', $page); $documents = []; foreach ($pager->items() as $row) { $documents[(int) $row->id] = $this->receiptDocument($row); } $provider = app(SupplierHistoryReceipts::class); @@ -111,6 +128,7 @@ final class SupplierPayables $d = $this->buildEngine($u, $documents, $histories)->listingPage(array_keys($documents), (int) ($options['proposal_page'] ?? 1), (int) ($options['event_page'] ?? 1), $perPage); $d['pagination']['documents'] = ['page' => $pager->currentPage(), 'last_page' => $pager->lastPage(), 'total' => $pager->total(), 'per_page' => $pager->perPage()]; $d['listing_query'] = ['page' => $page, 'per_page' => $perPage, 'q' => $q, 'recognition' => $recognition, 'proposal_page' => (int) ($options['proposal_page'] ?? 1), 'event_page' => (int) ($options['event_page'] ?? 1)]; + if ($sourceId !== null) { $d['listing_query']['source'] = $sourceId; } $d['permissions'] = ['prepare' => $this->can($u, 'prepare'), 'validate' => $this->can($u, 'validate')]; $d['history_import_available'] = app(SupplierHistoryReceipts::class)->available(); $d['history_decisions_available'] = false; @@ -122,4 +140,79 @@ final class SupplierPayables return $d; }); } + + /** Current recognised positions, aggregated through the existing engine in bounded windows. */ + public function report(User $u, array $criteria = []): array + { + abort_if(array_diff(array_keys($criteria), ['q', 'source']) !== [], 422); + abort_if(isset($criteria['q']) && !is_string($criteria['q']), 422); + if (array_key_exists('source', $criteria)) { + $id = filter_var($criteria['source'], FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]]); + abort_if($id === false || is_bool($criteria['source']), 422); + $criteria['source'] = $id; + } + $own = DB::transactionLevel() === 0; + return DB::transaction(function () use ($u, $criteria, $own): array { + if ($own) DB::statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY'); + else abort_unless(in_array(DB::selectOne('SHOW transaction_isolation')->transaction_isolation, ['repeatable read', 'serializable'], true), 409, 'O relatório exige uma fotografia coerente própria.'); + $scope = $this->scope($u); + abort_unless($this->can($u, 'view'), 403); + $criteria['q'] = trim((string) ($criteria['q'] ?? '')); + $hash = hash_init('sha256'); + hash_update($hash, Payables::canonical(['scope' => $scope, 'criteria' => $criteria, 'basis' => 'current_recognised_positions', 'window' => 100])."\n"); + $total = ['count' => 0, 'principal_minor' => 0, 'unknown_balance_count' => 0, 'unknown_due_count' => 0]; + $known = ['count' => 0, 'principal_minor' => 0, 'historical_confirmed_minor' => 0, 'net_allocated_minor' => 0, 'balance_minor' => 0]; + [$query] = $this->sourceQuery($scope, $criteria + ['recognition' => 'recognised']); + $person = DB::table('pa_access')->where($scope)->where(['user_id' => $u->id, 'action' => 'view'])->value('person'); + abort_unless(is_string($person) && $person !== '', 403); + $provider = app(SupplierHistoryReceipts::class); $historical = $provider->available(); + $read = function () use ($u, $scope, $person): void { + $context = app(CompanyContext::class); + abort_unless(auth()->id() === $u->id && $context->userId() === $u->id, 403); + abort_unless(($context->identifiers() + ['unit_id' => $context->unitId()]) === $scope, 409); + abort_unless($this->can($u, 'view'), 403); + abort_unless(DB::table('pa_access')->where($scope)->where(['user_id' => $u->id, 'action' => 'view'])->value('person') === $person, 409); + }; + $last = null; $windows = 0; + do { + $window = clone $query; + if ($last !== null) $window->where('r.id', '<', $last); + $rows = $window->orderByDesc('r.id')->limit(100)->get(['r.*']); + if ($rows->isEmpty()) break; + $documents = []; + foreach ($rows as $row) $documents[(int) $row->id] = $this->receiptDocument($row); + $histories = $historical ? $provider->page($u, $documents, true) : []; + $engine = new Payables(DB::connection(), $u->id, $person, $scope, + static fn () => throw new \LogicException('Relatórios nunca executam comandos.'), + fn (int $id) => $documents[$id] ?? abort(403), + $historical ? static function (int $id) use ($histories) { + $result = $histories[$id] ?? new \DomainException('Histórico fora da janela.'); + if ($result instanceof \DomainException) throw $result; + return $result; + } : null, $read); + $data = $engine->positionsPage(array_keys($documents)); + foreach ($data['documents'] as $doc) hash_update($hash, Payables::canonical(['local_source_id' => $doc['local_id'], 'current_revision' => $doc['revision']])."\n"); + foreach ($data['obligations'] as $o) { + abort_unless($o['currency'] === 'MZN', 409, 'Moeda incompatível no relatório; nenhuma soma entre moedas.'); + $total['count']++; $total['principal_minor'] += $o['principal_minor']; + if ($o['due_on'] === null) $total['unknown_due_count']++; + if ($o['source_conflict'] || $o['balance_minor'] === null) $total['unknown_balance_count']++; + else { + $known['count']++; $known['principal_minor'] += $o['principal_minor']; + $known['historical_confirmed_minor'] += $o['confirmed_payments_minor']; + $known['net_allocated_minor'] += $o['allocated_payments_minor']; + $known['balance_minor'] += $o['balance_minor']; + } + hash_update($hash, Payables::canonical($o)."\n"); + } + $windows++; $last = (int) $rows->last()->id; + } while ($rows->count() === 100); + abort_unless($known['principal_minor'] - $known['historical_confirmed_minor'] - $known['net_allocated_minor'] === $known['balance_minor'], 409, 'Componentes financeiros não reconciliados.'); + $total['balance_minor'] = $total['unknown_balance_count'] === 0 ? $known['balance_minor'] : null; + return ['version' => 'SGF-PAYABLE-POSITION-REPORT-SIM-v1', 'synthetic_only' => true, + 'basis' => 'current_recognised_positions', 'captured_at_utc' => DB::selectOne("SELECT transaction_timestamp() AT TIME ZONE 'UTC' AS captured")->captured, + 'scope' => $scope, 'criteria' => $criteria, 'currency' => 'MZN', 'totals' => $total, 'known_positions' => $known, + 'positions_sha256' => hash_final($hash), 'window_size' => 100, 'windows' => $windows]; + }); + } } diff --git a/app/Modules/Purchasing/SupplierPayablesController.php b/app/Modules/Purchasing/SupplierPayablesController.php index 9bbfeca..0b959b6 100644 --- a/app/Modules/Purchasing/SupplierPayablesController.php +++ b/app/Modules/Purchasing/SupplierPayablesController.php @@ -9,9 +9,9 @@ use Tempo\Finance\Payables\Workspace; final class SupplierPayablesController extends Controller { - private function options(Request $r): array + public function listingOptions(Request $r): array { - $d = $r->validate(['page' => 'sometimes|integer|min:1|max:100000', 'proposal_page' => 'sometimes|integer|min:1|max:100000', + $d = $r->validate(['source' => 'sometimes|required|integer|min:1', 'page' => 'sometimes|integer|min:1|max:100000', 'proposal_page' => 'sometimes|integer|min:1|max:100000', 'event_page' => 'sometimes|integer|min:1|max:100000', 'per_page' => 'sometimes|integer|in:25,100', 'q' => 'sometimes|nullable|string|max:100', 'recognition' => 'sometimes|in:all,recognised,unrecognised']); abort_if(array_diff(array_keys($r->query()), array_keys($d)) !== [], 422); @@ -21,17 +21,21 @@ final class SupplierPayablesController extends Controller public function index(Request $r, SupplierPayables $s) { - return response()->json($s->listing($r->user(), $this->options($r)))->header('Cache-Control', 'no-store'); + return response()->json($s->listing($r->user(), $this->listingOptions($r)))->header('Cache-Control', 'no-store'); } public function page(Request $r, SupplierPayables $s) { - $data = $s->listing($r->user(), $this->options($r)); + $data = $s->listing($r->user(), $this->listingOptions($r)); $scope = $s->scope($r->user()); $company = DB::table('companies')->where('tenant_id', $scope['tenant_id'])->where('id', $scope['company_id'])->value('name'); $unit = DB::table('units')->where('tenant_id', $scope['tenant_id'])->where('company_id', $scope['company_id'])->where('id', $scope['unit_id'])->value('name'); + $flow=[]; + if(config('general_ledger.synthetic_enabled')===true&&isset($data['listing_query']['source'])&&app(\App\Modules\Identity\Services\Permissions::class)->has($r->user()->id,$scope['tenant_id'],$scope['company_id'],'general_ledger.view',$scope['unit_id'])){ + $flow=['ledger_flow_url'=>'/general-ledger/flow?source='.$data['listing_query']['source'],'ledger_flow_scope'=>$scope]; + } - return response(Workspace::render($data, ['host' => 'ERP SGF', 'actor' => $r->user()->name, 'organisation' => $company.' / '.$unit, 'api' => '/api/supplier-payables', 'csrf' => csrf_token(), 'context' => $r->session()->get('company_context.token')]))->header('Cache-Control', 'no-store'); + return response(Workspace::render($data, $flow+['host' => 'ERP SGF', 'actor' => $r->user()->name, 'organisation' => $company.' / '.$unit, 'api' => '/api/supplier-payables', 'document_filter' => 'source', 'report_url' => '/supplier-payables/report', 'csrf' => csrf_token(), 'context' => $r->session()->get('company_context.token')]))->header('Cache-Control', 'no-store'); } public function command(Request $r, string $action, SupplierPayables $s) diff --git a/app/Modules/Purchasing/SupplierPaymentsController.php b/app/Modules/Purchasing/SupplierPaymentsController.php index 3c72c17..9aedff8 100644 --- a/app/Modules/Purchasing/SupplierPaymentsController.php +++ b/app/Modules/Purchasing/SupplierPaymentsController.php @@ -2,6 +2,7 @@ namespace App\Modules\Purchasing; +use Illuminate\Http\Request; use Tempo\Finance\Payables\SettlementHttp; final class SupplierPaymentsController extends SettlementHttp @@ -9,4 +10,27 @@ final class SupplierPaymentsController extends SettlementHttp protected const MODE = 'sgf'; protected const SERVICE = SupplierPayables::class; + + private const PAYMENT_FILTERS = ['payments_page', 'allocation_proposals_page', 'allocations_page', 'payment_events_page', 'payment_per_page', 'payment_q', 'payment_state', 'payment']; + protected function ledgerSettings(Request $request):array + { + if(config('general_ledger.cycle_enabled')!==true)return []; + $scope=app(SupplierPayables::class)->scope($request->user()); + if(!app(\App\Modules\Identity\Services\Permissions::class)->has($request->user()->id,$scope['tenant_id'],$scope['company_id'],'general_ledger.view',$scope['unit_id']))return []; + return ['ledger_cycle_url'=>'/general-ledger/cycle','ledger_scope'=>$scope]; + } + + protected function obligationOptions(Request $request): array + { + return app(SupplierPayablesController::class)->listingOptions($request->duplicate(array_diff_key($request->query(), array_flip(self::PAYMENT_FILTERS)))); + } + + protected function settlementOptions(Request $request): ?array + { + return $request->validate(['payments_page' => 'sometimes|integer|min:1|max:100000', + 'allocation_proposals_page' => 'sometimes|integer|min:1|max:100000', 'allocations_page' => 'sometimes|integer|min:1|max:100000', + 'payment_events_page' => 'sometimes|integer|min:1|max:100000', 'payment_per_page' => 'sometimes|integer|in:25,100', + 'payment_q' => 'sometimes|nullable|string|max:100', 'payment_state' => 'sometimes|in:all,proposed,confirmed,rejected', + 'payment' => 'sometimes|required|integer|min:1']); + } } diff --git a/app/Modules/Purchasing/WorkspaceNavigation.php b/app/Modules/Purchasing/WorkspaceNavigation.php new file mode 100644 index 0000000..a0f6266 --- /dev/null +++ b/app/Modules/Purchasing/WorkspaceNavigation.php @@ -0,0 +1,37 @@ +environment('budget-testing'))return []; + $c=app(CompanyContext::class);$scope=$c->identifiers();if(!$c->unitId())return []; + $definitions=[ + ['requests','requests','Requisições','Preparar, submeter e obter aprovação distinta.'], + ['suppliers','suppliers','Fornecedores','Conferir cadastro e revisão antes das propostas.'], + ['sourcing','sourcing','Propostas e adjudicação','Comparar propostas e fundamentar a escolha; aprovação distinta.'], + ['orders','orders','Ordens','Emitir a partir da adjudicação aprovada.'], + ['enabled','receipts','Recepções','Conferir quantidades e qualidade da ordem emitida.'], + ['invoices','invoices','Facturas','Registar e validar o documento recebido.'], + ['obligations','obligations','Obrigações','Preparar fotografia e reconhecer por pessoa distinta.'], + ];$links=[];$permissions=app(Permissions::class); + foreach($definitions as[$flag,$path,$label,$description]){ + $flag=$flag==='enabled'?$flag:$flag.'_enabled';$right='purchasing_'.$path.'.view'; + if(config('receipt_qa.'.$flag)===true&&$permissions->has($c->userId(),$scope['tenant_id'],$scope['company_id'],$right,$c->unitId()))$links[]=['url'=>'/purchasing/'.$path,'label'=>$label,'description'=>$description,'right'=>$right]; + } + if(config('receipt_qa.dossiers_enabled')===true&&array_filter($links,fn($link)=>$link['right']==='purchasing_requests.view'))$links[]=['url'=>'/purchasing/dossiers','label'=>'Dossiês e evidência','description'=>'Consultar as etapas e o histórico autorizado da mesma requisição.','right'=>'purchasing_requests.view']; + return $links; + } + public function screen(Request $r,ReceiptRuntime $runtime) + { + abort_unless(config('receipt_qa.enabled')===true,404);$links=$this->links();abort_unless($links,403); + $runtime->run($links[0]['right'],fn()=>null); + return response()->view('purchasing-workspace',['links'=>$links]); + } +} diff --git a/app/Modules/Services/ServiceReceivables.php b/app/Modules/Services/ServiceReceivables.php index 156fdb2..a400c76 100644 --- a/app/Modules/Services/ServiceReceivables.php +++ b/app/Modules/Services/ServiceReceivables.php @@ -225,6 +225,11 @@ final class ServiceReceivables return ['blocked'=>false,'notice'=>self::NOTICE,'simulation'=>self::SIMULATION,'records'=>$records->map(function($r){$r->data=$this->data($r);return $r;})->all(),'obligations'=>$records->where('kind','obligation')->map(fn($r)=>$this->state($r->id))->values()->all(),'documents'=>\App\Shared\Context\ModuleRecords::query('si_invoices')->where($s)->get(['id','series_code','number'])->all()]; }); } + /** Scoped single-position read reuses the authoritative state calculation without writer locks. */ + public function position(int $obligation,int $actor):array + { + self::guard();$scope=$this->scope($actor,'view');$this->row($obligation,$scope,'obligation');return $this->state($obligation); + } /** Idempotent internal delivery only: validates ledger, never posts accounts or calls banks. */ public function deliver(int $event): bool { diff --git a/app/Modules/Workshop/DirectCosts.php b/app/Modules/Workshop/DirectCosts.php index 6afe7e2..57c3449 100644 --- a/app/Modules/Workshop/DirectCosts.php +++ b/app/Modules/Workshop/DirectCosts.php @@ -110,6 +110,12 @@ final class DirectCosts $id=DB::table('dc_decisions')->insertGetId([$field=>$r->id,'version'=>$r->version,'decision'=>$d['decision'],'reason'=>$d['reason'],'actor_id'=>$actor,'created_at'=>now()]);return ['id'=>$id,'version'=>$r->version,'kind'=>'decision','target_id'=>$r->id]; }); } + /** Authoritative scoped conference for read-only consumers; no second cost calculator. */ + public function conference(int $order,int $actor):array { + self::guard();$s=$this->scope($actor,'view');$o=$this->order($order,$s);$row=DB::table('dc_calculations')->where($s)->where('order_id',$order)->orderByDesc('version')->first(); + $decision=$row?DB::table('dc_decisions')->where('calculation_id',$row->id)->first():null;$current=$row?$this->calculationCurrent($row):false; + return ['order'=>(array)$o,'calculation'=>$row?(array)$row:null,'snapshot'=>$row?json_decode($row->snapshot,true,64,JSON_THROW_ON_ERROR):null,'decision'=>$decision?(array)$decision:null,'current'=>$current]; + } public function listing(int $actor): array { $s=$this->scope($actor,'view');if(!ServiceCalculation::isolated())return ['blocked'=>true,'orders'=>[],'notice'=>self::NOTICE];self::guard(); return DB::transaction(function()use($s){ diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 6738b1b..135d506 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -17,6 +17,7 @@ class AppServiceProvider extends ServiceProvider { require_once base_path('packages/budget-control/bootstrap.php'); require_once base_path('packages/payables/bootstrap.php'); + require_once base_path('packages/general-ledger/bootstrap.php'); if (is_file(base_path('packages/purchasing/current.json'))) { require_once base_path('packages/purchasing/bootstrap.php'); } @@ -28,6 +29,9 @@ class AppServiceProvider extends ServiceProvider */ public function boot(): void { + if ($routes = \App\Modules\Purchasing\InternalRequisitionQa::mount()) { + $this->loadRoutesFrom($routes); + } if ($this->app->environment(['testing', 'browser-testing']) || defined('PHPUNIT_COMPOSER_INSTALL')) { TestingDatabaseGuard::assertSafe(); } diff --git a/app/Shared/Context/ModuleNavigation.php b/app/Shared/Context/ModuleNavigation.php index 193cfa3..99ecd67 100644 --- a/app/Shared/Context/ModuleNavigation.php +++ b/app/Shared/Context/ModuleNavigation.php @@ -9,10 +9,10 @@ final class ModuleNavigation public const LABELS = ['commercial'=>'Comercial', 'purchasing'=>'Compras', 'stock'=>'Stock', 'workshop'=>'Oficinas', 'finance'=>'Financeiro', 'accounting'=>'Contabilidade']; private const RIGHTS = [ 'commercial'=>['clients.', 'services.', 'service_drafts.', 'billing_drafts.', 'issuer_documents.', 'client_documents.', 'draft_documents.', 'service_invoices.'], - 'purchasing'=>['purchasing_budget.', 'supplier_payables.'], + 'purchasing'=>['purchasing_budget.', 'purchasing_requisitions.', 'purchasing_receipts.', 'purchasing_orders.', 'purchasing_sourcing.', 'purchasing_suppliers.', 'purchasing_requests.', 'purchasing_invoices.', 'purchasing_obligations.', 'supplier_payables.'], 'stock'=>['stock.'], 'workshop'=>['workshop.', 'workshop_billing.', 'workshop_corrections.'], 'finance'=>['direct_costs.', 'industrial_costs.', 'industrial_budgets.', 'industrial_budget_comparisons.', 'service_receivables.'], - 'accounting'=>['catalogue_accounting.', 'service_fiscal.'], + 'accounting'=>['catalogue_accounting.', 'service_fiscal.', 'general_ledger.'], ]; public function available(CompanyContext $context): array @@ -50,6 +50,20 @@ final class ModuleNavigation // Company, unit and access configuration are explicitly general. public static function owner(string $path): ?string { + if (preg_match('~^(geography|geography/segments|api/geography/entities|api/geography/segments)/client(/|$)~', $path)) return 'commercial'; + if (preg_match('~^(geography|geography/segments|api/geography/entities|api/geography/segments)/supplier(/|$)~', $path)) return 'purchasing'; + if (preg_match('~^(purchasing/dossiers|api/purchasing-dossiers)(/|$)~', $path)) return 'purchasing'; + if (preg_match('~^purchasing/workspace(/|$)~', $path)) return 'purchasing'; + if (preg_match('~^(purchasing/obligations|api/purchasing-obligations)(/|$)~', $path)) return 'purchasing'; + if (preg_match('~^(purchasing/invoices|api/purchasing-invoices)(/|$)~', $path)) return 'purchasing'; + if (preg_match('~^(purchasing/requests|api/purchasing-requests)(/|$)~', $path)) return 'purchasing'; + if (preg_match('~^(purchasing/suppliers|api/purchasing-suppliers)(/|$)~', $path)) return 'purchasing'; + if (preg_match('~^(purchasing/sourcing|api/purchasing-sourcing)(/|$)~', $path)) return 'purchasing'; + if (preg_match('~^(purchasing/orders|api/purchasing-orders)(/|$)~', $path)) return 'purchasing'; + if (preg_match('~^(purchasing/receipts|api/purchasing-receipts)(/|$)~', $path)) return 'purchasing'; + if (preg_match('~^api/stock-valuation-read(/|$)~', $path)) return 'accounting'; + if (preg_match('~^(purchasing/internal-requisitions|api/internal-requisitions)(/|$)~', $path)) return 'purchasing'; + if (preg_match('~^(general-ledger|api/general-ledger)(/|$)~', $path)) return 'accounting'; if (preg_match('~^api/stock-read(/|$)~', $path)) return 'stock'; if (preg_match('~^(supplier-payables|supplier-payments|api/(supplier-payables|supplier-payments|purchasing-budget))(/|$)~', $path)) return 'purchasing'; if (preg_match('~^api/(workshop|workshop-stock|workshop-billing|workshop-corrections)(/|$)~', $path)) return 'workshop'; diff --git a/app/Shared/Geography/Cartography.php b/app/Shared/Geography/Cartography.php new file mode 100644 index 0000000..6f77a96 --- /dev/null +++ b/app/Shared/Geography/Cartography.php @@ -0,0 +1,45 @@ +'ID','B'=>'Provincia','C'=>'Distrito','D'=>'Posto_Administrativo','E'=>'Localidade','F'=>'Bairro_Urbano','G'=>'Aldeia_Quarteirao','H'=>'Designacao']; + + public static function prepare(array $source):array + { + if(!preg_match('/^[a-f0-9]{64}$/D',$source['sha256']??'')||($source['rows'][0]['cells']??null)!==self::HEADERS||($source['formula_cells']??1)!==0)throw new InvalidArgumentException('CARTOGRAPHY_SOURCE_REFUSED'); + $nodes=[];$paths=[];$ids=[];$levels=array_fill(1,6,0); + foreach(array_slice($source['rows'],1)as$row){ + $c=$row['cells'];$id=$c['A']??'';if(!is_string($id)||!preg_match('/^[0-9]+$/D',$id)||isset($ids[$id]))throw new InvalidArgumentException('CARTOGRAPHY_SOURCE_ID_REFUSED');$ids[$id]=true; + $parts=[];foreach(['B','C','D','E','F','G']as$col){$code=$c[$col]??'';if(!is_string($code)||($code!==''&&!preg_match('/^[A-Za-z0-9]+$/D',$code)))throw new InvalidArgumentException('CARTOGRAPHY_CODE_REFUSED');$parts[]=$code;} + $level=0;foreach($parts as$i=>$code)if($code!=='')$level=$i+1; + if(!$level||in_array('',array_slice($parts,0,$level),true))throw new InvalidArgumentException('CARTOGRAPHY_PATH_REFUSED'); + $path=implode('.',$parts);$key=$source['sha256'].':'.$id;$index=count($nodes);$paths[$path][]=$index;$levels[$level]++; + $nodes[]=['key'=>$key,'source_id'=>$id,'source_row'=>$row['row'],'level'=>$level,'designation'=>$c['H']??null,'codes'=>array_combine(self::FIELDS,$parts),'path'=>$path,'parent_candidates'=>[],'issues'=>[]]; + } + $summary=['duplicate_path_groups'=>0,'duplicate_extra_rows'=>0,'conflicting_designation_groups'=>0,'missing_designations'=>0,'missing_parent_records'=>0,'ambiguous_parent_records'=>0,'incomplete_ancestry_records'=>0,'selectable_records'=>0]; + foreach($paths as$group)if(count($group)>1){$summary['duplicate_path_groups']++;$summary['duplicate_extra_rows']+=count($group)-1;if(count(array_unique(array_map(fn($i)=>$nodes[$i]['designation'],$group)))>1)$summary['conflicting_designation_groups']++;} + foreach($nodes as&$node){ + if($node['designation']===null||trim($node['designation'])===''){$node['issues'][]='missing_designation';$summary['missing_designations']++;} + if(count($paths[$node['path']])>1)$node['issues'][]='duplicate_path'; + if($node['level']>1){$parts=array_values($node['codes']);$parts[$node['level']-1]='';$parents=$paths[implode('.',$parts)]??[];$node['parent_candidates']=array_map(fn($i)=>$nodes[$i]['key'],$parents);if(!$parents){$node['issues'][]='parent_record_missing';$summary['missing_parent_records']++;}elseif(count($parents)>1){$node['issues'][]='parent_record_ambiguous';$summary['ambiguous_parent_records']++;}} + $ancestry=true;for($depth=1;$depth<$node['level'];$depth++){$prefix=array_values($node['codes']);for($i=$depth;$i<6;$i++)$prefix[$i]='';$ancestors=$paths[implode('.',$prefix)]??[];if(count($ancestors)!==1||trim($nodes[$ancestors[0]]['designation']??'')===''){$ancestry=false;break;}} + if(!$ancestry){$node['issues'][]='ancestry_requires_review';$summary['incomplete_ancestry_records']++;} + $node['selectable']=$node['issues']===[];if($node['selectable'])$summary['selectable_records']++; + }unset($node); + return ['format'=>'sgf.cartography.staging.v1','source'=>['name'=>$source['source_name'],'sha256'=>$source['sha256'],'sheet'=>'Sheet1','range'=>$source['dimension'],'authority_declared_by_user'=>'INE','authority_independently_verified'=>false],'status'=>'prepared_for_review','levels'=>$levels,'total'=>count($nodes),'diagnostics'=>$summary,'nodes'=>$nodes]; + } + + /** A human selection carries version and source identity; a name alone cannot select a territory. */ + public static function selection(array $catalogue,string $version,string $key):array + { + if(!hash_equals($catalogue['source']['sha256'],$version))throw new DomainException('CARTOGRAPHY_VERSION_CHANGED'); + foreach($catalogue['nodes']as$node)if($node['key']===$key){if(!$node['selectable'])throw new DomainException('CARTOGRAPHY_REVIEW_REQUIRED');return ['version'=>$version,'territory_key'=>$key,'source_id'=>$node['source_id'],'codes'=>$node['codes'],'designation'=>$node['designation']];} + throw new DomainException('CARTOGRAPHY_TERRITORY_UNKNOWN'); + } +} diff --git a/app/Shared/Geography/Catalogue.php b/app/Shared/Geography/Catalogue.php new file mode 100644 index 0000000..cdeac95 --- /dev/null +++ b/app/Shared/Geography/Catalogue.php @@ -0,0 +1,41 @@ +environment('budget-testing'),403); + if(request()->is('api/geography/*'))abort_unless(request()->hasSession()&&hash_equals((string)request()->session()->get('company_context.token',''),(string)request()->header('X-SGF-Context')),409,'O contexto mudou. Reabra o formulário.'); + \App\Modules\Purchasing\BudgetAdapter::guard(); + $c=DB::connection();$p=$c->getConfig();$run=(string)getenv('SGF_ISOLATED_REGRESSION_RUN'); + abort_unless(preg_match('/^[a-f0-9]{12}$/D',$run)&&preg_match('/^budget_core_sgf_([a-f0-9]{12})$/D',$c->getDatabaseName(),$m)&&$p['username']==='ir_composition_'.$m[1]&&$p['host']==='127.0.0.1'&&(int)$p['port']===55439&&empty($p['url'])&&empty($p['read'])&&empty($p['write'])&&($p['search_path']??'public')==='public',403); + $i=$c->selectOne("SELECT current_user role,current_setting('cluster_name') cluster,rolsuper OR rolcreatedb OR rolcreaterole OR rolreplication OR rolbypassrls elevated FROM pg_roles WHERE rolname=current_user"); + abort_unless(!$i->elevated&&$i->role===$p['username']&&$i->cluster==='sgf_modular_regression_'.$run,403); + } + public static function active(bool $lock=false):object + { + $q=DB::table('geo_catalogue_state')->where('id',1);$row=($lock?$q->lockForUpdate():$q)->first(); + abort_unless($row&&hash_equals((string)config('geography.source_sha256'),$row->source_version),409,'A versão do catálogo mudou. Reabra a conferência.');return $row; + } + public static function describe(object $row):array + { + return ['key'=>$row->territory_key,'source_id'=>$row->source_id,'level'=>(int)$row->level,'designation'=>$row->designation,'codes'=>array_combine(Cartography::FIELDS,array_map(fn($f)=>$row->$f,Cartography::FIELDS)),'issues'=>json_decode($row->issues,true),'selectable'=>(bool)$row->selectable]; + } + public static function selection(string $version,string $key):array + { + $active=self::active(true);abort_unless(hash_equals($active->source_version,$version),409,'O catálogo mudou.'); + $row=DB::table('geo_territories')->where('source_version',$version)->where('territory_key',$key)->first();abort_unless($row,422,'Território desconhecido nesta versão.');abort_unless($row->selectable,422,'Este território tem pendências de conferência na fonte.');return ['country_code'=>'MZ','version'=>$version]+self::describe($row); + } + public static function page(array $d):array + { + $version=self::active()->source_version;$q=DB::table('geo_territories')->where('source_version',$version); + if(isset($d['parent'])){$parent=DB::table('geo_territories')->where('source_version',$version)->where('territory_key',$d['parent'])->first();abort_unless($parent&&$parent->selectable,422,'Ascendente por conferir.');$q->where('parent_key',$parent->territory_key);} + elseif(empty($d['search']))$q->where('level',1); + if(!empty($d['search']))$q->where('designation','ilike','%'.$d['search'].'%'); + return ['version'=>$version,'records'=>$q->orderBy('designation')->orderBy('source_id')->paginate(25,['*'],'page',(int)($d['page']??1))->through(fn($r)=>self::describe($r))]; + } +} diff --git a/app/Shared/Geography/GeographyController.php b/app/Shared/Geography/GeographyController.php new file mode 100644 index 0000000..1d3c810 --- /dev/null +++ b/app/Shared/Geography/GeographyController.php @@ -0,0 +1,18 @@ +validate($rules);abort_if(array_diff(array_keys($r->all()),array_keys($v)),422);return $v;} + public function catalogue(Request $r){Catalogue::guard();$d=$this->input($r,['parent'=>'nullable|string|max:100','search'=>'nullable|string|max:100','page'=>'sometimes|integer|min:1|max:10000']);return response()->json(Catalogue::page($d))->header('Cache-Control','no-store');} + public function segments(string $kind,Request $r){Catalogue::guard();$rules=['after'=>'sometimes|integer|min:0'];foreach(Cartography::FIELDS as$f)$rules[$f]=['sometimes','string','regex:/^[A-Za-z0-9]{1,20}$/D'];return response()->json(Segments::page($kind,$this->input($r,$rules)))->header('Cache-Control','no-store');} + public function segmentScreen(string $kind,Request $r){$this->segments($kind,$r);return response()->view('geography-workspace',['kind'=>$kind,'entityId'=>0,'context'=>$r->session()->get('company_context.token'),'csrf'=>csrf_token()]);} + public function screen(string $kind,int $id,Request $r,Locations $locations){$locations->run($kind,$id,false,fn()=>null);return response()->view('geography-workspace',['kind'=>$kind,'entityId'=>$id,'context'=>$r->session()->get('company_context.token'),'csrf'=>csrf_token()]);} + public function show(string $kind,int $id,Locations $locations){return $locations->run($kind,$id,false,function($db,$scope,$entity,$actor,$binding){return Locations::useHost($db,function()use($db,$scope,$entity){$old=Locations::current($db,$scope);return response()->json(['entity'=>$entity,'location'=>$old,'revision'=>Locations::hash([$scope,$entity,$old]),'catalogue_version'=>Catalogue::active()->source_version,'purpose'=>'segmentation']);});});} + public function history(string $kind,int $id,Request $r,Locations $locations){Catalogue::guard();$d=$this->input($r,['page'=>'sometimes|integer|min:1|max:10000']);return $locations->run($kind,$id,false,fn($db,$scope)=>response()->json($db->table('geo_location_history')->where($scope)->orderByDesc('id')->paginate(15,['id','actor_id','reason','before','after','created_at'],'page',(int)($d['page']??1))->through(function($row){$row->before=json_decode($row->before,true);$row->after=json_decode($row->after,true);return $row;})));} + public function preview(string $kind,int $id,Request $r,Locations $locations){Catalogue::guard();$d=$this->input($r,['operation_key'=>'required|uuid','revision'=>'required|string|size:64','catalogue_version'=>'required|string|size:64','territory_key'=>'present|nullable|string|max:100','reason'=>'required|string|min:10|max:2000']);$d['operation_key']=strtolower($d['operation_key']);return $locations->run($kind,$id,true,function($db,$scope,$entity,$actor,$binding)use($d){return Locations::useHost($db,function()use($db,$scope,$entity,$actor,$binding,$d){$old=Locations::current($db,$scope);abort_unless(hash_equals(Locations::hash([$scope,$entity,$old]),$d['revision']),409,'O cadastro ou a localização mudou. Confira novamente.');abort_unless(hash_equals(Catalogue::active(true)->source_version,$d['catalogue_version']),409,'O catálogo mudou.');$selection=$d['territory_key']===null?null:Catalogue::selection($d['catalogue_version'],$d['territory_key']);$cut=$d+['scope'=>$scope,'entity'=>$entity,'actor'=>$actor,'binding'=>$binding,'observed'=>time()];return response()->json(['preview'=>Crypt::encryptString(json_encode($cut,JSON_THROW_ON_ERROR)),'impact'=>['entity'=>$entity['name'],'purpose'=>'Localização para segmentação','before'=>$old['selection']??null,'after'=>$selection,'reason'=>$d['reason'],'canonical_address_changed'=>false,'dependent_records_changed'=>false]]);});});} + public function confirm(string $kind,int $id,Request $r,Locations $locations){Catalogue::guard();$d=$this->input($r,['preview'=>'required|string|max:131072']);try{$cut=json_decode(Crypt::decryptString($d['preview']),true,64,JSON_THROW_ON_ERROR);}catch(\Throwable){abort(409,'Prévia inválida.');}return $locations->run($kind,$id,true,function($db,$scope,$entity,$actor,$binding)use($cut){return Locations::useHost($db,function()use($db,$scope,$entity,$actor,$binding,$cut){abort_unless(($cut['scope']??null)===$scope&&($cut['actor']??null)===$actor&&($cut['binding']??null)===$binding&&is_int($cut['observed']??null)&&$cut['observed']>=time()-600&&$cut['observed']<=time(),409,'A prévia ou o contexto mudou.');$hash=Locations::hash([$scope,$cut['revision'],$cut['catalogue_version'],$cut['territory_key'],$cut['reason']]);$old=$db->table('geo_commands')->where(['tenant_id'=>$scope['tenant_id'],'company_id'=>$scope['company_id'],'actor_id'=>$actor,'operation_key'=>$cut['operation_key']])->first();if($old){abort_unless(hash_equals($old->request_hash,$hash),409,'Chave já usada com outros dados.');return response()->json(json_decode($old->result,true)+['replayed'=>true]);}$before=Locations::current($db,$scope);abort_unless(hash_equals(Locations::hash([$scope,$entity,$before]),$cut['revision']),409,'O cadastro ou a localização mudou desde a conferência.');$state=Catalogue::active(true);abort_unless(hash_equals($state->source_version,$cut['catalogue_version']),409,'O catálogo mudou.');$selection=$cut['territory_key']===null?null:Catalogue::selection($cut['catalogue_version'],$cut['territory_key']);$revision=($before['revision']??0)+1;$values=['revision'=>$revision,'selection'=>$selection===null?null:json_encode($selection,JSON_UNESCAPED_UNICODE|JSON_THROW_ON_ERROR),'actor_id'=>$actor,'reason'=>$cut['reason'],'updated_at'=>now()];$db->table('geo_locations')->updateOrInsert($scope,$values);$after=Locations::current($db,$scope);$db->table('geo_location_history')->insert($scope+['actor_id'=>$actor,'reason'=>$cut['reason'],'before'=>json_encode($before,JSON_THROW_ON_ERROR),'after'=>json_encode($after,JSON_THROW_ON_ERROR),'created_at'=>now()]);$result=['revision'=>$revision,'selection'=>$selection];$db->table('geo_commands')->insert(['tenant_id'=>$scope['tenant_id'],'company_id'=>$scope['company_id'],'actor_id'=>$actor,'operation_key'=>$cut['operation_key'],'request_hash'=>$hash,'result'=>json_encode($result,JSON_THROW_ON_ERROR),'created_at'=>now()]);return response()->json($result+['replayed'=>false],201);});});} +} diff --git a/app/Shared/Geography/Locations.php b/app/Shared/Geography/Locations.php new file mode 100644 index 0000000..bc33bac --- /dev/null +++ b/app/Shared/Geography/Locations.php @@ -0,0 +1,47 @@ +0,404); + $ctx=app(CompanyContext::class);$s=$ctx->identifiers();$unit=$ctx->unitId();$actor=$ctx->userId();$host=DB::connection();$generation=hash('sha256',json_encode([$s,$unit,request()->session()->get('company_context.module_id'),request()->session()->get('company_context.token')],JSON_THROW_ON_ERROR)); + return $host->transaction(function()use($kind,$id,$edit,$work,$ctx,$s,$unit,$actor,$host,$generation){ + $host->table('companies')->where('id',$s['company_id'])->where('tenant_id',$s['tenant_id'])->lockForUpdate()->firstOrFail();$host->table('users')->where('id',$actor)->lockForUpdate()->firstOrFail(); + abort_unless($host->table('company_memberships')->where($s)->where('user_id',$actor)->lockForUpdate()->first(),403); + $require=function(string $right,?int $u=null)use($host,$s,$actor){abort_unless($host->table('permission_grants')->where($s)->where(['user_id'=>$actor,'permission'=>$right,'unit_id'=>$u])->lockForUpdate()->first(),403);}; + $require('company.view');if($unit!==null)$require('unit.view',$unit); + $base=$s+['unit_key'=>0,'module_key'=>'general','kind'=>$kind,'entity_id'=>$id,'provider'=>'sgf']; + if($kind==='supplier'){ + abort_unless($unit!==null,403);$base['unit_key']=$unit;$base['module_key']='purchasing'; + return app(ReceiptRuntime::class)->run($edit?'purchasing_suppliers.prepare':'purchasing_suppliers.view',function($native,$binding,$fingerprint,$origin)use($id,$edit,$work,$base,$host,$actor,$generation){ + abort_unless($native->hasFunctions($edit?['procurement']:['admin','procurement','finance','department_head']),403); + $supplier=SupplierAccess::query($binding,$origin['sgf_context_key'])->lockForUpdate()->findOrFail($id); + if($edit)abort_unless(app(\Tempo\Purchasing\Embedded\Services\SupplierParticipation::class)->canPrepare($native),403); + $scope=$base;$scope['provider']=hash('sha256',DB::connection()->getDatabaseName());$entity=['id'=>$id,'name'=>$supplier->name,'version'=>(int)$supplier->version,'editable'=>$host->table('permission_grants')->where(['tenant_id'=>$base['tenant_id'],'company_id'=>$base['company_id'],'unit_id'=>$base['unit_key'],'user_id'=>$actor,'permission'=>'purchasing_suppliers.prepare'])->exists()&&app(\Tempo\Purchasing\Embedded\Services\SupplierParticipation::class)->canPrepare($native)]; + return $work($host,$scope,$entity,$actor,hash('sha256',$fingerprint.$generation)); + }); + } + if($kind==='company'){abort_unless($id===$s['company_id'],403);$require($edit?'company.edit':'company.view');$entity=$host->table('companies')->where('tenant_id',$s['tenant_id'])->where('id',$id)->lockForUpdate()->first();} + elseif($kind==='unit'){abort_unless($id===$unit,403);$require($edit?'unit.edit':'unit.view',$id);$base['unit_key']=$id;$entity=$host->table('units')->where($s)->where('id',$id)->lockForUpdate()->first();} + else{$require('clients.view');if($edit)$require('clients.edit');abort_unless(ModuleRecords::active()==='commercial',403);$base['module_key']='commercial';$entity=ModuleRecords::query('a_clients')->where($s)->whereNull('unit_id')->where('id',$id)->lockForUpdate()->first();} + abort_unless($entity,403,'Registo fora do âmbito autorizado.');return $work($host,$base,['id'=>$id,'name'=>$entity->name,'version'=>(int)($entity->version??0),'updated_at'=>$entity->updated_at??null,'editable'=>$host->table('permission_grants')->where($s)->where(['unit_id'=>$kind==='unit'?$id:null,'user_id'=>$actor,'permission'=>match($kind){'company'=>'company.edit','unit'=>'unit.edit','client'=>'clients.edit'}])->exists()],$actor,$generation); + }); + } + public static function current($db,array $scope):?array + { + $r=$db->table('geo_locations')->where($scope)->first();return $r?['revision'=>(int)$r->revision,'selection'=>$r->selection===null?null:json_decode($r->selection,true),'actor_id'=>(int)$r->actor_id,'reason'=>$r->reason,'updated_at'=>$r->updated_at]:null; + } + public static function hash(mixed $v):string{return hash('sha256',json_encode($v,JSON_THROW_ON_ERROR));} + public static function useHost($host,\Closure $work):mixed + { + $old=DB::getDefaultConnection();DB::setDefaultConnection($host->getName());try{return $work();}finally{DB::setDefaultConnection($old);} + } +} diff --git a/app/Shared/Geography/Segments.php b/app/Shared/Geography/Segments.php new file mode 100644 index 0000000..a2120c0 --- /dev/null +++ b/app/Shared/Geography/Segments.php @@ -0,0 +1,23 @@ +identifiers();$unit=$ctx->unitId();$host=DB::connection();$version=Catalogue::active()->source_version;$p=app(Permissions::class);$actor=$ctx->userId(); + $read=function(string $provider,int $unitKey,string $module,\Closure $names,?int $only=null)use($host,$s,$kind,$filters,$version){ + $query=$host->table('geo_locations')->where($s)->where(['unit_key'=>$unitKey,'module_key'=>$module,'kind'=>$kind,'provider'=>$provider])->whereNotNull('selection')->where('selection->version',$version);if($only!==null)$query->where('entity_id',$only);foreach(Cartography::FIELDS as$f)if(isset($filters[$f]))$query->where('selection->codes->'.$f,$filters[$f]);$after=(int)($filters['after']??0);$out=[]; + do{$rows=(clone $query)->where('entity_id','>',$after)->orderBy('entity_id')->limit(100)->get();if($rows->isEmpty())break;$allowed=$names($rows->pluck('entity_id')->all());foreach($rows as$row){$after=(int)$row->entity_id;if(isset($allowed[$after]))$out[]=['entity_id'=>$after,'name'=>$allowed[$after],'location'=>json_decode($row->selection,true),'revision'=>(int)$row->revision];if(count($out)===26)break 2;}}while($rows->count()===100); + $more=count($out)>25;if($more)array_pop($out);return ['version'=>$version,'data'=>$out,'next_after'=>$more?end($out)['entity_id']:null,'page_size'=>25,'population'=>'explicit_segment_locations']; + }; + if($kind==='supplier')return app(ReceiptRuntime::class)->run('purchasing_suppliers.view',function($native,$binding,$fingerprint,$origin)use($read,$unit){abort_unless($native->hasFunctions(['admin','procurement','finance','department_head']),403);return $read(hash('sha256',DB::connection()->getDatabaseName()),$unit,'purchasing',fn($ids)=>SupplierAccess::query($binding,$origin['sgf_context_key'])->whereIn('id',$ids)->pluck('name','id')->all());}); + if($kind==='client'){$p->require($actor,$s['tenant_id'],$s['company_id'],'clients.view');abort_unless(ModuleRecords::active()==='commercial',403);return $read('sgf',0,'commercial',fn($ids)=>ModuleRecords::query('a_clients')->where($s)->whereNull('unit_id')->whereIn('id',$ids)->pluck('name','id')->all());} + if($kind==='unit'){abort_unless($unit!==null,403);$p->require($actor,$s['tenant_id'],$s['company_id'],'unit.view',$unit);return $read('sgf',$unit,'general',fn($ids)=>$host->table('units')->where($s)->whereIn('id',$ids)->pluck('name','id')->all(),$unit);} + return $read('sgf',0,'general',fn($ids)=>$host->table('companies')->where('tenant_id',$s['tenant_id'])->where('id',$s['company_id'])->whereIn('id',$ids)->pluck('name','id')->all(),$s['company_id']); + } +} diff --git a/app/Shared/Testing/TestingDatabaseGuard.php b/app/Shared/Testing/TestingDatabaseGuard.php index 3c88e37..777dc14 100644 --- a/app/Shared/Testing/TestingDatabaseGuard.php +++ b/app/Shared/Testing/TestingDatabaseGuard.php @@ -11,6 +11,14 @@ final class TestingDatabaseGuard { $name = $connection ?: config('database.default'); $config = config("database.connections.{$name}", []); + if(app()->environment(['testing','browser-testing'])&&(config('sales_ledger.synthetic_enabled')===true||config('cost_ledger.synthetic_enabled')===true||config('industrial_ledger.synthetic_enabled')===true) + &&($config['driver']??null)==='pgsql'&&($config['host']??null)==='127.0.0.1'&&(string)($config['port']??'')==='55439' + &&preg_match('/^payable_sgf_([a-f0-9]{12})$/D',$config['database']??'',$m)&&($config['username']??null)==='payable_history_sgf_'.$m[1] + &&empty($config['url'])&&empty($config['read'])&&empty($config['write'])&&($config['search_path']??'public')==='public'){ + \Tempo\Finance\GeneralLedger\LedgerSchema::assertSynthetic(DB::connection($name)); + $actual=DB::connection($name)->selectOne('SELECT current_database() db,current_user role'); + if($actual->db!==$config['database']||$actual->role!==$config['username'])throw new RuntimeException('SGF_TEST_DATABASE_REFUSED: configuração QA e destino efectivo divergem.');return; + } $expected = [ 'driver' => 'pgsql', 'host' => '127.0.0.1', 'port' => '55432', 'database' => 'sgf_tempo_test', 'username' => 'sgf_test_runner', diff --git a/config/common-payables.php b/config/common-payables.php new file mode 100644 index 0000000..965df31 --- /dev/null +++ b/config/common-payables.php @@ -0,0 +1,8 @@ +base_path('packages/payables'), + 'source_instance'=>env('PAYABLE_SOURCE_INSTANCE',''), + 'enabled'=>false, + 'history_enabled'=>false, + 'history_decisions_enabled'=>false, +]; diff --git a/config/cost_ledger.php b/config/cost_ledger.php new file mode 100644 index 0000000..d7bd767 --- /dev/null +++ b/config/cost_ledger.php @@ -0,0 +1,2 @@ +env('SGF_COST_LEDGER_QA',false),'correction_enabled'=>env('SGF_COST_CORRECTION_QA',false)]; diff --git a/config/general_ledger.php b/config/general_ledger.php new file mode 100644 index 0000000..8e31ea7 --- /dev/null +++ b/config/general_ledger.php @@ -0,0 +1,2 @@ +false,'cycle_enabled'=>false,'composition_enabled'=>env('SGF_LEDGER_COMPOSITION_QA',false)]; diff --git a/config/geography.php b/config/geography.php new file mode 100644 index 0000000..55f9001 --- /dev/null +++ b/config/geography.php @@ -0,0 +1,2 @@ +env('SGF_GEOGRAPHY_QA_ENABLED',false),'source_sha256'=>env('SGF_GEOGRAPHY_SOURCE_SHA256','')]; diff --git a/config/industrial_ledger.php b/config/industrial_ledger.php new file mode 100644 index 0000000..2459bd1 --- /dev/null +++ b/config/industrial_ledger.php @@ -0,0 +1,2 @@ +env('SGF_INDUSTRIAL_LEDGER_QA',false),'correction_enabled'=>env('SGF_INDUSTRIAL_CORRECTION_QA',false)]; diff --git a/config/internal_requisitions.php b/config/internal_requisitions.php new file mode 100644 index 0000000..bec7a53 --- /dev/null +++ b/config/internal_requisitions.php @@ -0,0 +1,8 @@ + env('SGF_REQUISITIONS_QA_ENABLED', false), + 'qa_bundle' => env('SGF_REQUISITIONS_QA_BUNDLE'), + 'qa_manifest_sha256' => env('SGF_REQUISITIONS_QA_MANIFEST'), +]; diff --git a/config/receipt_qa.php b/config/receipt_qa.php new file mode 100644 index 0000000..cf4d579 --- /dev/null +++ b/config/receipt_qa.php @@ -0,0 +1,2 @@ +env('SGF_STOCK_PERIOD_QA_ENABLED',false),'stock_trace_enabled'=>env('SGF_STOCK_RECEIPT_TRACE_QA_ENABLED',false),'stock_read_enabled'=>env('SGF_COMPOSITION_STOCK_READ_QA_ENABLED',false),'obligation_evidence_enabled'=>env('SGF_OBLIGATION_EVIDENCE_QA_ENABLED',false),'invoice_progress_enabled'=>env('SGF_INVOICE_PROGRESS_QA_ENABLED',false),'request_history_enabled'=>env('SGF_REQUEST_HISTORY_QA_ENABLED',false),'continuity_enabled'=>env('SGF_PURCHASING_CONTINUITY_QA_ENABLED',false),'focus_enabled'=>env('SGF_PURCHASING_FOCUS_QA_ENABLED',false),'receipt_documents_enabled'=>env('SGF_RECEIPT_DOCUMENTS_QA_ENABLED',false),'enabled'=>env('SGF_RECEIPTS_QA_ENABLED',false),'orders_enabled'=>env('SGF_ORDERS_QA_ENABLED',false),'sourcing_enabled'=>env('SGF_SOURCING_QA_ENABLED',false),'supplier_documents_enabled'=>env('SGF_SUPPLIER_DOCUMENTS_QA_ENABLED',false),'suppliers_enabled'=>env('SGF_SUPPLIERS_QA_ENABLED',false),'dossiers_enabled'=>env('SGF_DOSSIERS_QA_ENABLED',false),'requests_enabled'=>env('SGF_REQUESTS_QA_ENABLED',false),'obligations_enabled'=>env('SGF_OBLIGATIONS_QA_ENABLED',false),'invoices_enabled'=>env('SGF_INVOICES_QA_ENABLED',false),'profile'=>env('SGF_RECEIPTS_QA_PROFILE','')]; diff --git a/config/sales_ledger.php b/config/sales_ledger.php new file mode 100644 index 0000000..60850f8 --- /dev/null +++ b/config/sales_ledger.php @@ -0,0 +1,2 @@ +env('SGF_SALES_LEDGER_QA',false)]; diff --git a/config/stock_ledger.php b/config/stock_ledger.php new file mode 100644 index 0000000..cfeba85 --- /dev/null +++ b/config/stock_ledger.php @@ -0,0 +1,2 @@ +[]]; diff --git a/docs/ACCOUNTING_MENU_DELIVERY.md b/docs/ACCOUNTING_MENU_DELIVERY.md index 98c94f9..76608d5 100644 --- a/docs/ACCOUNTING_MENU_DELIVERY.md +++ b/docs/ACCOUNTING_MENU_DELIVERY.md @@ -1,5 +1,7 @@ # Menus de Contabilidade +Continuação posterior autorizada: [primeiro lançamento contabilístico sintético](GENERAL_LEDGER_DELIVERY.md), com ligação condicionada a direito próprio na unidade. Supera apenas a ausência absoluta do motor no recorte QA; não transforma os restantes menus/relatórios previstos em funcionalidades operacionais nem presume revisão visual. + 29/10/2026. Acrescentada a navegação do documento `Menus de contabilidade.docx` ao SGF existente. A entrega é de menu, organização funcional e ligações autorizadas; **não implementa contabilidade geral ou demonstrações financeiras**. ## Fonte e âmbito diff --git a/docs/CARTOGRAPHY_REFERENCE_PREPARATION.md b/docs/CARTOGRAPHY_REFERENCE_PREPARATION.md new file mode 100644 index 0000000..433b0b7 --- /dev/null +++ b/docs/CARTOGRAPHY_REFERENCE_PREPARATION.md @@ -0,0 +1,37 @@ +# Referência territorial para segmentação dos cadastros + +**Continuação funcional:** o [selector comum, gravação/histórico e segmentação estão agora entregues na composição QA8069](GEOGRAPHY_SEGMENTATION_DELIVERY.md), com83 verificações. As indicações de implementação pendente abaixo descrevem o estado desta preparação inicial; não se aplicam às capacidades demonstradas nesse recorte. Correcção/publicação de versões, migração histórica, utilização real, revisão visual e implantação permanecem separadas. + +Fonte fornecida pelo utilizador: `cartografia_moz.xlsx`, declarada como cartografia validada pelo INE. A análise é da versão exacta do ficheiro recebido, não uma verificação independente de validade/vigência nacional. SHA256: `70996d9a9133785a848de90bedb4bf685e24d8f823cd153c0adc43eac642a292`. Não foi modificado nem reexportado. + +## Estrutura observada + +`Sheet1!A1:H20408`:20.407 registos, sem fórmulas ou linhas ocultas. Campos `ID`, `Provincia`, `Distrito`, `Posto_Administrativo`, `Localidade`, `Bairro_Urbano`, `Aldeia_Quarteirao`, `Designacao`. + +| Nível mais detalhado do registo na fonte | Registos | +| --- | ---: | +| Província | 11 | +| Distrito | 148 | +| Posto administrativo | 437 | +| Localidade | 1.334 | +| Bairro urbano | 1.870 | +| Aldeia/quarteirão | 16.607 | +| Total | 20.407 | + +Os componentes são códigos de texto, incluindo zeros iniciais e os valores alfanuméricos `7A`/`7B`. O `ID` é único nesta folha; não se presume que seja um código INE estável entre versões. A identidade técnica preparada usa versão da fonte + ID original. Designações e códigos originais ficam intactos. + +Foram conservados48 grupos com caminho de códigos repetido,39 dos quais com designações diferentes, e nove registos sem designação. Há8.610 registos sem uma linha correspondente ao pai imediato, abrangendo8.585 caminhos distintos, e377 com mais de um candidato a pai imediato. Isto descreve relações ausentes/ambíguas **na folha recebida**, não prova que um território administrativo seja inválido. Códigos como99 também permanecem intactos, sem significado inventado. Nomes repetidos entre territórios são normais e não servem de chave de associação. + +## Preparação implementada + +`App\Shared\Geography\Cartography` prepara um catálogo versionado com todas as linhas, componentes, nível, designação, candidatos a pai e pendências. Não funde duplicados, não inventa designações e não executa conteúdo do Excel. A selecção técnica exige chave e versão exactas; recusa nomes soltos, versão antiga e entradas com pendências próprias ou de ascendência. Permite precisão apenas de província quando é essa a informação conhecida. A fonte extraída e o catálogo preparado ficam no directório privado de execução; não se incorporou a carga de dados no repositório nem no destino. + +[Prova técnica](proofs/cartography-preparation-20261103.json):16 verificações, incluindo reconciliação dos níveis, conservação integral, zeros, alfanuméricos, duplicados, designações ausentes, selecção explícita, recusa de ambiguidades/versões antigas e preparação determinística. Sem ligação a bases ou atribuição a cadastros. + +## Aplicação comum no SGF + +Usar um único catálogo de referência para empresas/unidades, clientes, fornecedores e outras entidades. Cada localização deve guardar país, versão da fonte, chave do território, precisão realmente conhecida, finalidade do endereço e endereço livre complementar. Sede, endereço fiscal, estabelecimento e destino de entrega podem ser diferentes; a cartografia não os torna equivalentes. + +O formulário deve seleccionar em cascata os níveis disponíveis e exibir pendências da fonte. A associação é uma decisão explícita do cadastro, com permissões e isolamento da entidade, autor/data e histórico. Uma actualização de cartografia cria outra versão e conferência de diferenças, preservando associações históricas. Segmentação e relatórios filtram pelos componentes territoriais da localização escolhida, sem confundir localização com direitos de acesso ou inventar precisão mais fina. + +**Ainda não entregue:** tabela/API/selector comuns montados no SGF, ligação dos formulários de empresas/clientes/fornecedores, persistência/histórico das localizações e filtros dos relatórios. O que existe nesta passagem é leitura, preparação do catálogo, contrato de utilização e provas. Não foram atribuídas localizações aos registos existentes, nem alteradas as seis associações protegidas, a cache, acessos ou dados reais. As pendências da fonte exigem conferência antes da activação, sem impedir o desenvolvimento sintético das interfaces. diff --git a/docs/COMMON_FINANCE_BUNDLE_DELIVERY.md b/docs/COMMON_FINANCE_BUNDLE_DELIVERY.md new file mode 100644 index 0000000..301c7a4 --- /dev/null +++ b/docs/COMMON_FINANCE_BUNDLE_DELIVERY.md @@ -0,0 +1,23 @@ +# Artefacto financeiro autónomo — composição QA + +Continuação funcional do ciclo aprovado, sem novos efeitos financeiros. **Demo própria SGC: http://127.0.0.1:8052/qa/ledger-demo**. Mantém as três funções, uma obrigação60 e nenhum pagamento/lançamento inicial. SGF8050, SGC8051 e demos anteriores permanecem preservados. + +Foi acrescentado um artefacto versionado por conteúdo com **25 ficheiros** de runtime de Payables/GeneralLedger e verificador, extraídos da fonte canónica, sem credenciais, bases, fixtures ou suites. Manifesto SHA-256 desta prova: `6a507ea7d708a12a8e526e4c610696d8db84079d18aede470237b65505630e7e`. O pacote foi criado em pasta QA privada; não foi instalado no destino, publicado ou activado no SGC existente. + +O host nativo tem agora um ponto de composição explícito em `FinanceBundle::configure`, antes de carregar Payables. Sem configuração de artefacto mantém exactamente o caminho anterior. Com configuração exige ambiente de teste, base/role própria não elevada no cluster55439, manifesto cujo hash está fixado na configuração e hash do carregador. Só depois carrega o verificador e confere todos os ficheiros, caminhos permitidos, duplicações, ausências, alterações, extras e links simbólicos. Falha recusa o arranque; não regressa silenciosamente à pasta antiga. O manifesto é lido/conferido pelos mesmos bytes usados na descodificação. + +As chaves novas `common-finance-bundle.root/manifest_sha256` seleccionam fonte de código, **não concedem direitos nem activam contabilidade**. Flags sintéticas continuamfalse nos defaults; ausência de root é o comportamento normal. Configuração real, migrações, cache e pacote instalado continuam intactos. Hashes fixam integridade do conteúdo; não são certificação fiscal ou validação de distribuição comercial. + +Provas novas, sem repetir o ciclo inteiro já válido: + +- **9 verificações** numa base nativa nova: cinco classes financeiras, incluindo o verificador, carregadas exclusivamente do artefacto; preparação/revisão/aplicação de reconhecimento60 e replay com uma só gravação; duas linhas; totais e fingerprint original de factura/stock/orçamento preservados. +- **6 verificações** do contrato de artefacto: conteúdo válido aceite; ficheiro alterado, ausente, extra, caminho de travessia e hash fixado errado recusados. +- **4 recusas efectivas no arranque do host**: ficheiro alterado, extra, hash errado e carregador alterado. O carregador alterado continha um marcador de execução; o marcador nunca foi produzido. Sem fallback, efeitos de negócio ou alterações à prova original. +- **28 verificações** de preparação do demo8052: três funções, cookies separados, estados iniciais vazios e ligações financeiras/contabilísticas. Sem comandos de negócio na base da equipa. +- PHPStan nível7 nos dois ficheiros nativos novos: zero erros; formatação e sintaxe dirigidas. A cache de análise é privada; não se usou a suite Composer que limpa configuração/cache. + +[Manifesto e hashes](proofs/common-finance-bundle-20261103.json). O primeiro construtor encontrou um README opcional ausente em Payables; a cópia incompleta foi retida como diagnóstico, sem arranque ou uso. A construção final exclui ficheiros opcionais inexistentes e exige os bootstraps. Nenhuma prova aprovada foi sobrescrita. + +Reprodução: `scripts/finance-bundle-build.mjs` constrói novo artefacto QA; `scripts/finance-bundle-check.mjs` verifica integridade/recusas; `scripts/ledger-cycle-native-run.mjs new-bundle` cria outra base configurada com o hash fixado; fase PHP `native-cycle-bundle` prova o writer do artefacto; `scripts/finance-bundle-boot-check.mjs ` prova as recusas do host. Demo exige outra fixture, `ledger-cycle-native-demo.mjs` e `ledger-cycle-demo-check.mjs native `. Preservar as fixtures consumidas pelas provas. + +O artefacto contém apenas estes dois núcleos; não empacota todo o Laravel, dependências, orçamento, Compras ou instalação comercial. Não se ensaiaram outras plataformas, implantação, actualização de base instalada, carga sustentada, ACLs ou revisão visual. Não é uma passagem operacional de dados entre SGF/SGC. Seis associações, cache, dados/acessos reais, candidatas, demos e trabalho paralelo preservados. Sem publicação, aceitação ou checkpoint presumidos. diff --git a/docs/COMPRAS_USO_LOCAL.md b/docs/COMPRAS_USO_LOCAL.md new file mode 100644 index 0000000..97449ec --- /dev/null +++ b/docs/COMPRAS_USO_LOCAL.md @@ -0,0 +1,36 @@ +# Usar Compras na instalação local + +Abrir **http://127.0.0.1:8085/compras**. Esta é a entrada única do percurso de Compras. Não é necessário conhecer endereços de demonstrações anteriores ou copiar identificadores. + +O ambiente é sintético. Escolher uma função e uma etapa; a empresa e unidade aparecem na entrada e no cabeçalho. Para passar a outra função, usar **Entrada de Compras / trocar função**. A opção **Continuar o documento actual** mantém a origem que estava aberta, quando essa função tem acesso. Campos por confirmar são protegidos ao sair e uma confirmação em curso impede a mudança. + +## Percurso novo + +1. **Compras → Fornecedores:** preparar a ficha com dados sintéticos, referências documentais e próxima revisão. Conferir impacto e confirmar. **Finanças** abre a mesma ficha, confere e decide a activação por outra identidade. Há também três fornecedores QA previamente preparados. +2. **Solicitante → Requisições:** preparar a necessidade, escolher explicitamente o centro autorizado, indicar data, fundamento e linhas. Para experimentar:1UN a100,00MZN, imposto documental0. Guardar e submeter são confirmações distintas. A submissão reserva o montante no orçamento de Compras. +3. **Chefia → Requisições:** abrir a necessidade e aprovar a versão com fundamento. O solicitante não aprova a própria necessidade. A ligação de continuação abre as propostas da mesma requisição. +4. **Compras → Propostas e adjudicação:** registar três propostas de fornecedores elegíveis. Compras e Finanças fazem avaliações individuais; só depois conferir a comparação, escolher expressamente e fundamentar a adjudicação. **Chefia** decide a adjudicação. +5. **Compras → Ordens:** conferir a adjudicação aprovada e o impacto antes de emitir. A ordem conserva fornecedor, linhas, valores e aprovações. A ligação seguinte abre a recepção da mesma ordem. +6. **Armazém → Recepções:** abrir a ordem, marcar as linhas, pesquisar/escolher artigo e armazém, indicar guia/data/quantidades e qualidade. Conferir e confirmar. Só as quantidades aceites geram movimento. Se a resposta se perder, repetir a mesma confirmação recupera o resultado sem duplicar. +7. **Finanças → Facturas:** abrir a ordem, registar número/data e valores do documento recebido, seleccionar as linhas e quantidades e fundamentar a conferência. **Revisor financeiro** valida por outra identidade. Essa validação consome o compromisso uma vez; não reconhece automaticamente a obrigação. +8. **Finanças → Obrigações:** abrir a factura validada, conferir e confirmar a preparação da fotografia. **Revisor financeiro** escolhe essa proposta, confere o reconhecimento e confirma com fundamento. A página passa a apresentar a responsabilidade única e deixa de oferecer nova preparação para o documento reconhecido. + +O painel **Percurso de Compras** encontra os documentos existentes por etapa e abre-os directamente. Os históricos e dossiês permitem conferir origens e decisões autorizadas. As listas são filtradas pelas permissões: mudar de função não concede direitos reais nem torna todas as etapas disponíveis ao mesmo utilizador. + +## Exemplo já concluído + +Está gravado um processo com o fornecedor **Fornecedor Percurso Completo QA**, três propostas100/120/140MZN, duas avaliações por proposta, ordem/recepção1UN, factura100MZN e obrigação100MZN. Pode abrir os documentos nas etapas acima e consultar as decisões. Para praticar outra compra, criar uma nova requisição; não repetir o documento já concluído. + +O vencimento dessa obrigação não foi fornecido: permanece **desconhecido**, com atraso indeterminado. Não há pagamento ou contabilização dessa origem. O orçamento sintético é limitado e o motor recusa operações sem dotação; os saldos não são inventados ou reiniciados para permitir testes. + +## Voltar a iniciar + +Se a página não estiver aberta, executar no PowerShell: + +```powershell +& 'C:\laragon\www\sgf-tempo\scripts\abrir-compras.ps1' +``` + +O comando reutiliza a instalação8085 e não cria bases ou demonstrações. O cluster QA existente tem de estar disponível. O arranque após reinício completo do computador não foi ensaiado nesta entrega. + +Esta conclusão cobre aquisição até obrigação no ambiente local. Pagamentos, contabilidade dessa origem, emissão fiscal real, migração histórica e utilização empresarial permanecem fora deste percurso. Revisão visual, carga sustentada e implantação não são presumidas por esta prova funcional. diff --git a/docs/FINANCIAL_RECEIPT_RECOVERY_DELIVERY.md b/docs/FINANCIAL_RECEIPT_RECOVERY_DELIVERY.md new file mode 100644 index 0000000..50dbcee --- /dev/null +++ b/docs/FINANCIAL_RECEIPT_RECOVERY_DELIVERY.md @@ -0,0 +1,17 @@ +# Recuperação de comprovativos financeiros integrada — 03/11/2026 + +A consulta contabilística por chave passa a oferecer três domínios explícitos: Contabilidade, reconhecimento de fornecedor e liquidação de fornecedor. A escolha nunca procura automaticamente noutro motor. O resultado é histórico, do próprio autor no âmbito actual, não valida dependências actuais nem executa/reenvia comandos. + +`GET /api/general-ledger/financial-receipts/{domain}/{key}`, com `domain=recognition|settlement`, reutiliza os motores financeiros e os callbacks de leitura existentes. Exige acesso à Contabilidade e à origem; liquidação exige ainda o direito próprio `payments_view`. Sem herança entre direitos, concessões novas ou activação de Compras. O percurso antigo de comprovativos contabilísticos mantém-se. + +`ReceiptReader` restringe os dois domínios a tabelas fixas, filtra tenant/empresa/unidade/autor/chave e exige autorização própria de leitura. Não usa a autorização de comandos como fallback. O host cobre a consulta com `REPEATABLE READ READ ONLY`. Ausência de domínio instalado é recusa explícita, não saldo zero; chave ausente e chave de outro autor não revelam comprovativos. Respostas usam `no-store` e recusam parâmetros de contexto. + +O formulário partilhado das páginas contabilísticas permite escolher o domínio, faz só GET, limpa o resultado anterior na recusa e mostra JSON como texto. Não guarda pedidos, não inventa resultado quando a chave falta e não permite executar operações pela consulta. Nenhum novo direito, migração, dependência ou efeito financeiro. + +**43 verificações dirigidas** numa base/role nova QA55439 (`6070063f42f2`):13 de serviço,6 do leitor comum,19 HTTP e5 do JavaScript renderizado em Node VM. Cobrem chave igual nos dois domínios, direitos separados/revogados, autor diferente, filtro de tenant/empresa/unidade, domínio inválido, ausência de autorizador de leitura, UUID/contexto/módulo inválidos, ausência de fallback para Contabilidade, transacção só de leitura, zero bloqueios, escape como texto e ausência de repetição automática. + +O comprovativo de reconhecimento provém do workflow efectivo de fornecedor60 já aprovado, executado exclusivamente na fixture nova. Para provar colisão de chaves, o comprovativo de liquidação foi inserido como **fixture de infra-estrutura**, com `qa_fixture=true` e `state=no_business_effect`. Não representa preparação, confirmação ou execução de pagamento. Há zero pagamentos na base; a consulta conserva fontes, direitos e contagens dos dois livros de comprovativos. Um auxiliar de teste precisou de capturar explicitamente o contador no closure antes de gerar a prova válida; a tentativa parcial não é contada. + +Manifesto: [provas e hashes](proofs/financial-receipt-recovery-20261103.json). Provas anteriores preservadas por hash; suites financeiras e benchmarks alheios não repetidos. Demos anteriores, seis associações, cache bloqueada e trabalho em curso preservados. Sem acessos reais, publicação, activação de Compras ou checkpoint. + +Limites: sem arquivo de pedidos perdidos quando a chave já não existe, histórico SGF vivo, comunicação bancária ou nova validação do estado financeiro. Não se instalou esta capacidade no SGC nem se substituíram os pacotes congelados. Revisão visual, carga sustentada e implantação continuam pendentes; HTTP e Node VM não são prova visual ou capacidade operacional. diff --git a/docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md b/docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md new file mode 100644 index 0000000..1bd8f7d --- /dev/null +++ b/docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md @@ -0,0 +1,81 @@ +# Ciclo contabilístico sintético integrado — entrega local + +`COMMON-LEDGER-COMPLETE-CYCLE-SIM-v1`, autorizado expressamente por «Autorizar o ciclo sintético proposto». **Implementação funcional concluída no recorte autorizado**, com demonstrações SGF e SGC separadas. Não equivale a contabilidade geral/fiscal completa ou implantação aceite. + +## Demonstrar o ciclo inteiro + +| Composição | Entrada persistente | Estado inicial na entrega | +|---|---|---| +| SGF | **http://127.0.0.1:8050/qa/ledger-demo** | Uma obrigação60MZN, sem pagamento, afectação, proposta contabilística, lançamento ou fecho | +| SGC autónomo | **http://127.0.0.1:8051/qa/ledger-demo** | Factura efectivamente conferida no workflow nativo e uma obrigação60MZN, restantes efeitos vazios | + +Escolher Preparar/aplicar, Rever com outra pessoa ou Consultar. Cada decisão exige fundamento. As duas instalações são **livros financeiros independentes**, não duas autoridades operacionais para a mesma dívida. O SGC usa o pacote comum local, sem serviço SGF remoto, facturação de vendas SGF ou cópia divergente do motor. O pacote instalado e a configuração operacional do SGC não foram activados/substituídos. + +Guião, presente também nas entradas: + +1. Capturar reconhecimento contabilístico60, conferir o impacto D `QA-CONTRAPARTIDA` / C `QA-FORNECEDOR`, rever com outra pessoa e aplicar. +2. Abrir liquidações financeiras pelo botão. Registar facto sintético20 com referências únicas `SIM-…`, data29/10/2026, confirmar com outra pessoa, preparar afectação20 e confirmá-la independentemente. Principal60, saldo40. Não há execução monetária. +3. Voltar pelo botão à contabilidade. Capturar a afectação confirmada, rever D fornecedor20 / C `QA-LIQUIDACAO`20 e aplicar. O lançamento **não volta a reduzir o saldo**. +4. Preparar e confirmar a reversão financeira integral da afectação; saldo volta a60. Conferir/contabilizar a reversão: D liquidação20 / C fornecedor20. O original fica conservado. +5. Capturar correcção técnica do lançamento original de reconhecimento: estorno integral60 e substituição integral60, ambos fotografados. Outra pessoa revê o par exacto. Preparador aplica os dois numa transacção, conservando o original e sem alterar dívida/imposto/moeda. +6. Capturar conferência do período `QA-2026-10`, rever com outra pessoa e fechar. Pendências financeiras/contabilísticas impedem fecho; mudança de factos/regras exige nova conferência. Depois de fechado, novas gravações nesse período recusam; consultas e recuperação de recibos existentes continuam disponíveis. **Não existe reabertura.** + +Após o ciclo de prova há uma obrigação60, saldo60, cinco lançamentos/dez linhas, débito bruto220/crédito bruto220 e uma versão de período fechado, além da versão aberta original. O valor220 é soma bruta de movimentos incluindo compensações, não saldo financeiro ou nova dívida. + +As bases da equipa são distintas das bases de regressão e conservam as decisões futuras. Não usar reset para repetir o guião. Os demos anteriores 8002/8003/8005/8039/8048/8049 e os respectivos dados não foram alterados por esta entrega. A fixture documental SGF continua a ser recibo sintético; só a origem SGC desta composição passa pelo workflow nativo efectivo. Na demonstração SGC, o relógio de preparação foi explicitamente fixado em29/10/2026 para produzir a factura QA dentro do período artificial. Isto não valida políticas temporais/fiscais reais. + +## Núcleo único e guardas + +O pacote canónico `packages/general-ledger` reutiliza `PayableJournal` para captura, revisão, aplicação, linhas, equilíbrio, unicidade, recibos e auditoria de todos os efeitos. `LedgerCycle` acrescenta a orquestração do par correctivo e do fecho; não contém um segundo writer de lançamentos. O principal original permanece no snapshot; `amount_minor` da afectação/reversão é distinto, evitando contabilizar60 quando foram afectados20. + +`CycleSchema::install` é explícito e recusa ledger com propostas/lançamentos existentes. Só foi executado em bases/roles novas no cluster55439. Acrescenta cinco tabelas append-only de grupos/resultados correctivos e conferência/revisão/fecho de períodos. No schema **novo**, o equilíbrio compara o montante explícito do efeito; o schema das demos anteriores não é actualizado no arranque. Constraints diferidas exigem o par correctivo completo no commit; foreign keys incluem âmbito; fecho exige revisão independente e nova versão fechada. Os nove históricos anteriores continuam append-only. + +As rotas individuais de revisão/aplicação recusam partes correctivas com409 e orientam para o par. A orquestração usa os mesmos métodos internos, mas grava ambos os lançamentos e o resultado do grupo numa transacção. Falha entre os dois ou depois do recibo faz rollback integral. Mesma chave/conteúdo recupera o resultado; outra chave não duplica o mesmo efeito; conteúdo conflitante é recusado. Direitos e pessoa/contexto actuais são conferidos antes de recuperar recibos. + +Fecho captura origens reconhecidas, efeitos confirmados, propostas/decisões/configuração e totais. O hash é calculado por cursores, sem carregar todo o livro em arrays; verificações por origem ainda fazem consultas individuais. Este percurso de escrita **não foi ensaiado a10.000 origens** e não tem capacidade de implantação validada. O fecho não apaga pendências, não inventa lançamentos e não fecha enquanto houver efeitos necessários por conferir/contabilizar. O bloqueio de empresa serializa a revalidação/aplicação. + +## Adaptadores, interface e acessos + +- SGF: contexto Contabilidade e permissões existentes por tenant/empresa/unidade, com mudança explícita/auditada de módulo para liquidações. Geração anterior de contexto não autoriza comandos novos. +- SGC: organização nativa, funções/acessos financeiros actuais e concessões contabilísticas QA explícitas em `pa_access`. A composição nativa usa `company_id=0/unit_id=0` no contrato comum e isola por tenant; isso não declara suporte de unidades empresariais que o adaptador nativo não possui. Actualiza/verifica actor, pessoa e direitos antes de escrever, respeitando manutenção/contexto de trabalho nativos. +- UI comum em `packages/general-ledger/ui/cycle.php`, servida pelos dois adaptadores. Propostas, impactos, fontes financeiras confirmadas, correcções, conferências de período, linhas e histórico. Listas limitadas a25, totais sobre o conjunto correspondente. Navegação considera também páginas de eventos/propostas, mesmo quando já não há mais lançamentos. O par inclui as duas fotografias mesmo que uma proposta esteja fora da página do diário. +- A consulta do workspace completo usa uma transacção própria `REPEATABLE READ READ ONLY`, sem `FOR UPDATE`. Leituras iniciadas dentro de transacções participam nelas; os comandos conservam bloqueios e estado actual. O percurso financeiro legado do SGC mantém o seu contrato anterior de leitura; não se afirma que todas as suas páginas foram convertidas para o novo leitor sem bloqueios. + +Os dez direitos contabilísticos são os quatro anteriores e os seis novos aprovados: `view/prepare/validate/post`, `correct_prepare/correct_validate/correct_post`, `period_prepare/period_validate/period_close`, todos com prefixo `general_ledger.`. **12 concessões por fixture nova**: preparador7, revisor4, consulta1. Direitos de liquidação existentes reutilizados apenas QA: `payments_view`, `payment_prepare/payment_confirm`, `allocation_prepare/allocation_confirm`, `reversal_prepare/reversal_confirm`; preparação e confirmação são distintas. Nenhum direito ou acesso real/público foi concedido. + +Ambos os destinos mantêm flags de ciclo e uso sintético **false**; path nativo por defeito é null. A composição QA fornece o pacote explicitamente. Não foram criadas migrações no destino, dependências novas ou emissão/contas reais. O SGC recusa a capacidade se o pacote não estiver composto, em vez de recorrer a um motor alternativo. + +## Provas e condições + +[Manifesto, fontes e hashes](proofs/common-ledger-complete-cycle-20261102.json). As datas referem-se à autorização; a execução prolongou-se pela sessão local seguinte. Segredos, cookies, configurações e logs ficam apenas na área QA privada. + +| Prova | Resultado | +|---|---| +| Ciclo SGF com falhas/versões/revogação, todo revertido | 23 verificações | +| Mesmo contrato pelo adaptador SGC, todo revertido | 23 verificações | +| Segurança adicional: própria pessoa, direito correctivo revogado, bypass individual, par órfão no commit, falha depois do recibo, append-only nas cinco tabelas | 18 verificações, revertidas | +| HTTP SGF, decisões financeiras e contabilísticas reais no kernel | 70 verificações; um ciclo completo conservado | +| HTTP SGC, mesmo percurso no host nativo | 61 verificações; um ciclo completo conservado | +| Pós-verificação de leitura, conservação, guardas individuais e navegação longa | 10 SGF +10 SGC; sondagens novas revertidas | +| Preparação das duas demonstrações, sem comandos de negócio | 28 SGF +28 SGC | +| Regressão do primeiro efeito, afectado pela generalização do writer | 8 cenários/74 asserções, numa base nova, sem reset das provas anteriores | + +As contagens acima identificam execuções e não devem ser somadas como testes únicos independentes: há verificações sobrepostas dos mesmos contratos. Uma execução adicional persistente do contrato SGC tem16 verificações e conserva o livro fechado; não acrescenta cobertura única à tabela. + +Análise estática nativa dirigida aos quatro ficheiros alterados: PHPStan nível7, **zero erros**, com bootstrap do pacote comum e cache exclusivamente privada. Foram corrigidos tipos de retorno/arrays e a verificação explícita de utilizador interno, impedindo que uma conta de candidatura seja passada ao adaptador. Formatação dirigida com Pint; verificação de sintaxe dos ficheiros afectados registada no manifesto. Não se executou o script geral Composer que limpa configuração/cache. + +Complemento após essa correcção: **cinco verificações** dos controladores confirmaram recusa403 de conta de candidatura nas três entradas e na ligação financeira, consulta200 com utilizador interno e fingerprint financeiro igual. Não se repetiram as sequências HTTP de negócio válidas. + +**Concorrência real: cinco trabalhadores, ligações distintas.** Dois correctores aguardaram em `companies FOR UPDATE`, com cadeia de bloqueio observada por `pg_blocking_pids`; após libertação ambos receberam o mesmo resultado, com um par e cinco lançamentos totais. Um fecho aguardou enquanto o pai acrescentava uma versão de regra; após commit recebeu409 por evidência desactualizada, sem fechar. Nova captura e revisão permitiram dois fechos concorrentes: ambos recuperaram o mesmo fecho, exactamente uma versão fechada e um recibo factual. Não se atribuiu a espera a gargalo de auditoria nem se resolveu a divergência aumentando apenas o timeout. + +As falhas injectadas existem só em callbacks CLI de teste, não em parâmetros HTTP. Foi comprovado rollback após o primeiro lançamento do par, após o recibo e após acrescentar a versão fechada. O teste do par órfão exerceu a constraint SQL; a guarda pública posterior409 foi comprovada nas verificações finais. Diagnósticos do auxiliar de preparação do demo corrigiram expectativas de texto e de formulário do revisor sem propostas; não houve decisão de negócio ou reset nessas tentativas. + +No SGC, fingerprints dos documentos/itens/pagamentos externos/stock/orçamento originais mantiveram-se. No SGF, dívida e direitos foram conservados pelas consultas e sondagens revertidas. As seis associações protegidas e a cache bloqueada não foram consultadas para decisão, alteradas ou limpas. Provas válidas de carga, fila e liquidações anteriores foram reutilizadas por hash; não se repetiram matrizes/suites alheias. + +## Limitações que continuam separadas + +Este recorte só suporta MZN, imposto0, três contas artificiais, reconhecimento60, afectação/reversão20 e correcção técnica integral do reconhecimento, sem mudança comercial. Não há reabertura, plano PGC real aprovado, contabilidade de vendas/IVA/stock/salários, correcção comercial do principal, execução monetária, reconciliação bancária ou fecho legal geral. + +O reconhecimento/fecho sintético não valida fiscalidade, exigibilidade, data contabilística real, adopção de pacote instalado ou passagem operacional de responsabilidade. Revisão visual pela equipa, feedback, aceitação e avaliação de carga/implantação permanecem pendências próprias. Nenhum benchmark novo ou índice foi criado. A leitura financeira anterior de páginas25/100 nos volumes1.000/5.000/10.000 conserva as provas existentes; o relatório integral ainda tem a limitação observada de cerca de12,6s para10.000 posições. + +Sem publicação/push, activação de Compras, novo checkpoint ou aceitação presumida. A autorização funcional foi usada para concluir este ciclo conjuntamente, sem pedir confirmação de cada passo técnico. diff --git a/docs/GENERAL_LEDGER_COMPLETE_SYNTHETIC_SCOPE.md b/docs/GENERAL_LEDGER_COMPLETE_SYNTHETIC_SCOPE.md new file mode 100644 index 0000000..95c787f --- /dev/null +++ b/docs/GENERAL_LEDGER_COMPLETE_SYNTHETIC_SCOPE.md @@ -0,0 +1,31 @@ +# Ciclo contabilístico sintético integrado — recorte para decisão + +02/11/2026. **Autorização expressa recebida: «Autorizar o ciclo sintético proposto». Implementação local concluída no recorte aprovado.** Continuação agrupada do [percurso funcional financeiro → lançamento](SGF_FINANCIAL_LEDGER_FLOW_DELIVERY.md). O texto de decisão abaixo conserva o recorte autorizado; não é um pedido pendente de nova aprovação. Entrega, demonstrações e limites em [GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md](GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md). + +## Porque a decisão é necessária + +O [AGENTS.md](../AGENTS.md), primeira instrução do lançamento, delimita a autorização anterior: «não autoriza lançamentos/contas/direitos reais, migração no destino, fecho/reabertura, novos efeitos de pagamentos, activação de Compras, publicação, aceitação ou checkpoint». O [recorte primeiro](GENERAL_LEDGER_FIRST_SYNTHETIC_SCOPE.md) exclui também correcção/estorno e composição contabilística autónoma. O desenvolvimento técnico do primeiro efeito e das suas ligações está concluído no âmbito demonstrado; não se presume autorização destes novos efeitos. + +## Uma entrega funcional, com bases novas e decisões individuais + +`COMMON-LEDGER-COMPLETE-CYCLE-SIM-v1`: autorização conjunta proposta para construir e demonstrar o seguinte ciclo, sem aprovações intermédias de cada ligação técnica: + +1. **Liquidação sintética de 20 MZN sobre a obrigação QA de 60 MZN.** Reutilizar os comandos e decisões independentes do núcleo de liquidações, sem execução monetária/bancária. Só a afectação efectivamente confirmada é origem do efeito contabilístico. Principal permanece 60 e saldo financeiro passa a 40. Facto de pagamento sem afectação confirmada não lança automaticamente contra o fornecedor. +2. **Lançamento da afectação confirmada**, proposta/revisão/aplicação distintas: débito 20 em `QA-FORNECEDOR`, crédito 20 em nova conta artificial de movimento `QA-LIQUIDACAO`. A conta não representa uma conta bancária real, dinheiro verificado ou reconciliação. Uma única aplicação por afectação factual e tipo de efeito; fotografia/versionamento e autor/fundamento conservados. +3. **Reversão financeira e contabilística ligada.** Reutilizar o circuito financeiro existente de reversão independente; quando a reversão confirmada for contabilizada, débito 20 em `QA-LIQUIDACAO`, crédito 20 em `QA-FORNECEDOR`. Preservar afectação, lançamento e decisões originais. Saldo financeiro volta a 60; nenhuma reversão implícita da obrigação original. Contabilização em falta fica pendência visível, nunca compensação silenciosa. +4. **Correcção técnica de um lançamento de reconhecimento**, sem mudar a dívida: proposta de correcção captura o lançamento de 60 e a razão; revisão distinta aprova exactamente um par atómico de estorno integral (D fornecedor/C contrapartida) e substituição integral (D contrapartida/C fornecedor), 60 MZN cada. Novos efeitos correctivos referenciam o original e a decisão; não reutilizam uma nova chave para furar a unicidade do efeito de reconhecimento. O original não é editado/apagado. Alteração comercial de principal, imposto ou moeda fica fora desta proposta. +5. **Fecho do período QA**, preparado e revisto por pessoas distintas: fotografia do conjunto de origens/lançamentos/pendências e igualdade D/C; impedir fecho enquanto houver efeitos confirmados obrigatórios sem conferência, inconsistências ou propostas necessárias não resolvidas. Aplicação revalida a fotografia numa transacção; nova origem/lançamento/decisão exige nova conferência. Após fecho, bloquear novos lançamentos nesse período, mantendo leitura e recuperação dos recibos existentes. **Reabertura continua excluída** deste recorte; não é necessária para demonstrar o ciclo fechado. +6. **Duas composições QA sobre o mesmo núcleo**, adaptador SGF e adaptador autónomo SGC. Reutilizar o pacote canónico, sem cópia divergente do motor, pacote instalado substituído, candidata activada ou dependência de SGF remoto. Bases de prova separadas representam livros independentes; não apresentar a mesma dívida como responsabilidade financeira operacional nos dois hosts. +7. Uma demonstração persistente própria, com entrada, papéis, referências e pendências ligadas, permitindo executar o ciclo completo. Base de regressão separada; histórico mantido, sem reset do demo para ocultar decisões. + +## Direitos propostos antes de concessão + +Conservar `general_ledger.view/prepare/validate/post` apenas QA. Novos direitos propostos, **apenas em novas fixtures**: `general_ledger.correct_prepare`, `general_ledger.correct_validate`, `general_ledger.correct_post`, `general_ledger.period_prepare`, `general_ledger.period_validate`, `general_ledger.period_close`. Separar preparador/aplicador do revisor por conta **e pessoa**. Reutilizar os direitos explícitos existentes de liquidação/reversão exclusivamente nas identidades QA necessárias, enumerados na preparação da fixture, sem conceder novos acessos empresariais ou direitos públicos. Consulta não herda comandos; contexto financeiro não concede contabilidade. + +## Critério de conclusão e exclusões + +Entregar código, interfaces, dois adaptadores, guião único, relatório de pendências, testes afectados e prova end-to-end do reconhecimento60 → afectação20/saldo40 → contabilização → reversão/saldo60 → correcção técnica com originais → fecho. Incluir tenant/empresa/unidade indevidos, revogações, auto-revisão, versões alteradas, concorrência, repetição com mesma/outra chave, falhas em cada fronteira atómica e recuperação sem duplicação; fontes e montantes exactos devem reconciliar. Ensaios anteriores válidos reutilizados, sem repetir suites alheias. + +Contas/períodos/regras artificiais; bases/roles novas no cluster55439; sem tocar seis associações pendentes, cache bloqueada, demos existentes ou trabalho alheio. Sem emissão/fiscalidade real, novas contas/concessões/dados reais, operações monetárias, reconciliação bancária, valorização/efeitos de stock/orçamento, reabertura de período, migração no destino, activação de Compras, publicação, aceitação/checkpoint presumidos. Revisão visual e capacidade de implantação continuam separadas. + +**Decisão pedida:** autorizar este ciclo sintético agrupado e os direitos exclusivamente QA acima. A autorização abrange a implementação e as provas deste recorte, não a sua aceitação posterior ou utilização real. diff --git a/docs/GENERAL_LEDGER_COMPOSITION_DELIVERY.md b/docs/GENERAL_LEDGER_COMPOSITION_DELIVERY.md new file mode 100644 index 0000000..5be1c56 --- /dev/null +++ b/docs/GENERAL_LEDGER_COMPOSITION_DELIVERY.md @@ -0,0 +1,48 @@ +# Composição financeira integrada — entrega local de 03/11/2026 + +Vendas/recebíveis, obrigação a fornecedor e correcção de custo directo passam a funcionar na mesma empresa/unidade, livro e período QA. Reutilizam exclusivamente os efeitos e workflows já autorizados. Não se criou outro motor nem um novo tipo de efeito financeiro. + +Demonstração inicial preservada: **http://127.0.0.1:8057/qa/cost-demo**. O guia permite entrar como preparador, validador ou leitor e abrir o painel `/general-ledger/workspace`. Cada origem tem ligação ao seu percurso efectivo. A base/role são próprias no cluster isolado55439; a aplicação de destino e as demonstrações anteriores não foram migradas. + +## Resultado funcional + +| Origem | Percurso efectivo | Resultado final da regressão | +|---|---|---| +| Comercial/recebíveis | Factura de teste862,07+137,93=1000; abertura documental revista; recebimentos confirmados/afectados400 e600; reversão400; reconhecimento/afectações/reversão no mesmo writer | 4 lançamentos,9 linhas; bruto2400 por lado; saldo financeiro/conta cliente400 | +| Oficina/custo directo | Original100+175=275 validado e lançado; taxa material sucessora60 e cálculo120+175=295 validados; estorno275/substituição295 indivisíveis | 3 lançamentos,6 linhas; bruto845 por lado; saldo custo295 | +| Fornecedor | Recibo sintético controlado já reconhecido pelo núcleo Payables; reconhecimento contabilístico60, revisto distintamente | 1 lançamento,2 linhas; bruto60 por lado; obrigação financeira permanece60 | +| Conjunto | Uma conferência, revisão distinta e fecho QA no mesmo período | **8 lançamentos,17 linhas,3305MZN de débitos e créditos** | + +Os IDs numéricos coincidem entre factura, ordem e obrigação; os filtros tipados continuam a separar os três domínios. A contabilização não desconta novamente os saldos financeiros. Factura/PDF, apontamentos, decisões de custo, original275, outbox e direitos mantêm-se imutáveis durante o percurso contabilístico. + +## Painel e integração + +`LedgerComposition` oferece cartões de origens e diário conjunto em transacção `REPEATABLE READ READ ONLY`, sem bloqueios de escrita. Cada painel, diário e lista de conferências tem página própria de25 registos. A navegação conserva os restantes filtros/páginas. As dependências e metadados são consultados em conjuntos delimitados pelos IDs da página; não se executa uma conferência completa por cartão nem se carrega o catálogo inteiro de contas. + +Os cartões mostram decisões e lançamentos **registados**, sem os apresentar como nova validação de dependências. O principal de fornecedor está identificado como principal, não saldo. A conferência actual e a prévia do impacto continuam nos percursos das origens e nos comandos existentes. Fonte indisponível devolve503; acesso de origem ausente oculta o painel, sem linhas ou contagens. A consulta histórica do livro mantém o direito contabilístico próprio. Acções de período são ocultadas quando falta consulta a uma das origens. + +O fecho não depende dos cartões ou da página visível: o serviço existente volta a conferir todas as fontes compostas. Recusa com perda de direito ou alteração de versão, incluindo sucessora295→295 com novas taxas/cálculo. Depois de remover a alteração de ensaio, a mesma operação termina uma única vez; repetições com mesma/outra chave não duplicam o fecho. + +O instalador `SalesSchema` para **livros novos vazios** restringe três linhas ao tipo `sales.invoice`; os restantes efeitos conservam duas. A prova SQL adversarial cria, apenas dentro de rollback, uma proposta/revisão/cabeçalho coerentes de custo com crédito repartido em duas linhas: a soma é correcta, mas `gl_assert_balanced` recusa a terceira linha. Não se actualizaram os schemas das demos antigas. O escritor PHP e os efeitos aceites permanecem os mesmos. + +## Provas dirigidas + +Manifesto verificável: [common-ledger-composition-20261103.json](proofs/common-ledger-composition-20261103.json). + +- `2d5c71abf625`:7 casos/37 verificações, todos em rollback: painéis, direitos revogados, contextos elegíveis de unidade/empresa/tenant diferentes,26 perímetros SQL explicitamente artificiais para páginas25+1, falha de fonte, guarda e cardinalidade SQL. Páginas com25 e1 registos usam igual número de consultas. As linhas sem cálculo permanecem pendentes, sem zero/aprovação fabricados. +- Mesma base de regressão, depois das provas de rollback:31 verificações do percurso efectivo completo, revalidação dos três domínios no fecho, mesma quantia com versão diferente, repetição/recuperação e reconciliação final. +- HTTP real em regressão aberta:36 verificações; regressão fechada independente `01aab3ebad2d`:35. Autenticação, CSRF, contexto/módulo, parâmetros, paginação, links, ausência de formas de decisão para leitor/período fechado e transacção de leitura sem bloqueios. +- Demo nova `fe42e1169ce6`:34 verificações de três perfis, links efectivos, entradas/contextos e quatro verificações do JavaScript renderizado em Node VM. Sem comandos de negócio. Impressão digital antes/depois dos dados/origens/outbox/direitos/livro confirma preservação. +- Total173 verificações dirigidas, incluindo os quatro ensaios de formulário simulados. Node VM e HTTP **não constituem revisão visual**. Sintaxe e `git diff --check` nos dois repositórios. Provas válidas de concorrência/falhas dos escritores, fornecedores nativos e pacotes congelados reutilizadas por hash; não repetidas. + +Na demo8057 só o original275 está lançado. Factura1000 e obrigação fornecedor60 existem, mas abertura de recebíveis, lançamentos adicionais, par correctivo e fecho continuam por decisões individuais. As regressões completas usam bases diferentes. Não há reset automático. + +## Limites e preservação + +São quatro módulos compostos neste percurso: Comercial, Financeiro, Oficina e Contabilidade. Compras e Stock não foram activados. O recibo de fornecedor é uma origem controlada de ensaio, não ligação histórica SGF nem importação real. Orçamento/CIF industrial, stock valorizado, salários e cadeias adicionais de correcção não se tornam contabilizados por esta composição. + +As primeiras três tentativas de instalação depois da restrição de cardinalidade falharam por sintaxe SQL e permaneceram diagnósticas; não são provas válidas nem foram reutilizadas/resetadas. A tentativa seguinte `b8be625f9a43` completou o percurso, mas um pós-teste usava nome de filtro incorrecto; a sua saída parcial não é contada como sucesso. As provas finais acima foram executadas em fixtures novas, com publicação do comprovativo só depois das verificações finais. Logs privados conservados, sem credenciais versionadas. + +Seis associações protegidas, cache bloqueada, demonstrações anteriores e trabalho alheio preservados. Sem concessões reais/públicas, migração no destino, activação de Compras, publicação, aceitação ou checkpoint presumidos. Revisão visual, carga sustentada da composição e capacidade de implantação permanecem pendentes independentes. Os resultados pequenos de integração não demonstram capacidade operacional. + +Continuação posterior expressamente autorizada e [entregue em bases novas: lote industrial/CIF1800](GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md). A presente entrega e a demo8057 conservam o seu âmbito de três famílias de origem; a8058 acrescenta a ligação industrial. O manifesto anterior conserva o estado histórico à data da sua emissão. diff --git a/docs/GENERAL_LEDGER_DELIVERY.md b/docs/GENERAL_LEDGER_DELIVERY.md new file mode 100644 index 0000000..97bcb0b --- /dev/null +++ b/docs/GENERAL_LEDGER_DELIVERY.md @@ -0,0 +1,61 @@ +# Obrigação reconhecida → primeiro lançamento contabilístico sintético + +02/11/2026 — `COMMON-LEDGER-PAYABLE-SIM-v1`. **Código funcional, interface, integração e provas locais entregues** no recorte expressamente autorizado pelo utilizador: «Autorizar o incremento sintético proposto». [Âmbito autorizado](GENERAL_LEDGER_FIRST_SYNTHETIC_SCOPE.md). A autorização permite este desenvolvimento/fixture; não presume aceitação funcional ou checkpoint. + +## Percurso implementado + +O núcleo único `packages/general-ledger` recebe do adaptador SGF a obrigação já reconhecida pelo Payables, conferida de novo pela identidade factual, reconhecimento/revisão e âmbito exactos. Não recebe um saldo de relatório ou um estado de factura como autorização de lançamento. O principal vem da origem: **60,00 MZN**, imposto documental 0, vencimento desconhecido. O cenário inicial não tem pagamentos. Não se atribuiu uma regra contabilística real à Tempo nem se modificou a obrigação financeira. + +Uma regra e período de ensaio explícitos capturam **D 60,00 em `QA-CONTRAPARTIDA` / C 60,00 em `QA-FORNECEDOR`**, em 29/10/2026 no período artificial `QA-2026-10`. As duas contas são de movimento, artificiais e em MZN. Não representam contas PGC aprovadas, inventário/despesa/IVA inferidos, uma regra fiscal ou saldo por liquidar. + +1. Preparador propõe obrigação/data/regra/período e fundamento. Fica guardada uma versão imutável da fonte, configuração, linhas e impacto; ainda não há lançamento. +2. Outra identidade **e pessoa** aprova ou recusa a revisão exacta, com fundamento. A aprovação financeira da obrigação não substitui esta conferência contabilística. Recusa e versões anteriores permanecem preservadas. +3. O preparador autorizado aplica apenas a versão revista. A aplicação volta a verificar direitos, pessoa, contexto, fonte, regra/período/versões, moeda e equilíbrio. Mudança exige nova conferência. Cabeçalho, linhas, auditoria e recibo de repetição ficam na mesma transacção. +4. O lançamento liga à obrigação, proposta, revisão, regra e período aplicados. A interface conserva a fotografia mesmo quando a proposta fica noutra página, apresenta o comprovativo e deixa de oferecer uma segunda aplicação. Para abrir a posição financeira actual, muda-se explicitamente para Compras; não se contorna a separação modular. + +Unicidade pela identidade factual do efeito e âmbito, independente da chave de pedido ou revisão. Duas aplicações concorrentes ou outra chave para a mesma aplicação recuperam **o mesmo lançamento**. Conteúdo incompatível recusa 409. Um recibo já gravado continua recuperável depois de o período fechar em dados adversariais de ensaio, sempre com a autorização actual, sem nova gravação. Não existe interface de fecho/reabertura ou de edição de lançamentos. + +## Base, direitos e navegação + +Configuração `general_ledger.synthetic_enabled=false` por defeito, sem activação por variável de ambiente. A guarda exige `payable-testing`, base/role QA próprias, loopback, cluster de regressão 55439 e role sem poderes administrativos. Nenhuma migração ou concessão foi aplicada no destino. Esquema instalado explicitamente numa **base nova**, separada dos livros/demos anteriores; não há criação/reparação por acesso à página. + +Quatro direitos autorizados, apenas nas fixtures: `general_ledger.view/prepare/validate/post`. São **seis concessões por fixture**: preparador view/prepare/post, validador view/validate, consulta view. Reutilizam-se contexto, membros, permissões e identidade de pessoa existentes; não há herança de Administração, Financeiro ou nomes. Consumir a fonte exige também os acessos de leitura financeira explícitos já presentes nessas identidades QA. Não foi alargado o catálogo público de concessões reais. + +As novas rotas pertencem a **Contabilidade**, mantendo os seis módulos e Início/Opções gerais: `/general-ledger`, `GET /api/general-ledger`, `POST /api/general-ledger/prepare|validate|post`. O menu mostra a ligação de ensaio só com `general_ledger.view` na unidade. Módulo errado ou geração antiga de contexto recusa 409. O pacote instalado de Compras não foi substituído/activado; o adaptador nativo permanece por construir no seu âmbito próprio. + +Consulta por período/conta, diário e histórico em janelas de 25. Totais incluem todas as linhas do filtro, não apenas a página. Período ou conta indisponíveis são recusados em vez de aparentarem saldo zero por falta de configuração. Leitura HTTP usa fotografia `REPEATABLE READ READ ONLY`, sem bloqueios de escrita. Não se adicionaram dependências. + +## Integridade e provas + +Nove tabelas próprias, todas append-only. Chaves estrangeiras compostas protegem o âmbito de contas/linhas/revisões. Checks impedem montantes negativos, cabeçalho desequilibrado e terceira linha. A validação imediata do núcleo e um constraint trigger diferido conferem duas linhas, contas de movimento, moeda, fonte/fotografia exactas, revisão aprovada e independente e preparador/aplicador. O papel QA é proprietário da base nova; isto não valida endurecimento de papéis/schema para implantação real. + +- **Oito cenários, 74 asserções**, seleccionando a execução final válida: circuito completo, impacto antes da aplicação, conciliação de período/contas, independência por utilizador/pessoa, recusa, preparador de outra identidade, direitos revogados, pessoa trocada, versões de fonte/regra/período/captura/revisão, moeda, conta agregadora, âmbito estrangeiro e campos injectados. +- Repetição pela mesma/outra chave; recibo após período alterado; falhas injectadas depois do cabeçalho, linhas, evento e recibo. Rollback integral e recuperação sem duplicação em cada ponto. Nenhum controlo de falha é exposto pela API/configuração. +- Base recusou escrita directa de cabeçalho desigual, principal incompatível, linha em falta, conta estrangeira, terceira linha e alteração de qualquer tabela do histórico. PostgreSQL usa savepoints nos casos esperados; uma transacção abortada não foi contada como recusa funcional. +- **Concorrência real em dois processos:** ambos aguardaram a empresa, com cadeia confirmada por `pg_blocking_pids`/`pg_stat_activity` em `companies FOR UPDATE`. Após libertação, ambos devolveram o mesmo ID. Resultado persistido na base QA: **um lançamento, duas linhas, um evento de aplicação**. Repetição posterior recuperou o recibo sem novo efeito. +- **23 verificações HTTP reais:** autenticação, consulta/totalização, duas contas, três rotas de comando recuperando os recibos originais de preparação/revisão/aplicação, outra chave para o mesmo efeito, conflito de conteúdo, permissões, conta/período indisponíveis, 422/403/409, CSRF 419, módulo errado e `no-store`. O circuito de criação/revisão/aplicação foi exercitado pelos serviços e processos reais; no HTTP verificaram-se recuperação/delegação e recusas, sem alegar criação de outro lançamento para repetir a prova. +- Três verificações estáticas dirigidas de permissão/renderização do menu, build de produção **privado** e renderização final Blade. Assets/manifesto QA foram servidos pelo router loopback de prova. Não se substituiu o manifesto público das demos. + +O teste geral de navegação não terminou e foi interrompido. **Não é uma prova aprovada.** Não se alterou o trabalho alheio para o fazer passar, não se limpou cache e não se repetiu uma via de navegador. A ligação nova foi validada pelos testes dirigidos, build e recusas HTTP; revisão visual/interacção no navegador permanece pendente. + +[Manifesto, resultados e hashes](proofs/common-ledger-payable-20261102.json). O texto exacto da proposta autorizada é recuperado e arquivado por SHA-256; a nota de autorização posterior não altera o recorte. As provas financeiras anteriores são conferidas por hash, sem reexecutar as suites alheias. + +O primeiro diagnóstico de preparação identificou um erro no fingerprint do harness (`company_memberships` tem chave composta, não coluna `id`). A fixture foi conferida e recuperada sem repetir schema/concessões/reconhecimento; essa base ficou como diagnóstico. A prova final usa outra base nova com todos os constraints finais. Uma asserção de soma SQL foi ajustada para comparar o valor inteiro devolvido como `numeric`, sem mudar os montantes. Execuções diagnósticas não contam como aprovadas; não houve reset/remoção dos seus dados. + +## Preservação e reprodução + +**Demonstração própria para a equipa:** [http://127.0.0.1:8048/qa/ledger-demo](http://127.0.0.1:8048/qa/ledger-demo), apenas em loopback. Outra base/role QA, sem usar a base das provas. Tem uma obrigação reconhecida de 60 MZN e, no momento da entrega, **zero propostas e lançamentos**. Escolher Preparar/aplicar, Revisão ou Consulta na página; obrigação #1, data 29/10/2026, período/regra de ensaio já apresentados. A equipa pode executar o circuito e registar feedback; não foi atribuída aceitação ou revisão visual. + +São 13 verificações adicionais de preparação do demo, sem operações de negócio: três identidades, interfaces e consulta da fixture ainda vazia. Cookie de sessão específico e nenhum `XSRF-TOKEN` global substituído; um complemento confirmou CSRF 419 e recusa de escrita 403 com token válido. A validação CSRF permanece activa e as formas usam o header explícito. Assim, autenticação/cookies das demos anteriores não são substituídos. Build copiado apenas entre as duas pastas privadas de assets; manifesto público original preservado. + +`scripts/ledger-demo.mjs ` inicia apenas um servidor próprio numa porta loopback livre ou reconhece o existente, sem repetir a preparação. Estado/PID e logs ficam na pasta privada. Não reiniciar/apagar dados para repetir a demonstração; a base da regressão conserva separadamente o único lançamento comprovado. + +Fingerprint de origens/obrigações/decisões/recibos financeiros, concessões e membros igual ao baseline da fixture, antes/depois de todos os ensaios. O Payables continua a ter uma obrigação de 60 MZN; o diário é outro efeito, não uma segunda dívida. Stock/orçamento **não têm tabelas nesta composição mínima**, pelo que não se inventou uma prova de exercício desses motores. O núcleo não chama os seus escritores. Dados/roles/demos anteriores não foram escritos; os seis registos protegidos e a cache bloqueada não foram objecto de decisão/limpeza. + +Preparação: Node fixado, `scripts/ledger-run.mjs` cria a nova base/role e configura apenas as identidades QA. Fases nomeadas recusam repetir provas concluídas. `scripts/ledger-ui-check.mjs ` compila/renderiza apenas em storage privado; `scripts/ledger-http.mjs ` cria e encerra só o seu servidor de prova loopback 8047. O demo 8048 é um processo/base distintos, conservados para a equipa. `scripts/summarize-ledger.mjs ` consolida sem voltar a executar testes. Settings, passwords, cookies, UUIDs de repetição e logs ficam privados. Não se criou checkpoint. + +## Limites mantidos + +Primeiro efeito de reconhecimento apenas, sem importação/lançamento histórico automático, IVA/contas reais, classificação de compras, pagamentos/recebimentos contabilizados, integração nativa SGC, valorização de stock, correcção/estorno, fecho/reabertura, reconciliação ou contabilidade geral completa. O período fechado foi só uma mutação adversarial de fixture, revertida, não uma funcionalidade operacional. + +Configuração/fonte futura deve seguir a mesma ordem de bloqueio da empresa; não há API de escrita de configuração neste incremento. Não foram medidos volumes sustentados ou implantação; o relatório financeiro anterior conserva a limitação de 12,6 s para 10.000 posições. Sem publicação, activação de Compras ou concessões reais. Revisão visual, aceitação e capacidade de implantação continuam separadas. diff --git a/docs/GENERAL_LEDGER_DIRECT_COST_CORRECTION_DELIVERY.md b/docs/GENERAL_LEDGER_DIRECT_COST_CORRECTION_DELIVERY.md new file mode 100644 index 0000000..d2ce796 --- /dev/null +++ b/docs/GENERAL_LEDGER_DIRECT_COST_CORRECTION_DELIVERY.md @@ -0,0 +1,70 @@ +# Correcção de custo directo275→295 — entrega sintética + +03/11/2026. `COMMON-LEDGER-DIRECT-COST-CORRECTION-SIM-v1` implementado após «Autorizar a correcção sintética proposta», conforme o [recorte apresentado](GENERAL_LEDGER_DIRECT_COST_CORRECTION_SCOPE.md). Inclui código funcional, interface, testes e demonstração própria. Não equivale a aceitação, checkpoint, uso real ou conclusão operacional de toda a aplicação. + +## Resultado + +O cenário novo executa os workflows existentes: oficina/origens verificadas, taxas e composição100+175=275, revisão distinta e lançamento original275. Depois prepara/aprova taxa material sucessora60MZN/UN e cálculo **120+175=295**, preservando as versões anteriores. Não fabrica a decisão de custo por SQL. + +O núcleo contabilístico comum captura, revê e aplica **um par indivisível**: + +| Parte | Débito | Crédito | +|---|---|---| +| Estorno do original | QA-COMPENSACAO-ENSAIO275 | QA-CUSTO-DIRECTO275 | +| Substituição actual | QA-CUSTO-DIRECTO295 | QA-COMPENSACAO-ENSAIO295 | + +O original permanece. O resultado comprovado é **três lançamentos/seis linhas**, movimentos brutos **845MZN por lado** e saldo do custo **295MZN**, diferença20. Balancete e razão reconciliam este mesmo livro e ligam à ordem/conferência. A validação do custo ou a outbox não desencadeiam contabilização automática. + +## Núcleo, SQL e actualidade + +Reutiliza `correct-prepare/validate/post`, tabelas de grupos/resultados, writer, recibos e histórico existentes. Os tipos `workshop.direct_cost.reversal/replacement` são distintos de `journal.reversal/replacement` dos fornecedores. Os filtros continuam tipados por `cost_order_id` ou obrigação de fornecedor; IDs inteiros coincidentes não juntam os domínios. + +`CostCorrectionSchema` só instala em **livro SGF QA novo e vazio** com a composição de custos presente. Acrescenta marcador de capacidade e constraints diferidas para o par de custos. Confere original, âmbito, grupo, propostas, tipos de origem, período, datas, contas, ligação à mesma ordem/perímetro, revisão de substituição e reversão integral das linhas originais. O estorno deve igualar275 do original; a substituição deve corresponder ao295 capturado/revisto. Não exige igualdade entre os montantes das duas partes. A função antiga de integridade mantém a sua validação de fornecedores e delega apenas resultados explicitamente de custos à nova verificação. Demos/schemas anteriores não são actualizados. + +A aplicação pública recusa revisão ou lançamento individual das partes. A base também recusa uma reversão isolada mesmo que equilibrada e com fotografia revista. Fonte/regra/período/âmbito/pessoa/direitos são revalidados sob o bloqueio de empresa antes de aplicar; recibo, dois lançamentos, linhas, histórico e resultado são uma transacção única. Uma falha depois da primeira parte ou depois do resultado desfaz a tentativa inteira. + +A identidade do grupo liga ao lançamento original, com unicidade e repetição independente da chave. Uma nova versão de taxa/cálculo muda a fotografia mesmo quando o valor continua295: exige nova captura e conferência. Capturas anteriores ficam no histórico, assinaladas como superadas na interface. Uma correcção aplicada não pode ser repetida como outra correcção do mesmo original neste recorte. + +A conferência do período resolve o original pela **substituição efectivamente aplicada no grupo**, comparando a sua revisão de fonte com o cálculo actual. Não basta que os totais coincidam. Uma fonte alterada depois do par volta a bloquear o fecho e não cria uma cadeia automática de revalorizações. Correcção anterior à data do original, noutro período ou em período fechado é recusada; não há reabertura. + +## Interface e permissões + +O percurso mostra original275, actual295 e diferença20, depois as quatro linhas, fotografias, revisões e fundamentos do grupo. A decisão é conjunta e distinta do preparador. A aplicação conjunta só aparece após aprovação das duas partes. Diário e interface de custos ocultam as acções individuais das partes; o backend mantém a recusa mesmo com pedido manual. Grupos de outras fontes são filtrados no servidor antes da paginação/contagem. Reviews/resultados/actualidade dos grupos visíveis são lidos em conjunto, sem pesquisa individual de todo o histórico por grupo. + +Foram reutilizados os três direitos `general_ledger.correct_prepare/correct_validate/correct_post`, apenas nas fixtures novas: preparador prepara/aplica; validador revê. Com os anteriores são **dez direitos contabilísticos distintos / doze concessões contabilísticas por fixture padrão**. Não há direitos públicos/reais novos ou supervisão técnica implícita. A fixture de coexistência acrescenta apenas os direitos QA de fornecedor já existentes para o seu teste. + +`SGF_COST_CORRECTION_QA` fica **false sem configuração**. Requer a opção sintética de custos já protegida, `testing`/`browser-testing`, destino efectivo exacto55439/cluster/base/role próprios e marcador de schema. O flag nas settings da nova fixture não altera configurações do destino. A demonstração8054 mantém flag false, schema ausente e os nove grants contabilísticos originais; a tentativa de usar a nova origem nesse modo é recusada. O SGC autónomo continua sem exigir oficina, provado também pela regressão do seu ciclo de fornecedores. Os artefactos financeiros congelados de25 e30 ficheiros não foram substituídos. + +## Provas + +[Manifesto e hashes](proofs/common-ledger-direct-cost-correction-20261103.json). Bases exclusivas para regressão, concorrência, coexistência e demonstração; nenhuma prova destrutiva usa a base da equipa. + +| Evidência | Resultado | +|---|---| +| Workflow efectivo |275 original e295 sucessor pelos workflows; um par aplicado, relatórios845/295 e fecho QA revisto; originais/fontes/outbox/direitos exactos | +| Serviço e integridade SQL |7 cenários /30 verificações: impactos assimétricos, recusa de partes isoladas, seis fronteiras de falha, SQL contra órfão, versões, pessoa/direitos, período fechado e ausência de cadeia implícita | +| Segurança de contexto |8 verificações: tenant/empresa/unidade estrangeiros mas elegíveis e quatro direitos correntes revogados; probes com rollback | +| Pós-verificação das interfaces |Captura superada continua visível no histórico; páginas de custo, diário genérico e ciclo legado ocultam aplicação isolada, mesmo para partes antigas revistas mas não aplicadas; só leitura | +| HTTP real |58 verificações: CSRF419, contexto antigo/errado, recusas403/409/422, quatro linhas, revisão/aplicação conjunta, proibição de partes, repetição e relatórios/fecho | +| Concorrência |6 processos reais: leitor antes da libertação, grupo desactualizado409 após commit de versão, um par e um fecho após nova conferência | +| Coexistência com fornecedor |Dois domínios de correcção no mesmo schema/livro; seis lançamentos/doze linhas, bruto1025 por lado, grupos/filtros separados e fecho conjunto | +| SGC autónomo |23 verificações actuais do ciclo original de fornecedor, com rollback, no núcleo generalizado | +| Modo275 anterior |Fonte actual exactamente igual à fotografia lançada; pacote do único adaptador de período preservado; flag/schema novos ausentes, nove grants e recusa403 | +| Demonstração nova e formulários |23 verificações, incluindo5 em VM do JavaScript renderizado; sem comandos de negócio, um original275 e nenhum grupo/fecho inicial | +| Demonstração8054 |Fingerprint exacto de fontes/outbox/direitos, flag desligado e schema novo ausente; só leitura | + +As seis falhas injectadas foram `after_header`, `after_lines`, `after_event`, `after_correction_first`, `after_correction_result` e `after_receipt`. A tentativa de finalizar uma parte pelo writer interno, em probe adversarial, foi recusada pela constraint diferida `GL_COST_CORRECTION_PAIR_REQUIRED`; o rollback restaurou o livro. A aplicação recuperada criou só um resultado completo. + +Na concorrência, o titular reteve o bloqueio de empresa e confirmou taxa/cálculo de versão3, **mantendo295**. O leitor terminou antes da libertação vendo apenas o original275 e nenhuma correcção aplicada. O aplicador que aguardava recusou409 após o commit. Nova captura/revisão gerou outro grupo imutável; dois aplicadores recuperaram o mesmo resultado e dois fechos a mesma versão2. São **dois grupos preparados e um aplicado**, não duplicação de aplicação. Foram observadas cadeias até ao titular e esperas `transactionid`/`tuple`. Original275, cálculos1/2 e registos anteriores da outbox permaneceram iguais; os novos registos de versão3 são os sucessores explícitos do ensaio, todos ainda `captured_no_accounting`. + +Na coexistência, ordem de custo e obrigação de fornecedor partilharam o mesmo ID inteiro. O custo conserva três lançamentos/nove eventos e bruto845; o fornecedor, após a sua correcção técnica já autorizada60/60, conserva três lançamentos/nove eventos e bruto180. O foco da ordem devolve apenas um grupo de custos. Custo actual295, outbox e saldo financeiro de fornecedor60 ficaram intactos. A origem do fornecedor é recepção sintética controlada, **não importação viva SGF**. Esta prova também exercita a validação SQL antiga e a nova no mesmo livro. + +Provas válidas anteriores são reutilizadas e conferidas por hash. Não foram repetidas suites de stock, fiscalidade ou demais módulos. Sintaxe PHP/JavaScript e `git diff --check` dos dois repositórios constam do manifesto. SGF não tem PHPStan/Pint instalados; código nativo de aplicação não mudou e a qualidade estática anterior não foi repetida. Não se acrescentaram dependências. Os formulários foram exercitados em VM/DOM/rede simulados e por HTTP; isso não constitui execução num navegador nem revisão visual. + +## Demonstração e limites + +**http://127.0.0.1:8055/qa/cost-demo**. Base/sessão/cookie/assets próprios, só loopback. Começa com original275 realmente lançado e custo sucessor295 validado, **sem grupo de correcção ou fecho inicial**. Preparar o par, rever noutra função, aplicar e consultar diário/balancete/razão; depois conferir e fechar QA. Não reiniciar o exemplo da equipa nem as demonstrações anteriores. + +Mantêm-se pendentes e separados: revisão visual, carga sustentada e capacidade de implantação; contas/políticas reais e composição operacional integral dos seis módulos. Não houve novos ensaios de1.000/5.000/10.000, índices ou declaração de capacidade a partir destes casos. + +Sem cadeias adicionais de revalorização por arrasto, correcção em período fechado/reabertura, stock valorizado/contabilizado, salários/CIF, operações fiscais/monetárias reais, concessões/migrações no destino, activação de Compras, publicação, push, aceitação ou checkpoint. Os seis registos, cache bloqueada, dados/acessos reais, checkpoints, provas e trabalho alheio foram preservados. diff --git a/docs/GENERAL_LEDGER_DIRECT_COST_CORRECTION_SCOPE.md b/docs/GENERAL_LEDGER_DIRECT_COST_CORRECTION_SCOPE.md new file mode 100644 index 0000000..de75ffa --- /dev/null +++ b/docs/GENERAL_LEDGER_DIRECT_COST_CORRECTION_SCOPE.md @@ -0,0 +1,19 @@ +# Próxima ligação — correcção explícita de custo directo já lançado + +03/11/2026. **Autorização expressa recebida: «Autorizar a correcção sintética proposta». Implementação/provas concluídas; ver [entrega e limites](GENERAL_LEDGER_DIRECT_COST_CORRECTION_DELIVERY.md).** O texto seguinte conserva o recorte apresentado. A decisão pedida no final é histórica; não constitui aceitação, reabertura ou autorização operacional. + +## Recorte proposto + +1. Novas bases/roles QA55439 de regressão e demonstração; preservar8054 e todas as instalações anteriores. Executar os workflows efectivos de oficina/custos e o writer aprovado para o original275. Depois criar/validar explicitamente taxa material sucessora60MZN/UN, mantendo2UN e trabalho175: novo cálculo seleccionado **295MZN**. Nenhuma taxa, origem ou decisão anterior é editada; a alteração de20 é hipótese sintética, sem política real. +2. Uma correcção técnica explícita do lançamento original, capturada e revista por outra identidade/pessoa, usando o núcleo comum e uma transacção única: **estorno D QA-COMPENSACAO-ENSAIO275 / C QA-CUSTO-DIRECTO275**, e **substituição D QA-CUSTO-DIRECTO295 / C QA-COMPENSACAO-ENSAIO295**. Um grupo indivisível, sem expor aplicação individual das partes. Não é outra dívida, consumo, salário ou reconhecimento independente da mesma ordem. +3. Preservar lançamento original, duas composições/decisões/taxas e fotografias. Identidade do grupo por original, unicidade e idempotência com mesma/outra chave; uma correcção por original neste recorte. Mudança de fonte/regra/período/pessoa/âmbito antes de aplicar exige nova conferência; uma sucessora adicional não altera silenciosamente o grupo revisto. Sem cadeias adicionais de revalorização por arrasto. +4. Tipos de origem de correcção de custo distintos dos de fornecedores, mantendo `cost_order_id` e o vínculo ao grupo/original. IDs inteiros coincidentes entre ordens e obrigações não podem misturar filtros/eventos/totais. A conferência do período reconhece a resolução explícita original→par e compara a substituição com o cálculo actual295; fonte alterada sem correcção concluída continua a bloquear. +5. Mostrar antes da confirmação o original275, novo295, diferença20 e as quatro linhas do par. Depois ligar ordem/custos → decisões → grupo/original/estorno/substituição → diário/balancete/razão e fecho QA revisto. Resultado esperado: três lançamentos/seis linhas, montantes brutos845MZN por lado e saldo de custo295. A outbox técnica original não se torna executor contabilístico. +6. Reutilizar `general_ledger.correct_prepare/correct_validate/correct_post` já existentes, apenas nas fixtures novas (preparador prepara/aplica; validador revê), mais direitos actuais de consulta/custo/período. Sem direitos públicos/reais novos, supervisão técnica implícita ou alteração de contas reais. O SGC continua sem exigir oficina; preservar as correcções de fornecedor e as provas válidas. +7. Provar original/substituição exactos, isolamento, direitos/pessoas, revisões desactualizadas, falha entre as partes com rollback integral, recuperação/repetição e concorrência sem duplicar o grupo/fecho. Só testes afectados e bases próprias, sem consumir os dados da demonstração. Revisão visual, carga sustentada e capacidade de implantação permanecem separadas. + +## Exclusões preservadas + +Sem reabertura ou correcção em período fechado, valorizações/lançamentos de stock, salários/CIF/lote industrial, novos pagamentos/recebimentos, emissão/contas/políticas reais, concessão/migração no destino, activação de Compras, publicação, aceitação ou checkpoint. A nova demonstração pode começar com original275 e fonte sucessora295, preparados pelos workflows, para a equipa decidir a correcção; não reaplica operações de8054. + +**Decisão pedida:** autorizar este ciclo sintético agrupado de correcção275→295, com par imutável, direitos de correcção só QA e conferência/relatórios pelo mesmo núcleo. diff --git a/docs/GENERAL_LEDGER_DIRECT_COST_DELIVERY.md b/docs/GENERAL_LEDGER_DIRECT_COST_DELIVERY.md new file mode 100644 index 0000000..7878466 --- /dev/null +++ b/docs/GENERAL_LEDGER_DIRECT_COST_DELIVERY.md @@ -0,0 +1,76 @@ +# Oficina → custo directo validado → Contabilidade + +03/11/2026. `COMMON-LEDGER-DIRECT-COST-SIM-v1` implementado localmente após «Autorizar o ciclo sintético proposto», no [recorte aprovado](GENERAL_LEDGER_DIRECT_COST_SCOPE.md). Código, interface, provas e demonstração própria. Não declara aceitação, checkpoint ou conclusão operacional de toda a aplicação. + +## Percurso funcional + +As fixtures novas executam os workflows existentes de oficina, autorização, apontamento, verificação técnica, taxas e cálculo. Não inserem uma aprovação de custo por SQL. O caso seleccionado usa material da empresa **2UN×50=100 MZN** e trabalho efectivo **105MIN÷60×100=175 MZN**. A composição efectivamente validada é **275 MZN de custo directo conhecido do perímetro seleccionado**, sem afirmar custo completo, margem, valorização de inventário ou salário. + +`DirectCosts::conference` reutiliza a validação de actualidade e a composição exacta do serviço proprietário, numa leitura sem bloqueio de escrita. O adaptador `CostLedgerSource` exige consulta da oficina e dos custos; junta a ordem, cálculo/decisão, origens/decisões técnicas e taxas/decisões seleccionadas. Não chama o writer técnico/financeiro nem processa a outbox. + +O mesmo `PayableJournal` captura, revê e aplica duas linhas: **D `QA-CUSTO-DIRECTO`275 / C `QA-COMPENSACAO-ENSAIO`275**, MZN, regra/período QA explícitos. São contas artificiais para provar a ligação técnica, sem política real de capitalização/PGC. A aplicação não cria dívida, consumo, tempo, preço, movimento de stock ou folha salarial. O percurso comprovado termina com **um lançamento, duas linhas, balancete/razão reconciliados e um fecho QA revisto distintamente**. + +A interface liga perímetro, conferência actual, fontes e versões → impacto/proposta → revisão → aplicação → diário/balancete/razão → conferência e fecho do período. O razão e o diário voltam à ordem de custo, distinguindo-a de uma obrigação financeira. Listas e histórico têm janelas de25; uma selecção fora da primeira página continua acessível por ID autorizado. Não se muda o contexto automaticamente para validar ou lançar. As chaves dos formulários mantêm-se nas repetições idênticas e mudam com o conteúdo; IDs são números e hashes de versão permanecem cadeias exactas. + +## Actualidade, identidade e limitações deliberadas + +`gl_cost_sources` declara explicitamente a ordem, os dois identificadores lógicos de origem e o período composto. O instalador só aceita um livro SGF QA novo e vazio. O mapeamento é append-only e um trigger confere o âmbito contra a ordem. Não há associação automática de ordens antigas ou dos seis registos protegidos. + +A identidade do efeito usa **âmbito + tipo + ordem/perímetro**, não o ID da nova versão do cálculo. A nova versão muda a fotografia/revisão, mas não autoriza outro reconhecimento do mesmo custo. Fonte, direitos, pessoa, regra, contas, período, origens e versões são revalidados sob a serialização da empresa antes da primeira aplicação. A revisão contabilística exige outra identidade/pessoa; não concede verificação técnica. A confirmação de repetição revalida a autoridade antes de recuperar o resultado existente. + +Os **175 MZN conhecidos com taxa material ausente** continuam visíveis como incompletos e são recusados como total contabilizável. Uma composição efectiva de **100,0175 MZN** também é recusada: não há arredondamento inventado para cêntimos. Origem sucessora sem verificação não herda a anterior; torna o cálculo/fonte pendente. Aritmética monetária é exacta; apresentação usa divisão inteira e resto. + +O fecho inclui as fontes de custo explicitamente compostas no seu período. Custo incompleto, não lançado, alterado ou com lançamento desactualizado impede o fecho. Fotografias, versões, decisões e impactos entram no hash de conferência. Mudar o custo **depois** de o lançar não gera outro lançamento, estorno ou correcção automática: a correcção de custo já lançado está expressamente fora desta autorização. Não existe reabertura. + +Os adaptadores adicionais conservam a resposta/hash anterior quando existe apenas a fonte Sales: a nova composição de custos não envolve silenciosamente o pacote de conferência de vendas noutro hash. Os filtros de custo usam `cost_order_id`, separados de `sales_invoice_id` e do `obligation_id` de fornecedores. O SGC autónomo continua sem exigir oficina e recusa a origem de custo não composta. Os artefactos autónomos anteriores de25 e30 ficheiros não foram substituídos. + +Uma prova adicional compôs **custo275 + fornecedor60 no mesmo livro**, usando uma recepção sintética controlada de fornecedor do recorte já autorizado, sem importação viva. A ordem e a obrigação financeira tiveram o mesmo ID inteiro: os filtros conservaram um lançamento/três eventos de cada tipo, sem misturar os montantes. O resultado conjunto foi dois lançamentos/quatro linhas,335MZN por lado e um fecho QA. Custo/outbox ficaram iguais e a posição de fornecedor permaneceu60; não se criou pagamento ou stock. A guarda de obrigações admite também esta composição Cost-QA, com a mesma validação efectiva de base/role/cluster; direitos de consulta/decisão de fornecedor foram acrescentados apenas nessa fixture de integração. Isto não demonstra a composição completa de Compras ou todos os seis módulos. + +## Guardas e direitos + +`SGF_COST_LEDGER_QA` fica **false sem configuração**. A extensão da guarda aceita apenas `testing`/`browser-testing` com opção explícita, PG loopback55439, cluster esperado, base `payable_sgf_<12hex>` e role não elevada `payable_history_sgf_`, sem redireccionamento de ligação e com destino efectivo conferido. As regras anteriores de `sgf_tempo_test` ficam preservadas; não se utilizou essa base para estes testes. + +Só as bases novas recebem as funções SQL `sgf_wo_environment`/`sgf_dc_environment` vinculadas ao seu próprio nome/role/cluster. Os ficheiros SQL/migrações originais e os destinos existentes não foram alterados por esta instalação. O arranque não instala `CostSchema`, não migra nem concede acessos. + +| Perfil sintético | Direitos reutilizados | +|---|---| +| Preparação | workshop.view; direct_costs.view/prepare; general_ledger.view/prepare/post/period_prepare/period_close | +| Validação | workshop.view; direct_costs.view/validate; general_ledger.view/validate/period_validate | +| Consulta | workshop.view; direct_costs.view; general_ledger.view | +| Técnico / verificador | Direitos técnicos existentes, separados; sem Contabilidade implícita | + +São **sete direitos contabilísticos distintos / nove concessões contabilísticas**, apenas nas novas fixtures. Direitos de contexto empresa/unidade são explícitos. Cinco actores sintéticos declarados; o utilizador auxiliar do construtor fica sem grants. Não há nomes de pessoas reais no código funcional ou novos direitos públicos/reais. + +## Provas + +[Manifesto e hashes](proofs/common-ledger-direct-cost-20261103.json). Bases de prova e demonstração da equipa são distintas. + +| Prova | Resultado | +|---|---| +| Percurso efectivo completo |275 validado pelos workflows → um lançamento/duas linhas → relatórios → fecho QA; repetição com a mesma e outra chave sem duplicação | +| Regressão de custos |9 cenários /27 verificações, com rollback: parcial175, valor sem cêntimo exacto, versões/direitos/pessoa, quatro fronteiras de falha e identidade estável | +| HTTP real |51 verificações: CSRF419, recusas403/409/422, contextos, proposta/impacto, revisão, repetição, diário/razão e fecho | +| Isolamento e verificação técnica |10 verificações: contextos estrangeiros elegíveis de tenant/empresa/unidade, três direitos revogados e sucessor técnico efectivamente criado pelo workflow mas não verificado; tudo revertido | +| Concorrência |6 processos reais; detalhes abaixo | +| Compatibilidade de fornecedores |8 cenários /74 asserções do writer numa base nova; provas anteriores preservadas | +| Coexistência custo + fornecedor |IDs coincidentes, filtros/eventos separados,275+60=335MZN no mesmo writer e fecho conjunto; custo/outbox e saldo financeiro preservados | +| Compatibilidade Sales |Fonte actual comparada exactamente à fotografia comercial lançada; resultado/hash da conferência de período apenas com Sales igual ao anterior; balancete existente continua2400MZN por lado; só leitura | +| SGC autónomo |Recusa explícita do custo sem origem composta, sem schema de oficina exigido ou proposta criada | +| Demonstração e formulários |22 verificações HTTP/VM, incluindo4 dos formulários renderizados; zero comandos de negócio; prova privada de preservação da fixture | +| Pós-verificação de apresentação |Diário identifica ordem de custo, filtro retém1lançamento/3eventos, razão conserva origem e links; só leitura | + +Na concorrência, a transacção titular reteve o bloqueio da empresa e preparou/aprovou uma **taxa sucessora com o mesmo valor50**, mas versão2. Um leitor terminou antes da libertação, vendo o estado confirmado de275 e nenhum lançamento. O aplicador aguardou no bloqueio real; após o commit da nova versão respondeu **409**. O valor igual não dispensou nova conferência. O ensaio criou e validou cálculo2 e nova captura/revisão contabilística. Dois aplicadores concorrentes recuperaram **o mesmo lançamento**, e dois fechos concorrentes recuperaram **o mesmo fecho/versão2**. Foram observadas as cadeias de bloqueio até ao titular e esperas `transactionid`/`tuple`. Originais técnicos, cálculo1 e registos anteriores da outbox ficaram iguais; os novos registos de custo são os sucessores explícitos do ensaio, todos ainda `captured_no_accounting`. + +As quatro falhas injectadas (`after_header`, `after_lines`, `after_event`, `after_receipt`) desfizeram lançamento, linhas, histórico e recibo da tentativa; a repetição posterior concluiu sem duplicação. Os fingerprints antes/depois do percurso integral e HTTP conferem ordens, entradas/verificações, comandos de oficina, taxas/cálculos/decisões/comandos/eventos/outbox de custos, direitos e autoridade de obrigações. O mapeamento também tem prova específica de imutabilidade. + +Tentativas de preparação dos helpers que falharam antes de comandos de negócio — chave de ordenação da outbox e import de uma classe no harness — foram corrigidas e preservadas como diagnóstico, sem reset; não são contadas como provas aprovadas. O primeiro probe da demonstração omitiu a geração de contexto e recebeu409; o cliente de teste passou a enviar o token, sem alterar guardas da aplicação. Uma correcção posterior dos rótulos do diário teve pós-verificação só de leitura. + +Os formulários usam VM/DOM e rede simulados sobre o JavaScript efectivamente renderizado; isso não é execução num navegador. Sintaxe PHP/JavaScript e `git diff --check` constam do manifesto. Não se acrescentaram dependências. SGF não tem PHPStan/Pint instalados; não se declara execução dessas ferramentas. A análise estática nativa válida anterior é reutilizada no seu âmbito, sem repetir ficheiros nativos de aplicação que não mudaram. + +## Demonstração e pendências + +**http://127.0.0.1:8054/qa/cost-demo**, base/sessão/cookie/assets privados próprios, só loopback. Parte de oficina, taxas e custo275 realmente validados; **sem proposta contabilística, lançamento ou fecho iniciais**, para decisões individuais da equipa. Não reiniciar ou consumir este exemplo em testes destrutivos. Os perfis de Contabilidade consultam evidência técnica, sem adquirir poderes de técnico/verificador. + +Continuam separados: revisão visual, carga sustentada e capacidade de implantação; contas/políticas reais e composição operacional completa entre módulos. Não se mediram novos volumes1.000/5.000/10.000, criaram índices ou validou capacidade a partir deste cenário. As demonstrações existentes continuam independentes; esta entrega não prova uma única instalação operacional com todos os seis módulos. + +Sem valorização/lançamentos de stock, salários/CIF/lote industrial, preço de venda derivado do custo, operação fiscal/monetária real, correcção de custo já lançado, reabertura, migração/concessão no destino, activação de Compras, publicação, push, aceitação ou checkpoint. Seis registos, cache bloqueada, provas/checkpoints anteriores e trabalho alheio preservados. diff --git a/docs/GENERAL_LEDGER_DIRECT_COST_SCOPE.md b/docs/GENERAL_LEDGER_DIRECT_COST_SCOPE.md new file mode 100644 index 0000000..0d249e2 --- /dev/null +++ b/docs/GENERAL_LEDGER_DIRECT_COST_SCOPE.md @@ -0,0 +1,20 @@ +# Próxima ligação proposta — custo directo de oficina e diário QA + +03/11/2026. **Autorização expressa recebida: «Autorizar o ciclo sintético proposto». Implementação/provas concluídas no recorte sintético; ver [entrega e limites](GENERAL_LEDGER_DIRECT_COST_DELIVERY.md).** O texto seguinte conserva o recorte apresentado; a decisão pedida no final é histórica. Não equivale a aceitação ou autorização de correcção de custo já lançado. + +## Recorte a autorizar + +1. Nova composição de regressão e outra de demonstração SGF no cluster55439, com bases/roles não elevadas próprias e identidades sintéticas distintas. Não usar/resetar `sgf_tempo_test`, as demonstrações ou os seis registos. As guardas PHP/SQL de oficinas/custo serão estendidas só à nova fixture efectiva, sem retirar o bloqueio real ou alterar migrações no destino. +2. Reutilizar efectivamente os workflows de oficina, verificação e custo directo, sem fabricar uma aprovação por SQL: material da empresa2UN×50MZN/UN =100; trabalho105MIN÷60×100MZN/H =175; **275MZN de custo directo conhecido no perímetro seleccionado**. Taxas escolhidas e validadas por ID/versão; validação do cálculo por identidade distinta. Não é custo completo, margem, inventário valorizado ou salário real. +3. Capturar uma proposta contabilística do cálculo validado, com ordem, perímetro, origens técnicas, taxas, versões, decisão e hash. Um lançamento sintético de duas linhas no writer comum: **D `QA-CUSTO-DIRECTO`275 / C `QA-COMPENSACAO-ENSAIO`275**, MZN, período QA explícito. São contas artificiais de um ensaio de ligação técnica; não representam política real de capitalização, contrapartida de stock/folha salarial ou enquadramento PGC aprovado. Não duplicar dívida, consumo físico, tempo, preço comercial ou lançamento de factura de fornecedor. +4. Conferência contabilística distinta e fundamento antes de aplicar. Revalidar direitos, contexto, pessoa, fonte, origens/taxas, versão do cálculo/regra/período e impacto sob o mesmo bloqueio de empresa. Uma identidade de efeito estável por ordem/perímetro impede contabilizar novamente a mesma composição apenas porque foi criada outra versão de cálculo. Alteração antes de aplicar exige nova conferência; depois de aplicado não permite outro reconhecimento directo ou correcção silenciosa. Correcção/revalorização de custos já lançados permanece fora deste recorte. +5. Cálculo incompleto de175 conhecidos, taxa ausente, origem não verificada, total racional não representável em cêntimos ou versão desactualizada ficam visíveis e recusam o lançamento. Não arredondar, inventar taxa/total ou tratar pendência como zero. O fecho QA confere também esta origem explicitamente composta e recusa pendências/mudanças; sem reabrir período. +6. Ligar oficina/custo/decisões → proposta/impacto → diário → balancete/razão e fecho QA. Nenhuma contabilização por arrasto da validação de custo ou outbox: preparar, rever e aplicar são decisões explícitas. A outbox original mantém o seu estado histórico; não se transforma retroactivamente em executor. +7. Reutilizar direitos `workshop.view`, `direct_costs.view/prepare/validate` e `general_ledger.view/prepare/validate/post/period_*` existentes, distribuídos só em novas fixtures. Sem direitos públicos/reais novos, herança de administração, técnico/verificador real ou novas dependências. O SGC autónomo continua sem exigir oficina e recusa a origem não composta. +8. Provar o percurso275, recusas de175 incompletos/versões/âmbito/direitos, concorrência, falhas/repetição sem duplicação e preservação de origens. Executar apenas regressão afectada do writer/fecho/relatórios, reutilizando as provas válidas. Demonstrar na base própria da equipa sem consumir os seus exemplos nos testes. Revisão visual e capacidade de implantação continuam separadas. + +## Exclusões mantidas + +Sem valorização/lançamentos de stock, salários/folha salarial, CIF/lote industrial, produção, conta ou política fiscal real, novos pagamentos/recebimentos, emissão real, reabertura, correcção de custos lançados, migração/concessão no destino, activação de Compras, publicação, aceitação ou checkpoint. A autorização proposta só retira a exclusão de **desenvolver e provar este custo directo seleccionado275 no diário sintético**, mantendo as restantes fronteiras. + +**Decisão pedida:** autorizar este ciclo sintético agrupado, incluindo a nova origem de custo directo e os dois tipos de conta artificiais acima, com direitos só QA e o mesmo writer, sem utilização real. diff --git a/docs/GENERAL_LEDGER_FIRST_SYNTHETIC_SCOPE.md b/docs/GENERAL_LEDGER_FIRST_SYNTHETIC_SCOPE.md new file mode 100644 index 0000000..924d16d --- /dev/null +++ b/docs/GENERAL_LEDGER_FIRST_SYNTHETIC_SCOPE.md @@ -0,0 +1,43 @@ +# Primeiro lançamento sintético — proposta concreta para autorização + +**Autorização recebida em02/11/2026:** o utilizador respondeu «Autorizar o incremento sintético proposto». O recorte abaixo foi autorizado e implementado localmente; estado/provas em [GENERAL_LEDGER_DELIVERY.md](GENERAL_LEDGER_DELIVERY.md). A descrição de proposta/decisão pendente abaixo preserva a preparação histórica e não indica falta de autorização actual. Não constitui aceitação funcional, activação real ou autorização de checkpoint. + +`COMMON-LEDGER-PAYABLE-SIM-v1` — proposta de 02/11/2026. **Apenas especificação; motor, schema, direitos e lançamentos desta proposta não implementados ou concedidos.** A entrega funcional feita nesta passagem é o relatório financeiro, descrito em [SGF_PAYABLE_REPORT_DELIVERY.md](SGF_PAYABLE_REPORT_DELIVERY.md). + +## Limite que exige decisão + +O [AGENTS.md](../AGENTS.md) regista: «O recorte actual permanece só obrigação a fornecedor; sem pagamentos/cobranças/lançamentos por arrasto.» Regista também o desenvolvimento dos módulos em falta com identidades e bases sintéticas, sem confirmações técnicas de cada pequeno passo. Esta proposta agrupa **um incremento funcional contabilístico novo**, para autorização expressa antes de criar o primeiro motor/escritor e seus direitos. Não é um pedido para repetir aceitações ou aplicar acessos reais. + +A classificação existente do catálogo é de vendas, sem lançamentos. Não fornece automaticamente a contrapartida de uma factura de fornecedor. O relatório financeiro novo também não é uma origem contabilística nem uma autorização de reconhecimento: a origem proposta é o efeito imutável reconhecido no núcleo Payables, conferido novamente. + +## Recorte proposto para aprovar integralmente + +1. Um núcleo único em `packages/general-ledger`, primeiro adaptador SGF, desligado por defeito e limitado a uma base/role QA nova no cluster 55439. Composição autónoma nativa futura separada; não copiar um segundo motor, activar pacotes instalados ou exigir SGF remoto ao SGC. +2. Um efeito: **obrigação de fornecedor reconhecida → um lançamento sintético equilibrado**. Fonte por âmbito, identidade factual, ID do reconhecimento e revisão exacta, não por coincidência de IDs ou leitura do estado de uma factura. Não voltar a reconhecer o principal por chegada da factura ou posterior pagamento. +3. Cenário novo e explícito: principal 60,00 MZN, imposto documental 0, sem pagamentos nessa fixture inicial. Isto delimita o cenário e não cria uma pré-condição universal de dívida só ser reconhecida antes de pagamentos. Usa-se o principal reconhecido, nunca o saldo residual como principal do lançamento. +4. Regra imutável de ensaio `QA-PAYABLE-JOURNAL-v1`: **débito 60,00 em `QA-CONTRAPARTIDA` / crédito 60,00 em `QA-FORNECEDOR`**. Ambas contas de movimento artificiais. Não são contas PGC aprovadas, despesa/inventário/IVA inferidos, parametrização da Tempo ou classificação comercial reutilizada indevidamente. +5. Data explícita de lançamento 29/10/2026 e período artificial `QA-2026-10`, aberto de 01/10 a 31/10/2026. Data e período são hipóteses do ensaio, separados de vencimento, data de pagamento e enquadramento fiscal real. Sem fecho/reabertura operacional ou escolha automática da data do computador. +6. Preparador sintético propõe fonte, data, regra/versionamento e fundamento; validador sintético distinto revê a fotografia exacta; preparador aplica apenas a versão revista. Não há validação técnica/fiscal implícita, privilégio associado a nomes ou revisão pelo próprio autor. Mudança de fonte/regra/período desde a prévia exige nova conferência. +7. Aplicação numa transacção: revalidação de permissões/contexto, fonte/revisão, decisão independente, regra, período aberto/versionado, moeda e igualdade exacta de débitos/créditos; gravação de cabeçalho/linhas, recibo de repetição e auditoria append-only. Fundamento, autor/data e referências preservados. Montantes inteiros em unidades menores, sem arredondamento novo. +8. Unicidade por empresa/unidade, identidade factual do reconhecimento e tipo de efeito. Mudança de versão ou chave de pedido não autoriza segundo lançamento do mesmo efeito. Mesma chave/conteúdo recupera o recibo; conteúdo diferente recusa. A autorização actual é conferida antes de recuperar um resultado. Um lançamento já gravado permanece histórico mesmo se o período fechar depois; replay não cria nova gravação. +9. Consulta do lançamento e extracto/total apenas desse período/duas contas sintéticas, reconciliados com os próprios movimentos e a origem. Não declarar contabilidade geral, balancete legal, fiscalidade, reconhecimento de vendas, valorização de stock, pagamentos ou fecho completos. + +## Direitos apresentados antes de qualquer concessão + +Proposta de novos direitos **apenas para identidades da fixture QA**: `general_ledger.view`, `general_ledger.prepare`, `general_ledger.validate`, `general_ledger.post`. Não há herança de Administração, Compras, Financeiro, classificação ou nomes. + +| Função sintética | Direitos propostos | +|---|---| +| Preparador/aplicador | view, prepare, post | +| Validador distinto | view, validate | +| Consulta | view | + +Nenhuma concessão real, direito público ou competência para gerir estes direitos é incluída. A autorização do incremento autoriza construir e conceder estes direitos **na fixture isolada**, não na Tempo, nas demos existentes ou em dados comerciais. + +## Provas previstas e exclusões + +Testar fonte inexistente/incompatível, tenant/empresa/unidade indevidos, direitos revogados, actor/pessoa trocados, auto-revisão, regra/data/período/versão alterados, débitos/créditos incompatíveis, moeda, concorrência da mesma origem, repetição por mesma/outra chave, falha entre cabeçalho/linhas/recibo/auditoria e recuperação sem duplicação. Conferir montantes/origens/stock/orçamento/Payables antes/depois, fora dos novos registos de lançamento de ensaio. Não executar de novo suites válidas alheias. + +A proposta não autoriza correcção de lançamento já aplicado, estorno, reabertura de período, reconciliação bancária, efeito de pagamento/recebimento, contas/impostos reais, importação histórica automática, emissão, instalação de migração no destino, publicação, aceitação ou checkpoint. Eventual correcção exige circuito append-only próprio posterior; os originais não serão editados/apagados por um percurso provisório. + +Seis registos protegidos, cache bloqueada, demos, direitos/dados reais e trabalho em curso permanecem intactos. Revisão visual e capacidade de implantação continuam separadas. **Decisão pendente:** autorizar este recorte sintético, com estes quatro direitos exclusivamente QA, antes da implementação contabilística. diff --git a/docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md b/docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md new file mode 100644 index 0000000..5f0adb3 --- /dev/null +++ b/docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md @@ -0,0 +1,57 @@ +# Correcção industrial1800→1820 — entrega local sintética + +03/11/2026. `COMMON-LEDGER-INDUSTRIAL-CORRECTION-SIM-v1`. Autorização expressa: **«Autorizar a correcção industrial sintética proposta»**. Implementado e testado o recorte aprovado, com o mesmo escritor contabilístico. Proposta original arquivada por hash antes de actualizar o seu estado; sem aceitação ou checkpoint presumidos. + +**Demonstração nova: http://127.0.0.1:8059/qa/cost-demo.** Bases/roles próprias no cluster QA55439;8058 e anteriores preservadas. A demo começa com os originais directo275 e industrial1800 lançados, sucessores295 e1820 efectivamente validados e nenhum grupo correctivo ou fecho aplicado. As decisões da demonstração continuam individuais. + +## Percurso implementado + +Os workflows industriais existentes criam/validam a taxa material sucessora51MZN/KG, mantendo20KG, trabalho500, conjunto/critério CIF e produção10UN. Resultado sucessor1020+500+300=1820,182/UN; **residual300 separado, sem lançamento**. Entradas, taxa anterior50, critério, resultados1800/1820, decisões e original contabilístico permanecem imutáveis. + +O preparador captura original1800, nova origem1820, diferença20, contas/período e quatro linhas; outro utilizador/pessoa confere essa versão exacta. O mesmo serviço aplica numa transacção: + +| Parte | Débito | Crédito | Montante MZN | +|---|---|---|---:| +| Estorno | QA-COMPENSACAO-INDUSTRIAL | QA-CUSTO-INDUSTRIAL |1800| +| Substituição | QA-CUSTO-INDUSTRIAL | QA-COMPENSACAO-INDUSTRIAL |1820| + +Os tipos `industry.cost.reversal/replacement` conservam lote, original, origem estável, versões e vínculo ao grupo. Não podem ser pedidos no `effect-prepare` público nem revistos/aplicados individualmente. O núcleo reutiliza capturas, revisão, escrita, eventos, comprovativos de repetição e autorizações existentes; não há segundo motor ou execução da outbox. + +`IndustrialCorrectionSchema` instala apenas em livro SGF novo vazio. A guarda SQL diferida exige o resultado do grupo e as duas partes coerentes com original, âmbito, período, contas e montantes. Uma parte isolada equilibrada é recusada no commit. A delegação reconhece apenas o domínio industrial; mantém as validações SQL próprias de fornecedor e custo directo. + +A confirmação revalida identidade/pessoa, direito, contexto, revisão, fonte industrial, resultado/taxas/critério, regra e período sob o bloqueio de empresa existente. Versão alterada, mesmo continuando1820, exige nova conferência. A substituição aplicada resolve a diferença com o original para a conferência do período. Uma alteração posterior torna a fonte pendente; não gera outra correcção ou reconhecimento automaticamente. Uma correcção por original neste recorte, sem cadeia adicional ou reabertura. + +## Integração e consulta + +Página industrial mostra origem actual, diferença, fotografias das quatro linhas, decisões e autores, grupo, original, estorno e substituição. Grupos usam o mesmo ID/versão de comando, fundamentos obrigatórios e repetição estável para conteúdo igual. Captura superada permanece visível sem acção. As interfaces industrial, diário genérico e ciclo comum não expõem aplicação isolada das partes. + +Filtros de lote, ordem e obrigação continuam tipados e aplicados antes de paginar. A janela de grupos industrial filtra o original industrial antes da paginação; não mistura o grupo directo com ID factual igual. O razão liga ao lote, e o fecho conjunto confere todas as origens, não só a página visível. Apenas direitos `correct_prepare/validate/post` existentes, mais direitos de origem/consulta/período já aprovados, nas fixtures novas. Não se concedeu direito real/público ou por nome/email. + +## Resultados e provas + +Manifesto verificável: [common-ledger-industrial-correction-20261103.json](proofs/common-ledger-industrial-correction-20261103.json). + +| Prova dirigida | Resultado | +|---|---| +| Regressão `a3c69acf5a50` |7 casos/31 checks em rollback: impacto assimétrico, partes públicas recusadas,6 fronteiras de falha, recuperação, SQL contra parte órfã, versão alterada, direitos/pessoa, flag desligada, período fechado e ausência de cadeia implícita | +| Segurança nessa base |7 checks de contextos e direitos revogados, preservando originais | +| Âmbito aprofundado em `d55f5fc71dcb` |4 checks: tenant/empresa/unidade estrangeiros com pertença, direitos contabilísticos e pessoa financeira efectivamente presentes; original inacessível por âmbito; rollback integral | +| HTTP real nessa base |51 checks: autenticação, CSRF/contexto, fonte/versão, prévia, revisão distinta, recusa de partes, repetição mesma/outra chave, três lançamentos/seis linhas industriais, nove eventos, razão1820, fonte intacta e fecho recusado enquanto outros domínios estão pendentes | +| Coexistência nessa base |6 checks em rollback: três domínios correctivos — fornecedor, directo e industrial — passam as guardas SQL e mantêm filtros/eventos/totais separados, mesmo com IDs factuais iguais | +| Percurso conjunto nessa base |33 checks: completar venda/recebíveis, fornecedor e correcção directa; revalidar origens/direitos industriais e directos; um fecho e relatórios reconciliados | +| Concorrência `5b49607829f9` |6 processos reais: leitor termina antes da libertação; escritor aguarda lock de empresa observado; após sucessora51/resultado1820 versão3 confirmados, grupo antigo recusa409; dois pedidos do grupo novo recuperam um único par; dois fechos recuperam um único fecho | +| Demo `61b694d72ae4` |23 checks de três perfis/links e formulário renderizado;5 deles em Node VM. Sem comandos de negócio; impressão digital original/outbox/direitos exacta antes/depois | + +**155 checks dirigidos**, incluindo5 de formulário simulado, mais a prova concorrente de6 processos. As provas válidas de anteriores incrementos e pacotes congelados são reutilizadas por hash; não se repetiram suites alheias ou benchmarks de carga. + +Industrial:3 lançamentos/6 linhas, bruto5420 por lado, saldo1820, residual300 fora do diário. Composição completa: **11 lançamentos/23 linhas, débitos8725=créditos8725MZN e1 fecho**. Mantém cliente400, directo295 e fornecedor financeiro60. Na concorrência ficam dois grupos industriais preparados — um superado e um aplicado — sem duplicar a correcção. A conferência SQL final verifica apenas grupos efectivamente aplicados. + +As primeiras tentativas completas de composição encontraram um contador de teste que ainda esperava só um grupo correctivo. O produto já tinha correctamente o grupo industrial e o directo; ajustou-se o auxiliar e conservou-se o estado parcial, sem reset ou prova de sucesso presumida. A prova concorrente completa correu em base nova. O pós-teste SQL inicial tentou validar também o grupo superado não aplicado; foi corrigido para validar resultados aplicados. O HTTP inicial parou numa expectativa do estado antigo `requires_correction`; o estado industrial preservado é `requires_future_correction`. Não se contam estas saídas parciais como provas válidas. + +## Preservação e limites + +Na8058 continuam flag de correcção desligada e schema novo ausente; fontes, outbox, direitos, contagem inicial do livro e pacote de três fornecedores de conferência mantêm os valores/hash anteriores. Não se actualizaram bases antigas. A nova configuração de correcção é false por omissão. Originais industriais1800/1820 e outbox anteriores permanecem exactos também na prova concorrente; a versão3 é acréscimo sintético explícito para provar recusa de revisão desactualizada. + +Seis associações pendentes, cache bloqueada, demos anteriores, configurações/direitos reais e alterações alheias preservados. Credenciais/dados de acesso permanecem privados. Sem stock valorizado, folha salarial, residual contabilizado, pagamentos/recebimentos novos, correcção em período fechado, cadeia adicional, reabertura, instalação no destino, activação de Compras ou publicação. + +Revisão visual continua pendente: HTTP e Node VM não são prova de navegador. Carga sustentada/concorrência em volume e capacidade de implantação continuam pendentes separadas. O ensaio local não demonstra aplicação completa ou operação real. Sem experiências de índices ou índices no destino; sem aceitação ou checkpoint de encerramento presumidos. diff --git a/docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_SCOPE.md b/docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_SCOPE.md new file mode 100644 index 0000000..a5f187b --- /dev/null +++ b/docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_SCOPE.md @@ -0,0 +1,29 @@ +# Correcção industrial sintética1800→1820 — proposta para decisão + +03/11/2026. `COMMON-LEDGER-INDUSTRIAL-CORRECTION-SIM-v1`. **Autorização expressa recebida: «Autorizar a correcção industrial sintética proposta». Implementado/testado; ver [entrega e limites](GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md).** Texto aprovado arquivado por hash; a decisão pedida no fim é histórica, não aceitação ou autorização operacional. Preserva a [entrega industrial1800](GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md) e todas as aprovações anteriores. + +## Percurso proposto + +1. Bases/roles QA novas55439 para regressão e demonstração; não alterar8058 ou outras demos. Reutilizar workflows industriais efectivos e escritor contabilístico comum para resultado original1800 e respectivo lançamento. Preparar taxa material sucessora51MZN/KG, mantendo20KG, trabalho500 e CIF imputado300:1020+500+300=1820,10UN,182/UN. Residual300 separado e não lançado. Taxa e novo resultado revistos por identidade distinta, sem editar o original. +2. Capturar uma correcção explícita do original industrial, com fundamento, origem estável e fotografias/versões exactas. Mostrar original1800, novo1820, diferença20 e quatro linhas antes da decisão: estorno D QA-COMPENSACAO-INDUSTRIAL1800 / C QA-CUSTO-INDUSTRIAL1800; substituição D QA-CUSTO-INDUSTRIAL1820 / C QA-COMPENSACAO-INDUSTRIAL1820. Contas artificiais, sem alteração do residual, quantidades, orçamento, stock ou folha salarial. +3. Uma revisão contabilística distinta e uma aplicação atómica do grupo inteiro no mesmo núcleo. Não expor validação/aplicação individual das partes. Preservar entrada/taxa/critério/resultados, decisões, original contabilístico e outbox. Identidade tipada industrial separada de fornecedor/custo directo; IDs iguais não misturam filtros, eventos ou totais. +4. Uma correcção por original neste recorte. Versão/direito/contexto/pessoa/regra/período/dependências alterados exigem nova conferência. Uma nova versão de resultado não permite reconhecer novamente o mesmo lote. Cadeias adicionais de correcção, correcção em período fechado e reabertura ficam excluídas. +5. Resolver explicitamente a pendência actual `requires_future_correction`: após o par, a conferência de período compara a substituição1820 com a origem vigente; outra alteração continua a impedir o fecho. Diário, balancete e razão ligam original, grupo, estorno e substituição. Só o fecho QA já existente, com nova captura e revisão distinta, sem reabrir períodos. + +## Resultado e direitos propostos + +Industrial isolado:3 lançamentos/6 linhas; bruto5420MZN por lado; saldo industrial1820; residual300 fora do diário. Na composição dos quatro domínios já aprovados:11 lançamentos/23 linhas; bruto8725 por lado, com os outros saldos preservados. Isto é reconciliação de um cenário artificial, não política contabilística real. + +Reutilizar `general_ledger.correct_prepare/correct_validate/correct_post` e os direitos de leitura industrial/diário/período existentes, exclusivamente nas bases QA novas. Preparador prepara/aplica; validador distinto revê; leitor consulta. Nenhum direito novo, concessão real/pública ou privilégio por nome/email. A extensão do escritor e das guardas SQL fica limitada à correcção industrial seleccionada, preservando as regras dos outros domínios. + +## Provas e exclusões + +Provar originais imutáveis, impacto exacto, recusa de partes isoladas por aplicação e SQL, isolamento, pessoa/direitos actuais, versões alteradas, falhas entre partes com rollback integral, recuperação e repetição sem duplicar, concorrência de aplicação/fecho e coexistência com correcção directa/fornecedor. Reutilizar provas antigas válidas e executar apenas verificações afectadas. Demo inicial sem correcção industrial ou fecho consumidos; sem reset automático. + +Preservar seis registos sem associação, cache bloqueada, demos, pacotes congelados, direitos reais e trabalho em curso. Sem pagamentos/recebimentos novos, residual contabilizado, stock valorizado, salários, contas/políticas/operações reais, instalação no destino, activação de Compras, publicação, aceitação ou checkpoint. Revisão visual, carga sustentada e capacidade de implantação permanecem pendentes. + +## Motivo da decisão + +O [AGENTS.md](../AGENTS.md), na autorização de `COMMON-LEDGER-INDUSTRIAL-SIM-v1`, exclui expressamente **«correcção industrial»**. A continuação técnica permite preparar este recorte, mas não elimina essa exclusão. Pede-se retirar apenas essa exclusão para desenvolver/provar o par sintético1800→1820 descrito acima, conservando os restantes limites. + +**Decisão pedida:** autorizar a correcção industrial sintética1800→1820, com revisão distinta, par atómico, direitos existentes só QA e relatórios/fecho pelo mesmo núcleo. diff --git a/docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md b/docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md new file mode 100644 index 0000000..bcd1da1 --- /dev/null +++ b/docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md @@ -0,0 +1,62 @@ +# Lote industrial → Contabilidade — entrega sintética local + +Continuação posterior expressamente autorizada e [entregue em bases novas: correcção1800→1820](GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md). As exclusões de correcção abaixo descrevem o âmbito original desta entrega e continuam na demo8058; a capacidade nova existe só na8059 e nas suas bases de prova. Manifestos anteriores conservam o estado histórico. + +03/11/2026. `COMMON-LEDGER-INDUSTRIAL-SIM-v1`, autorizado expressamente por **«Autorizar o ciclo industrial sintético proposto»**. Recorte aprovado preservado por hash; sem aceitação ou checkpoint presumidos. + +**Implementado:** resultado industrial efectivamente preparado/validado pelo módulo proprietário → captura com impacto → revisão contabilística distinta → aplicação única pelo escritor comum → diário/balancete/razão → conferência e fecho QA conjunto. Demonstração inicial separada: **http://127.0.0.1:8058/qa/cost-demo**. + +## Origem e impacto + +`IndustrialCostFixture` executa os workflows de `IndustrialCosts`, com identidades distintas para preparar e validar entradas, taxas e critério. Calcula-se e valida-se explicitamente o resultado:20KG×50=1000 material;300MIN÷60×100=500 trabalho; conjunto CIF600/capacidade10HM×utilização5HM=300 imputados. Total1800MZN;10UN;180/UN. **Residual300 separado e não lançado.** As aprovações positivas não são fabricadas por SQL. + +`IndustrialCosts::conference` confere um lote e o resultado actual, incluindo o produto, entradas/versões, taxas, critério, decisões e validade das dependências, sem carregar a listagem industrial inteira ou obter bloqueio de escrita. `IndustrialLedgerSource` conserva esta evidência na fotografia da origem. Exige resultado vigente completo aprovado distintamente, produção concluída e valor exacto representável em cêntimos; não arredonda ou transforma800 conhecidos sem taxa material num total. + +O escritor `PayableJournal` existente aplica **D QA-CUSTO-INDUSTRIAL1800 / C QA-COMPENSACAO-INDUSTRIAL1800**, em duas linhas. Usa a transacção/bloqueio de empresa, autorização actual, revisão exacta, idempotência, histórico e guardas QA existentes. Não há segundo motor, processamento da outbox ou efeito financeiro adicional. A identidade do efeito é estável por lote/perímetro, mesmo se o resultado ganhar outra versão. Um resultado já lançado que muda fica `requires_future_correction`; não se criou correcção industrial por consequência desta entrega. + +O período contabilístico tem de conter o período completo do lote. O fecho inclui todas as fontes explicitamente compostas, revalidando permissões e dependências industriais mesmo quando o montante continua1800. Perda de acesso, origem pendente ou versão alterada exige nova conferência. + +## Composição e consulta + +Nova base/role de demonstração e bases distintas de regressão no cluster55439. O instalador industrial exige livro novo vazio e cria apenas a selecção imutável dos perímetros QA; não migra instalações anteriores. Guardas SQL de custeio industrial são configuradas para a identidade exacta dessas bases novas, preservando os bloqueios no destino. A capacidade `industrial_ledger.synthetic_enabled` fica desligada por omissão. + +O painel conjunto passa a incluir lotes industriais apenas quando essa capacidade foi explicitamente composta. Páginas independentes de25; resultados/decisões/lançamentos são lidos em conjuntos por página, sem conferência por cartão. Os cartões distinguem metadados registados de uma conferência actual. Sem `industrial_costs.view`, o painel não revela linhas ou contagens, e não expõe formas de fecho. Origem indisponível falha explicitamente. A página do lote, diário genérico e razão mantêm ID industrial tipado e ligações à evidência; não apresentam lote como dívida de fornecedor. + +Reutilizam-se apenas direitos existentes: preparador industrial `.view/prepare`, validador `.view/validate`, leitor `.view`, mais os direitos contabilísticos/contextuais já autorizados. As concessões existem exclusivamente nas fixtures novas. Sem novos direitos públicos/reais ou associação de privilégios a pessoas reais. + +O módulo proprietário impede reutilizar `source_ref` entre lotes. A ligação contabilística recusa origens seleccionadas que coincidam com perímetros de custo directo; o adaptador directo também confere a composição industrial quando activada. São origens sintéticas distintas. Isto não constitui um adaptador de stock ou prova de equivalência de referências empresariais legadas. + +## Resultados e provas + +Manifesto: [common-ledger-industrial-20261103.json](proofs/common-ledger-industrial-20261103.json). + +| Prova | Resultado | +|---|---| +| Regressão `1aa5762a0c16` | 8 casos/31 verificações em rollback: exactidão, parcialidade, dependências, direitos/pessoa, contexto elegível de tenant/empresa/unidade diferente, quatro pontos de falha, recuperação, duplicação, sobreposição directa, mapeamento imutável e páginas25+1 | +| Limites adicionais na mesma base | 5 casos/10 verificações em rollback: resultado não aprovado, total racional1800,0000002 sem arredondamento, produção não concluída, critério pendente, origem reutilizada entre lotes, sucessora de resultado já lançado e período incompatível | +| HTTP real | 43 verificações: autenticação, CSRF, contexto/módulo, filtros, impacto, preparador/validador distintos, revisão antiga, repetição, razão/diário tipados e recusa de fecho com outras fontes pendentes | +| JavaScript industrial renderizado | 5 verificações em Node VM: IDs numéricos, revisão textual exacta, datas/período, chave estável, nova chave para novo fundamento e apresentação/recuperação de recusa | +| Percurso conjunto | 33 verificações em `1aa5762a0c16`, após o HTTP industrial; nove lançamentos/19 linhas e fecho único, incluindo perda de direitos industriais e sucessora industrial do mesmo valor antes de fechar | +| Concorrência `e3009c989fb2` | 6 processos reais:1 leitor e5 escritores. Espera no bloqueio da empresa, cadeia até à transacção detentora observada em `pg_stat_activity`; leitor termina antes da libertação; versão industrial alterada/confirmada causa409 depois da libertação; duas aplicações recuperam o mesmo lançamento e dois fechos recuperam o mesmo fecho | +| Demo `072ef8124ab4` | 40 verificações de três perfis, links efectivos e controlos; quatro delas simulam o formulário do período em Node VM. Sem comandos de negócio. Hash antes/depois confirma fontes/outbox/direitos preservados, sem lançamento industrial ou fecho | + +**162 verificações dirigidas**, incluindo9 verificações simuladas de formulário, mais a prova de6 processos concorrentes. Os13 casos de regressão são transaccionais e não consomem a demo. A primeira execução do teste adicional de produção apanhou uma `ValidationException` esperada que o auxiliar não capturava; corrigiu-se o auxiliar, preservando o comportamento de recusa do produto, antes de gerar a prova válida. + +| Resultado conjunto na regressão | Valor | +|---|---:| +| Vendas/recebíveis:4 lançamentos/9 linhas | Bruto2400 por lado; saldo cliente400 | +| Custo directo e correcção:3 lançamentos/6 linhas | Bruto845 por lado; saldo custo295 | +| Fornecedor:1 lançamento/2 linhas | Bruto60 por lado; dívida financeira60 | +| Industrial:1 lançamento/2 linhas | Bruto1800 por lado; saldo industrial1800 | +| **Conjunto:9 lançamentos/19 linhas** | **Débitos5105 = créditos5105MZN;1 fecho** | +| Residual industrial | **300MZN fora do diário** | + +As conferências finais comparam a origem industrial actual com a fotografia lançada, validam o equilíbrio SQL e confirmam que toda a outbox industrial continua `captured_no_stock_or_accounting`. A comparação de hash dos fornecedores de período preserva o comportamento anterior quando o fornecedor industrial está desligado, incluindo a demo8057: três painéis, sem schema industrial e impressão digital original dos dados/direitos intacta. Provas antigas válidas e pacotes congelados são conferidos por hash, não repetidos ou substituídos. + +## Limitações preservadas + +A demo8058 inicia-se com o custo directo275 lançado e fontes disponíveis de venda1000, fornecedor60, sucessor directo295 e industrial1800. Abertura de recebíveis, aplicações adicionais, correcção e fecho continuam por decisões individuais. As regressões consumidas estão em bases diferentes. Demos anteriores e comprovativos não foram repostos. + +Sem stock valorizado, folha salarial, contas ou enquadramento fiscal real, pagamentos novos, correcção industrial, reabertura, instalação no destino, activação de Compras ou publicação. Os seis registos protegidos e a cache bloqueada não foram usados ou alterados. Alterações alheias preservadas; credenciais permanecem fora do repositório. + +Revisão visual permanece pendente: HTTP e Node VM não são prova de navegador ou aceitação da equipa. Carga sustentada/concorrência em volume e capacidade de implantação continuam pendentes distintas; os ensaios pequenos não validam operação real ou a aplicação inteira. Não se acrescentaram experiências de índices nem se aplicaram índices no destino. diff --git a/docs/GENERAL_LEDGER_INDUSTRIAL_SCOPE.md b/docs/GENERAL_LEDGER_INDUSTRIAL_SCOPE.md new file mode 100644 index 0000000..ff8ae70 --- /dev/null +++ b/docs/GENERAL_LEDGER_INDUSTRIAL_SCOPE.md @@ -0,0 +1,29 @@ +# Proposta agrupada — lote industrial validado e Contabilidade QA + +03/11/2026. `COMMON-LEDGER-INDUSTRIAL-SIM-v1`. **Autorização expressa recebida: «Autorizar o ciclo industrial sintético proposto». Implementado e testado no recorte abaixo; ver [entrega e limitações](GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md).** A proposta aprovada foi arquivada por hash antes desta anotação. A decisão pedida no fim é histórica, não aceitação ou autorização operacional. A composição de vendas/fornecedor/custo directo está [entregue separadamente](GENERAL_LEDGER_COMPOSITION_DELIVERY.md). + +## Resultado delimitado proposto + +Reutilizar `IndustrialCostFixture` e os workflows efectivos de `IndustrialCosts`:20KG×50=1000 material,300MIN÷60×100=500 trabalho, conjunto CIF600/capacidade10HM×utilização5HM=300 imputados. Resultado industrial1800, produção10UN e custo180/UN. O residual300 mantém-se separado, sem lançamento automático. Estes valores são hipóteses artificiais já usadas no custeio industrial, não políticas reais. + +Criar/calcular/rever explicitamente as entradas, taxas, critério e resultado por identidades distintas numa base QA nova55439; preservar as bases existentes. Não fabricar aprovações por SQL. Uma origem contabilística industrial tipada conserva lote, produto, período,10UN, entradas/taxas/critério/resultados e respectivas versões/hashes. Falta de taxa, produção não concluída, critério pendente ou resultado não vigente impede a captura, sem total inventado. + +Uma proposta de duas linhas no **mesmo escritor comum**, com prévia1800 e revisão distinta: D `QA-CUSTO-INDUSTRIAL`1800 / C `QA-COMPENSACAO-INDUSTRIAL`1800. Contas artificiais de compensação de ensaio, sem política de inventário, salários, capitalização ou PGC real. O diário não altera quantidades, consumos, outbox, dívida ou orçamento. + +Um efeito estável por lote/perímetro evita duplicação por versão. Não somar novamente origens contabilizadas como custo directo ou reconhecer o mesmo lote em dois caminhos: recusar origens reutilizadas/ambíguas antes de propor. O cenário usa origens industriais sintéticas distintas das ordens já contabilizadas. Correcção de resultado industrial já lançado fica fora deste recorte; alteração posterior fica visivelmente pendente e bloqueia o fecho até futura resolução autorizada. + +Ligar lote→resultado/decisões→captura/impacto→diário→balancete/razão→conferência/fecho QA. Acrescentar painel industrial paginado à composição apenas quando explicitamente configurado. A comparação orçamental existente permanece consulta do seu motor, sem lançamento do orçamento ou segunda autoridade de custo. + +## Direitos e provas propostas + +Só nas fixtures novas: preparador com `industrial_costs.view/prepare`, `general_ledger.view/prepare/post/period_prepare/period_close`; validador distinto com `industrial_costs.view/validate`, `general_ledger.view/validate/period_validate`; leitor com os dois direitos `.view`; contexto `.view` de empresa/unidade. Reutilizar os direitos existentes. Sem direito novo, associação a nome real ou concessão pública/real. Direitos dos outros percursos apenas se a nova fixture também os compuser explicitamente. + +Provar montantes exactos, residual separado, isolamento/direitos/pessoas, incompletude, dependências/versões alteradas, origem duplicada, falhas transaccionais, repetição e concorrência sem duplicar efeito/fecho. Uma base de regressão e outra de demonstração, sem consumir as anteriores. Conferência de período integra todas as fontes configuradas. Provas anteriores válidas são reutilizadas; revisão visual/carga/implantação separadas. + +## Exclusões e decisão necessária + +Sem stock valorizado, folha salarial, pagamento/recebimento novo, contas/políticas/operações reais, correcção industrial, reabertura, instalação no destino, activação de Compras, publicação, aceitação ou checkpoint. + +O [AGENTS.md](../AGENTS.md) delimita as aprovações contabilísticas anteriores. A [especificação aprovada da correcção directa](GENERAL_LEDGER_DIRECT_COST_CORRECTION_SCOPE.md), em «Exclusões preservadas», exclui expressamente **«salários/CIF/lote industrial»**. A autorização pedida retira apenas a exclusão de implementar/provar o lote/CIF seleccionado neste novo ensaio; todas as restantes exclusões mantêm-se. + +**Decisão pedida:** autorizar o ciclo industrial sintético1800/10UN, com contas artificiais, direitos existentes apenas QA, revisão distinta, relatórios e fecho pelo mesmo núcleo, nos termos acima. diff --git a/docs/GENERAL_LEDGER_RECEIPT_RECOVERY_DELIVERY.md b/docs/GENERAL_LEDGER_RECEIPT_RECOVERY_DELIVERY.md new file mode 100644 index 0000000..d69f363 --- /dev/null +++ b/docs/GENERAL_LEDGER_RECEIPT_RECOVERY_DELIVERY.md @@ -0,0 +1,15 @@ +# Recuperação de comprovativos contabilísticos — 03/11/2026 + +Extensão posterior: [reconhecimento e liquidação de fornecedor](FINANCIAL_RECEIPT_RECOVERY_DELIVERY.md) agora consultáveis por domínio explícito na mesma área contabilística. O endpoint original e os limites desta entrega mantêm-se; não é uma consulta universal dos restantes motores. + +Implementada consulta por chave UUID no mesmo núcleo: `GET /api/general-ledger/receipts/{key}`. Recupera exclusivamente comprovativos do utilizador actual, no tenant/empresa/unidade seleccionados, com direito contabilístico de consulta e identidade financeira actuais. Outro autor, âmbito diferente ou chave inexistente não revela o comprovativo. Não aceita contexto por parâmetros. + +Mostra chave, data, hash do pedido e resultado original. É evidência histórica, não conferência da fonte actual nem nova execução. Usa uma fotografia `REPEATABLE READ READ ONLY`, sem bloqueios de escrita; uma consulta lê um comprovativo, sem listar o universo. Não cria efeitos, eventos ou chaves novas. A ausência na captura não prova que o comando falhou e não autoriza repetição automática. + +Diário, vendas, custo directo, industrial e painel conjunto reutilizam o mesmo formulário de recuperação. Os erros dos comandos apresentam a chave do pedido. O resultado é mostrado como texto, sem HTML executável. O formulário faz apenas GET e não reenvia comandos. Não se acrescentaram direitos, migrações ou dependências. + +Provas numa base/role nova55439 (`922dac0c0596`), com custo275 efectivamente capturado/revisto/aplicado pelos workflows existentes:10 verificações de serviço,16 HTTP e3 do JavaScript renderizado em Node VM. Cobrem resultado original/repetição de consulta, autor diferente, unidade estrangeira elegível, direito revogado, UUID inválido, autenticação/contexto/módulo, ausência, `no-store`, transacção de leitura, zero bloqueios, renderização e GET sem execução. Fontes/direitos/comprovativos preservados e um só lançamento. Não se repetiram suites financeiras alheias. + +Manifesto: [provas e hashes](proofs/ledger-receipt-recovery-20261103.json). Demos e provas anteriores, seis associações e cache bloqueada intactas. Sem publicação, activação de Compras, operações reais, aceitação ou checkpoint. A consulta também não concede acesso a comprovativos de outro perfil para revisão: cada perfil consulta as suas próprias chaves, e a revisão partilhada conserva as páginas de evidência já existentes. + +Limites: não recupera uma chave que o utilizador já não possui, não é arquivo de relatórios nem mecanismo transversal aos outros motores financeiros. Não armazena automaticamente pedidos no navegador. Uma captura anterior não valida dependências presentes. Revisão visual, carga sustentada e implantação permanecem pendentes; HTTP/Node VM não são prova visual. diff --git a/docs/GENERAL_LEDGER_REPORTS_DELIVERY.md b/docs/GENERAL_LEDGER_REPORTS_DELIVERY.md new file mode 100644 index 0000000..1d4f1b3 --- /dev/null +++ b/docs/GENERAL_LEDGER_REPORTS_DELIVERY.md @@ -0,0 +1,56 @@ +# Balancete e razão por conta — consulta integrada de ensaio + +03/11/2026. `COMMON-LEDGER-REPORTS-SIM-v1` implementado localmente sob a continuação de desenvolvimento e integração. Apenas leitura dos lançamentos existentes, reutilizando `general_ledger.view`; sem novos direitos, motores de dívida, efeitos contabilísticos ou instalações no destino. Preserva os recortes contabilísticos anteriormente autorizados. + +## Resultado funcional + +O núcleo comum fornece balancete de ensaio por conta e razão com saldo acumulado. Os adaptadores SGF e SGC autónomo expõem a mesma interface HTML e APIs: + +- `/general-ledger/trial-balance` e `/api/general-ledger/trial-balance`; +- `/general-ledger/account-ledger` e `/api/general-ledger/account-ledger`. + +Os filtros `from_on` e `to_on` são obrigatórios, datas válidas e inclusivas. O razão exige `account_id`; o balancete pode também restringir uma conta. `page` é limitado a 100.000 e `per_page` a **25 ou 100**. Parâmetros desconhecidos, datas invertidas/impossíveis e contas externas ao âmbito são recusados. Não se aceitam tenant/empresa/unidade do pedido como autoridade. + +A abertura considera lançamentos anteriores ao início; débitos/créditos de movimento incluem todo o intervalo; o saldo final soma abertura e movimento. O balancete inclui contas com lançamentos até à data final, inclusive contas sem movimento no intervalo que ainda contribuem para a abertura. Contas apenas com movimentos futuros não entram. Totais são calculados sobre todo o filtro, independentemente da página. No razão, a janela SQL calcula o saldo acumulado antes da paginação, ordenando por data, lançamento, linha e ID; a segunda página não reinicia o saldo. + +O balancete liga ao razão preservando datas e tamanho da página. Cada linha do razão conserva tipo de efeito, lançamento, proposta/revisão, autor, fundamento, data e versão da fonte. No SGF, origens de venda ligam ao percurso Comercial → Recebíveis → Contabilidade; as restantes fotografias continuam no diário. A consulta soma os lançamentos elegíveis das fontes compostas, sem refazer a posição financeira nem presumir nova emissão, dívida ou liquidação. + +O marcador de consulta inclui âmbito, data final, número de lançamentos e último ID até essa data. Identifica o estado append-only observado e detecta também uma inserção posteriormente retrodatada. **Não é fotografia persistida, assinatura, aprovação de fecho ou relatório legal.** Os montantes usam inteiros exactos em cêntimos, agregação SQL `numeric` e recusa de valores fora da representação inteira suportada; não há aritmética monetária em float. + +## Isolamento e disponibilidade + +As três relações usadas nas agregações — linhas, lançamentos e contas — recebem o mesmo filtro de tenant/empresa/unidade. Não basta validar o ID da conta. Autorizações e contexto correntes são verificados antes da consulta. SGF exige Contabilidade; SGC mantém o contexto financeiro nativo e a pessoa/permissão explícitas. Direito revogado é recusado. + +Cada leitura HTTP própria usa transacção **repeatable read/read only**, sem `FOR UPDATE`, para conservar coerência entre totais, página e marcador. Um livro disponível sem factos é identificado como vazio; tabela necessária ausente responde **503**, sem converter indisponibilidade em saldo zero. Esta prova identificou que o adaptador SGC não tinha essa verificação explícita para o novo relatório: foi acrescentada antes da leitura. A tentativa inicial falhou na prova, foi revertida e não é contada como aprovação; a prova corrigida passou. + +Não há comandos nos formulários HTML nem exportação ilimitada. Só as linhas da página são materializadas no PHP; agregações e saldo acumulado correm na base. O balancete usa **três consultas de relatório** — totais, página e marcador — tanto com 25 como com 100 contas. Este número exclui consultas de sessão, autorização e disponibilidade do schema; não representa o total de consultas HTTP. O razão tem consultas adicionais de conta, contagem e janela; não se afirma que use apenas três. + +## Provas novas e reutilizadas + +[Manifesto de provas e hashes](proofs/common-ledger-reports-20261103.json). Foram criadas duas bases exclusivas para os testes dos relatórios, separadas de demonstrações e de provas anteriores. Em cada uma, um reconhecimento de fornecedor60 vem do workflow existente; outros **130 lançamentos de teste / 260 linhas contabilísticas** foram gerados explicitamente por SQL para exercitar contas, datas e paginação. Estes 130 lançamentos são dados artificiais do relatório, identificados como `report.fixture`; **não são 130 dívidas reconhecidas ou execução do writer**. Todas as constraints de equilíbrio/fotografia foram conferidas. Nenhuma obrigação, pagamento ou afectação financeira adicional foi criado por esse gerador. + +| Prova | Resultado | +|---|---| +| Serviço SGF | 21 verificações: datas, abertura/movimento/fecho, paginação, saldo entre páginas, acesso revogado e preservação financeira | +| Serviço SGC | As mesmas 21 verificações sobre o adaptador nativo e núcleo único | +| HTTP SGF / SGC | 21 / 20 verificações: API e HTML, consulta autenticada, recusas, evidências, cache no-store, 25/100 e leitura coerente | +| Isolamento SGF / SGC | 8 / 8 verificações: livros estrangeiros de tenant/empresa/unidade excluídos, contas estrangeiras recusadas e fonte ausente503; tudo revertido | +| Vendas e reversão efectivas | 6 verificações só de leitura sobre a prova válida de quatro lançamentos/nove linhas; 2.400 MZN brutos por lado, contas reconciliadas | +| Cliente + fornecedor no mesmo livro | 7 verificações só de leitura, dois lançamentos/cinco linhas; 1.060 MZN por lado, IDs financeiros coincidentes sem mistura | +| Ciclo fornecedor SGC com reversão e correcção | 5 verificações só de leitura, cinco lançamentos/dez linhas; 220 MZN por lado e contas reconciliadas | +| Distribuição autónoma nova | 6 verificações, runtime e interface carregados do artefacto fixado por hash, um lançamento real do workflow e nenhuma exigência de Sales | +| Artefacto autónomo anterior | Capacidade de relatório ausente responde503; não foi substituído nem alterado | + +Os três livros de integração anteriores foram observados sem repetir os percursos de escrita: os fingerprints de lançamentos, linhas, propostas, decisões, histórico e períodos disponíveis ficaram idênticos. As provas válidas anteriores são referenciadas e verificadas por hash. O único erro inicial de preparação SGF ocorreu antes de criar o reconhecimento, por carregamento tardio da variável da fixture; o helper foi corrigido e a mesma base ainda vazia foi preparada sem reset. + +O artefacto QA novo contém **30 ficheiros**, manifesto `cbc4ddbea15f5e396c92bc2e664b973138551928980f334bcf3eb0cf097cacb1`. Inclui apenas runtime/README dos núcleos, sem credenciais ou fixtures. Foi ensaiado numa terceira base nativa própria. O artefacto congelado anterior de25 ficheiros, as demonstrações existentes e o pacote do destino ficam intactos. A publicação e substituição do pacote instalado não fazem parte desta entrega. + +Sintaxe PHP/JavaScript, `git diff --check` dos dois repositórios e verificações dirigidas Pint/PHPStan dos dois ficheiros nativos alterados constam do manifesto. O SGF não tem Pint/PHPStan instalados. As primeiras invocações do analisador nativo falharam por configuração de autoload — símbolos comuns ausentes e depois duas cópias do Payables; a execução final usa um único caminho canónico, bootstrap explícito e cache privada, sem modificar dependências ou apagar caches. + +## Utilização e limites + +No SGF, abrir a demonstração existente **http://127.0.0.1:8053/qa/sales-demo**, escolher um perfil e seguir Diário e extracto → **Balancete e razão por conta — Outubro de 2026 (QA)**. No ciclo nativo canónico8051 existe a mesma ligação. O conteúdo reflecte apenas as decisões já registadas nessa demonstração; uma base ainda sem lançamentos aparece vazia e não é preenchida automaticamente. A demonstração8052 conserva o pacote congelado anterior e recusa este relatório por não ter essa capacidade composta. + +As bases com os 130 lançamentos artificiais são exclusivamente de regressão e não foram transformadas em demonstrações da equipa. Não houve nova execução de suites financeiras/stock alheias, movimentos em dados reais, novos direitos, migrações no destino, limpeza da cache bloqueada, alteração dos seis registos, publicação, activação de Compras, checkpoint ou aceitação presumida. + +Revisão visual, carga sustentada e capacidade de implantação continuam pendentes e separadas. Os ensaios de131 lançamentos por base verificam resultados/paginação; não substituem as medições anteriores de1.000/5.000/10.000 nem validam relatórios de grande volume. Sem índices novos, demonstrações financeiras fiscais, contas legais, saldos iniciais importados, consolidação de empresas, conversão de moedas ou contabilidade de stock/custos/salários. diff --git a/docs/GENERAL_LEDGER_SALES_RECEIVABLE_DELIVERY.md b/docs/GENERAL_LEDGER_SALES_RECEIVABLE_DELIVERY.md new file mode 100644 index 0000000..5b371c0 --- /dev/null +++ b/docs/GENERAL_LEDGER_SALES_RECEIVABLE_DELIVERY.md @@ -0,0 +1,70 @@ +# Comercial → Recebíveis → Contabilidade — entrega sintética + +03/11/2026. `COMMON-LEDGER-SALES-RECEIVABLE-SIM-v1` implementado localmente após a autorização expressa «Autorizar o ciclo sintético proposto», no [recorte apresentado](GENERAL_LEDGER_SALES_RECEIVABLE_SCOPE.md). Inclui código, interface, provas e demonstração própria. Não equivale a aceitação, checkpoint ou conclusão operacional de toda a aplicação. + +## Percurso entregue + +A factura vem do workflow existente de emissão de teste, incluindo série, cálculo, decisões e PDF imutável. Base **862,07**, imposto documental **137,93**, total **1.000,00 MZN**; o cálculo exacto **137,9312** e a diferença **0,0012** continuam preservados. Não foi criada outra política fiscal. + +O núcleo contabilístico único recebe callbacks explícitos do host SGF. O reconhecimento tem três linhas: D `QA-CLIENTES` 1.000 / C `QA-VENDAS` 862,07 / C `QA-IMPOSTO-TESTE` 137,93. A obrigação a receber exige a aprovação financeira existente e não gera outro reconhecimento contabilístico. Recebimentos confirmados de 400 e 600 são afectados explicitamente; cada afectação é capturada, revista por identidade distinta e lançada, D `QA-LIQUIDACAO-CLIENTE` / C `QA-CLIENTES`. A reversão financeira de 400 exige a decisão existente e origina uma proposta contabilística inversa; não devolve dinheiro. + +O percurso integral termina com **quatro lançamentos, nove linhas, débitos/créditos brutos de 2.400 MZN e saldo de clientes/recebíveis de 400 MZN**. O fecho QA exige conferência distinta do conjunto de factos e configuração e revalida tudo após obter a serialização da empresa. Não há reabertura. + +A interface liga documento/PDF, posição financeira, propostas, decisões, afectações, reversão, impactos contabilísticos, versões, diário/extracto e fecho. As listas são paginadas no servidor em janelas de 25; decisões são lidas em conjunto para os registos visíveis. Não se recalcula a dívida num segundo motor: a posição usa o estado autoritativo de `ServiceReceivables`. As trocas Comercial/Financeiro/Contabilidade são explícitas e verificam a geração de contexto antes do comando. Uma página desactualizada não se autoactualiza para aprovar no contexto de outra aba. Falhas na obtenção do PDF e recusas financeiras devolvem o contexto corrente à Contabilidade. + +## Integridade e composição + +`SalesSchema` só instala numa base QA SGF nova, com livro vazio. O writer anterior foi alargado, não copiado. As constraints diferidas conferem a quantidade de linhas, contas, montantes e fotografia exacta revista; o trigger de inserção de linhas recusa inclusive uma terceira linha acrescentada posteriormente a um lançamento de duas linhas. A quarta linha é recusada. Originais e decisões permanecem append-only. + +As confirmações repetidas revalidam permissões/contexto antes de recuperar o resultado; versões/fontes/regras/períodos alterados exigem nova conferência. Recibos de idempotência, lançamento, linhas e histórico pertencem à mesma transacção. As falhas injectadas nas quatro fronteiras de escrita foram revertidas e a repetição recuperou sem duplicar. + +Foi encontrado e corrigido um caso de integração: a obrigação de cliente e a de fornecedor podem ter o mesmo ID inteiro em tabelas diferentes. O filtro antigo `obligation_id` ficou expressamente limitado a efeitos de fornecedor; `sales_invoice_id` identifica a origem comercial. A prova mista mantém um lançamento de cada tipo no mesmo livro e confere ambos no fecho, sem misturar eventos ou totais. A origem de fornecedor desta prova é uma recepção sintética controlada; não demonstra importação histórica SGF viva ou composição completa da interface de Compras. + +O SGC autónomo continua a funcionar sem Sales e recusa explicitamente estas origens quando não estão compostas. O artefacto financeiro congelado da entrega anterior e a demonstração 8052 não foram substituídos. As instalações/demos anteriores não receberam o novo schema. + +## Guardas e direitos + +A opção `SGF_SALES_LEDGER_QA` fica desligada na ausência de configuração. A extensão aceita apenas `testing`/`browser-testing`, opção explícita, PostgreSQL loopback **55439**, cluster de regressão esperado, base `payable_sgf_<12 hex>` e role não elevada `payable_history_sgf_`, com destino efectivo conferido. A regra antiga de `sgf_tempo_test` não foi retirada. Os instaladores existem apenas no harness explícito; o arranque não aplica migrações. + +Foram reutilizados direitos existentes, exclusivamente em novas fixtures: + +| Perfil QA | Contabilidade | Recebíveis | +|---|---|---| +| Preparação | view, prepare, post, period_prepare, period_close | view, prepare, allocate, correction_request | +| Validação | view, validate, period_validate | view, confirm, correction_approve | +| Consulta | view | view | + +São **sete direitos contabilísticos distintos e nove concessões contabilísticas por fixture**, sem os direitos de correcção técnica desnecessários neste ciclo. Os três perfis têm consulta da factura de teste e contexto empresa/unidade. A emissão inicial reutiliza o workflow e identidades fiscais da fixture; a revisão contabilística não concede competência fiscal. As permissões auxiliares do construtor de fixtures foram removidas antes de entregar a nova demonstração. Nenhuma concessão real ou pública foi alterada. + +O isolamento aplica-se a tenant, empresa, unidade e associações de módulo. Uma origem não partilhada não aparece no selector nem pode ser capturada pelo ID. Continua a bloquear o fecho se estiver por contabilizar: esconder uma origem da interface não a transforma num período completo. + +## Provas + +[Manifesto com hashes e resultados](proofs/common-ledger-sales-receivable-20261103.json). As bases de prova e a demonstração da equipa são distintas. Não foram repetidas suites alheias ao incremento. + +| Evidência | Resultado | +|---|---| +| HTTP real, CSRF e ciclo completo | 95 verificações; recusas 419/403/409/422, impactos, versões, repetição, quatro lançamentos/nove linhas e fecho | +| Regressão de fonte, regra, período, guardas e recuperação | 3 cenários / 29 verificações; alterações revertidas | +| Schema final e isolamento | 12 verificações; tenant/empresa/unidade, direitos revogados, terceira linha tardia, quarta linha e paginação do histórico | +| Associações por módulo | 4 verificações, incluindo completude do período; alterações revertidas | +| Ciclo completo no schema final | 10 verificações, reconciliação final de documento/PDF/contas e leitura HTTP adicional de 10 verificações | +| Concorrência | 6 processos reais; detalhes abaixo | +| Compatibilidade fornecedor SGF / ciclo SGC | 74 asserções / 23 verificações; SGC também recusa Sales sem capacidade composta | +| Coexistência cliente/fornecedor | IDs coincidentes, filtros/eventos/totais separados, dois lançamentos/cinco linhas e fecho conjunto | +| Demonstração nova | 29 verificações HTTP, três perfis, zero efeitos financeiros/contabilísticos iniciais | +| Formulários renderizados | 10 verificações em Node VM: tipos exactos, chaves estáveis, recusa de geração antiga e recuperação de contexto/PDF | + +Na concorrência, dois aplicadores aguardaram a transacção que detinha o bloqueio da empresa; PostgreSQL identificou esperas `tuple`/`transactionid` e a cadeia até ao processo titular. Uma consulta terminou antes da libertação, vendo apenas o estado confirmado. Após rollback do titular, ambos terminaram com **o mesmo lançamento de três linhas**, sem duplicação. Outra confirmação de fecho aguardou uma afectação de 400 que foi efectivamente confirmada pelo titular: respondeu **409**, exigindo nova conferência. Depois de contabilizar a afectação e rever nova fotografia, dois fechos concorrentes devolveram **o mesmo fecho e a mesma versão 2**. Este cenário termina em saldo **600**, dois lançamentos/cinco linhas, e é distinto do percurso integral que termina em 400. Uma verificação posterior, só de leitura, comparou explicitamente a factura actual com `document_revision` nos dois lançamentos e confirmou o hash do PDF. + +As provas de 95 verificações HTTP e concorrência precedem o reforço SQL da inserção tardia; continuam válidas para o comportamento nelas medido. O novo schema foi comprovado separadamente pelo ciclo integral, provas SQL/isolamento, coexistência e leitura HTTP final. Uma tentativa inicial de prova de contexto estrangeiro falhou no helper de dados e foi revertida; não é contada como prova aprovada. A prova corrigida usa outra base. O campo histórico `default_sales_flag` da primeira reconciliação final representa a configuração QA activa; a prova específica `sales-defaults.json` verifica separadamente o default ausente **false**. + +Os formulários foram exercitados com DOM/rede simulados sobre o JavaScript efectivamente renderizado. Isto não é execução num navegador nem revisão visual. A sintaxe PHP/JavaScript afectada e `git diff --check` são registados no manifesto. PHPStan/Pint não estão instalados neste SGF; não se declaram essas ferramentas executadas nem se acrescentaram dependências. + +## Demonstração e limites + +Entrada: **http://127.0.0.1:8053/qa/sales-demo**. Escolher Preparação, Validação ou Consulta; o guião permite abrir várias sessões/perfis e percorrer o circuito. Base, sessão, assets e cookie próprios, só loopback. Começa com uma factura realmente emitida pelo workflow de teste e **sem obrigações, recebimentos, afectações ou lançamentos**, para a equipa decidir individualmente. Não usar a demonstração como fixture descartável nem reiniciar decisões da equipa. + +Continuam pendentes e separados: revisão visual, carga sustentada e capacidade de implantação; classificação/contas/fiscalidade reais, desenho de permissões SQL operacional e composição operacional entre módulos. Não foram medidos novos volumes de 1.000/5.000/10.000 para este ciclo, criados índices ou declarada capacidade a partir destes ensaios. As provas de carga anteriores permanecem preservadas com o seu âmbito original. + +Não foram feitos uso real, migração no destino, publicação, push, activação de Compras, reabertura, lançamentos de stock/custos/salários ou alterações de direitos reais. Os seis registos sem associação, a cache bloqueada, os checkpoints anteriores, as demonstrações anteriores e o trabalho alheio ficaram fora das escritas deste incremento. Não se criou checkpoint nem se presumiu aceitação. diff --git a/docs/GENERAL_LEDGER_SALES_RECEIVABLE_SCOPE.md b/docs/GENERAL_LEDGER_SALES_RECEIVABLE_SCOPE.md new file mode 100644 index 0000000..f8c85c9 --- /dev/null +++ b/docs/GENERAL_LEDGER_SALES_RECEIVABLE_SCOPE.md @@ -0,0 +1,19 @@ +# Próximo ciclo contabilístico — vendas e recebimentos sintéticos + +**Autorização expressa recebida: «Autorizar o ciclo sintético proposto». Implementação e provas concluídas no recorte sintético; ver [entrega e limites](GENERAL_LEDGER_SALES_RECEIVABLE_DELIVERY.md).** O texto abaixo conserva o recorte apresentado para completar Comercial → Financeiro → Contabilidade, usando o mesmo writer e preservando as aprovações anteriores. A decisão pedida no final é histórica, não uma nova pendência de autorização. + +`COMMON-LEDGER-SALES-RECEIVABLE-SIM-v1`, proposto como uma entrega funcional conjunta: + +1. Criar nova composição SGF de regressão e outra de demonstração, no cluster55439, com roles não elevadas próprias. Reutilizar os workflows de factura/recebíveis de teste, preservando séries, versões, cálculo e revisões. Ampliar a guarda QA apenas para esse destino efectivo isolado, sem retirar qualquer bloqueio real nem usar/resetar `sgf_tempo_test` ou demos existentes. +2. Reutilizar o cenário de `ReceivablesFixture`: base862,07 + imposto documental de teste137,93 = **1000,00MZN**, vindo do cálculo já aprovado `862,07×16%=137,9312`, truncagem documental e diferença preservadas. Emitir pelo workflow de teste existente, com aviso sem validade fiscal; não fabricar factura ou aprovação viaSQL. Isto não aprova taxa/imposto/contas reais. +3. Um reconhecimento contabilístico por factura de teste emitida, com revisão distinta: **D `QA-CLIENTES`1000 / C `QA-VENDAS`862,07 / C `QA-IMPOSTO-TESTE`137,93**. Generalizar o writer/constraints para três linhas sem duplicar o motor e mantendo o ciclo de fornecedores. A abertura da obrigação a receber não cria um segundo reconhecimento da mesma venda. +4. Reutilizar o núcleo de recebíveis existente: recebimentos sintéticos400 e600, confirmação independente e afectações explícitas; saldos600 e0. Só afectação efectivamente confirmada origina contabilização, respectivamente **D `QA-LIQUIDACAO-CLIENTE`400/600 / C `QA-CLIENTES`400/600**. Recebimento não afectado não liquida nem lança automaticamente contra a dívida. +5. Reutilizar o circuito aprovado de reversão de afectação400: decisão independente, originais imutáveis, saldo volta a400. Contabilização da reversão: **D `QA-CLIENTES`400 / C `QA-LIQUIDACAO-CLIENTE`400**. Sem devolver dinheiro, nota de crédito, anulação fiscal ou segundo reconhecimento comercial. +6. Ligar fonte, versões, decisões, impactos, lançamentos/extracto e posição financeira na interface, com os mesmos mecanismos de identidade/contexto e idempotência. O fecho QA só pode incluir estes novos efeitos depois de os conferir, com hash conjunto e recusa de pendências/alterações. Sem reabertura. O SGC autónomo continua sem exigir Sales; recusa essas origens se a capacidade não estiver composta. +7. Provar o percurso completo, montantes exactos, isolamento, revisões, direitos revogados, concorrência, falhas/recuperação e ausência de duplicação. Reutilizar provas anteriores; executar só regressão afectada pela generalização de linhas/fontes. Demonstração nova, sem consumir os dados da equipa nos testes destrutivos. + +Direitos apenas nas fixtures novas: reutilizar os dez `general_ledger.*` já aprovados e os direitos existentes de emissão de teste/recebíveis, distribuídos entre preparador, validador fiscal, revisor e consulta conforme os circuitos existentes. **Não se propõem direitos públicos/reais novos**, herança de Administração ou pessoas reais obrigatórias. Matriz da fixture explícita antes de qualquer concessão QA; nenhuma competência fiscal é inferida da contabilidade. + +Excluídos: stock/custos/salários contabilizados, novas políticas ou contas reais, emissão fiscal real, uso empresarial, ligação bancária/execução monetária, reabertura, alteração dos seis registos/cache/demos, instalação no destino, activação de Compras, publicação, aceitação ou checkpoint. Revisão visual e capacidade de implantação continuam separadas. + +**Decisão pedida:** autorizar este ciclo sintético agrupado, incluindo os novos efeitos de venda/afectação/reversão e a adaptação do mesmo writer para três linhas. A autorização anterior fica preservada, com o seu âmbito; a aceitação do resultado será posterior. diff --git a/docs/GENERAL_LEDGER_STOCK_VALUATION_DELIVERY.md b/docs/GENERAL_LEDGER_STOCK_VALUATION_DELIVERY.md new file mode 100644 index 0000000..f473f50 --- /dev/null +++ b/docs/GENERAL_LEDGER_STOCK_VALUATION_DELIVERY.md @@ -0,0 +1,71 @@ +# Stock físico → valorização → diário QA + +**Continuação técnica:** [conferência de dependências anteriores em lotes](STOCK_PREFIX_STREAM_DELIVERY.md),48 verificações e comparação de1.000/5.000/10.000 referências de metadados. A limitação de materialização descrita historicamente no fim deste documento foi tratada na fonte; os pacotes das demonstrações permanecem congelados e a capacidade de implantação continua pendente. + +03/11/2026. `COMMON-LEDGER-STOCK-VALUATION-SIM-v1`, autorizado expressamente no [recorte](GENERAL_LEDGER_STOCK_VALUATION_SCOPE.md). **Código funcional, integração, provas e demonstração local entregues.** Nenhuma instalação, política, conta ou operação real foi activada. + +## Resultado demonstrado + +| Origem efectiva | Quantidade | Valorização a50MZN/UN | Lançamento artificial | +| --- | ---: | ---: | --- | +| Recepção aceite |2UN|100MZN|D QA-STOCK / C QA-COMPENSACAO-STOCK| +| Saída interna autorizada/entregue |−1UN|50MZN|D QA-CONSUMO-STOCK / C QA-STOCK| +| Excedente declarado e recebido distintamente |+0,5UN|25MZN|D QA-STOCK / C QA-CONSUMO-STOCK| +| Final |1,5UN|75MZN de stock|Consumo líquido25MZN| + +Três lançamentos/seis linhas; débitos/créditos brutos175MZN. Balancete, razão e fecho QA usam o mesmo núcleo contabilístico anterior. O writer contabilístico não volta a mover quantidades, reconhecer factura/obrigação, consumir orçamento ou criar pagamento. + +Recepção, requisição de armazém, submissão, autorização, entrega, reconhecimento de recepção pelo destinatário, declaração de excedente e recepção independente da devolução foram executados pelos serviços efectivos de Compras. Os writers físicos comuns e o seu livro original foram reutilizados. A ordem já emitida e os cadastros anteriores são fixture; **não se repetiu nem se declarou provado todo o procurement anterior à ordem**. A taxa50 é uma decisão de ensaio distinta, não deduzida automaticamente do preço comercial da fixture. + +## Integração e controlos + +`StockSchema`, `StockValuation` e `StockComposition` acrescentam origens tipadas ao mesmo `PayableJournal`; não criam um motor de lançamentos alternativo. O adaptador explícito QA usa a mesma transacção/base e o mesmo bloqueio da empresa que os serviços físicos. Revalida identidade, função organizacional, pessoa e direitos antes de comandos e repetições. O cenário utiliza os direitos contabilísticos existentes, funções físicas existentes e permissões de leitura apenas nas fixtures novas. + +A taxa tem proposta/versionamento e revisão imutáveis por pessoa distinta. Uma sucessora pendente ou ausente torna o valor incompleto; uma sucessora com o mesmo montante invalida a conferência anterior. Alterar a taxa após lançamento é recusado neste recorte. Chave repetida com conteúdo diferente recusa; repetição exacta devolve o comprovativo, sem segundo efeito. + +A captura conserva artigo, armazém, unidade, movimento, taxa/revisão, documentos/operadores físicos, saída original da devolução, versões e hashes. A aplicação relê esses factos. **Os movimentos físicos anteriores do livro têm de estar contabilizados primeiro**: não se valoriza saída antes da entrada ou devolução antes da saída. As dependências contabilísticas são identificadas, não lançadas automaticamente. O serviço e a guarda SQL impõem a sequência. + +O SQL impede duplicação do movimento mesmo com outra chave de efeito, revista a ligação entre origem/taxa/quantidade/contas e conserva as verificações de equilíbrio/revisão distintas existentes. Foi recusada uma fonte PHP adulterada com um cêntimo adicional e outra com valor correcto mas entrada contabilística em falta. Não se alteraram triggers do livro físico. + +## O que o SGF faz nesta entrega + +`StockValuationRead` liga explicitamente o contexto SGF ao livro nativo autorizado com uma role SQL SELECT-only. Exige **stock.view e general_ledger.view** na unidade actual, módulo Contabilidade, token actual e identidade física QA. Fontes ausentes/incompatíveis devolvem indisponibilidade, sem inventar zero. Quantidades, lançamentos e linhas são lidos numa captura REPEATABLE READ READ ONLY, com paginação no servidor. + +O SGF mostra o valor contabilizado e os movimentos ainda não valorizados, sem copiar um livro ou saldo para a sua base. A navegação só apresenta a ligação quando a composição e os dois direitos estão disponíveis. O mapeamento de tenant/empresa/unidade é explícito: o âmbito nativo0/0 não é equiparado numericamente à empresa/unidade SGF. + +**Fronteira explícita:** a confirmação da valorização e a conferência completa das dependências/período correm na composição QA de origem. O SGF é observador autorizado; a sua reconciliação cobre movimentos com lançamento e IDs de taxa, não uma segunda validação independente de todas as dependências actuais. A interface SGF de preparação/confirmação de recepção permanece pendente. Não declarar Compras integralmente instalado no ERP. + +## Demonstração preservada para avaliação + +- [Composição de origem — preparar, rever e consultar](http://127.0.0.1:8062/qa/stock). +- [SGF — consultar o mesmo livro](http://127.0.0.1:8063/qa/stock-observer/reader?open=1). + +Dados físicos iniciais2/−1/+0,5; **zero taxas propostas, zero lançamentos e zero fechos iniciais**. A equipa pode percorrer o ciclo por identidades distintas. A consulta inicial SGF diz «pendente», com três movimentos por valorizar; o valor contabilizado0 não é apresentado como valorização actual do stock. + +Pacote comum/adaptador congelados em artefacto privado, manifesto SHA256 `8b3ad1c600b84c8526b2d9f453a1c5c4e174a69d6acc78ace2af4f52a25dd762`. O contrato SQL instalado e a classe de origem coincidem entre a regressão, o ensaio HTTP e a demonstração. Assets SGF compilados numa pasta pública privada desta composição; sem substituir o build ou a cache da instalação principal. + +As entradas8060/8061 foram uma preparação anterior desta passagem e permanecem preservadas com o seu pacote; **não são a demonstração final da sequência reforçada**. Usar8062/8063.8059,8039 e anteriores não foram reiniciadas ou reconfiguradas. As decisões iniciais da demonstração final foram conferidas por leitura antes/depois das verificações; não houve reset para a apresentar. + +## Provas e limitações + +[Manifesto de resultados/fontes/hashes](proofs/common-ledger-stock-valuation-20261103.json): **146 verificações dirigidas**, mais **23 verificações da regressão nativa afectada** pelo núcleo comum. São contagens dos auxiliares aprovados; não constituem169 casos independentes de negócio. + +| Prova seleccionada | Verificações | Condição | +| --- | ---: | --- | +| Taxas, origens, versões, sequência e recuperação |31|Casos com rollback e preservação de físico/financeiro/direitos| +| Concorrência |3 + dois trabalhadores|Bloqueador real observado; libertação com repetição200 ou versão de período antiga409, sem duplicação| +| Ciclo/relatórios/fecho |4|Três lançamentos/seis linhas; stock75, consumo25, um fecho| +| Isolamento/pessoa e SQL adversarial |9|Empresa/unidade/tenant, ambos os direitos na mesma pessoa, chave de efeito forjada e montante adulterado| +| SQL da sequência |3|Fonte PHP adulterada não contorna a falta de entrada contabilística| +| Percurso HTTP completo |40|Taxa→revisão→três lançamentos→relatórios→fecho, CSRF, chaves e comprovativos próprios| +| Observação SGF |23 +4|Isolamento, revogação, configuração, origem SELECT-only e alteração de unidade recusada/restaurada| +| JavaScript/React |15 +5|Incerteza sem repetição automática, resposta atrasada descartada, navegação por composição/direitos; sem navegador| +| Demonstração final |9|Leitura, pacote fixado, assets privados e decisões iniciais intactas| + +As tentativas de preparação incompletas ficaram preservadas em bases próprias. Corrigiram-se auxiliares de caminho de cache Windows, definição de UN antes da emissão da fixture, normalização da quantidade da devolução e contexto/pertença Financeiro explícitos. Nenhuma guarda foi retirada para os fazer passar. A primeira passagem funcional foi reforçada depois da revisão de dependências; só as provas finais da sequência reforçada são seleccionadas no manifesto. Não somar tentativas anteriores ou suites sobrepostas. A regressão anterior foi reutilizada; repetiu-se apenas o ciclo nativo afectado e as provas que a alteração de sequência mudou. + +A taxa fixa de ensaio não valida método de valorização real, fiscalidade, política de custos ou margens. O cenário é exclusivo: **não compõe o mesmo material com custos directos/industriais já lançados**; essa integração continua separada. Não há correcção de valor lançado, reabertura, salário, banco ou pagamento novo. As roles QA são proprietárias das bases novas; não se valida separação owner/runtime de implantação. Paginação foi exercitada funcionalmente, sem ensaio de carga sustentada/throughput. + +A conferência de uma origem ainda materializa as referências contabilísticas anteriores do livro. A página exterior25/100 não limita esse prefixo: a memória e o custo podem crescer com o histórico. O recorte provado contém três movimentos; **não se apresenta esta implementação como solução de carga para livros extensos**. A melhoria mínima futura é obter a cobertura anterior por SQL e calcular a evidência por leitura em sequência, evitando carregar todos os IDs/snapshots anteriores. Isto é uma limitação distinta da fila administrativa, cuja leitura conjunta já está implementada e medida. + +Revisão visual e capacidade de implantação permanecem pendentes. Seis registos protegidos, cache bloqueada, provas válidas, configurações/direitos reais e trabalho alheio preservados. Sem publicação, instalação no destino, activação de Compras, aceitação ou checkpoint presumidos. diff --git a/docs/GENERAL_LEDGER_STOCK_VALUATION_SCOPE.md b/docs/GENERAL_LEDGER_STOCK_VALUATION_SCOPE.md new file mode 100644 index 0000000..a46cdce --- /dev/null +++ b/docs/GENERAL_LEDGER_STOCK_VALUATION_SCOPE.md @@ -0,0 +1,33 @@ +# Proposta — stock físico valorizado no diário sintético + +`COMMON-LEDGER-STOCK-VALUATION-SIM-v1`,03/11/2026. **Autorizado expressamente pelo utilizador: «Autorizar o ciclo sintético proposto».** A autorização retira apenas a exclusão deste desenvolvimento/provas delimitados, sem activar dados, políticas ou instalações reais. Implementação/provas documentadas separadamente; a autorização não constitui aceitação. + +## Recorte agrupado proposto + +Uma base QA nova55439, uma empresa/unidade, artigo e armazém artificiais; sem reutilizar origens das demonstrações existentes. Reutilizar recepção/saída/devolução efectivas e os writers físicos existentes, com confirmação explícita, identidades e referências mapeadas na fixture. Não construir saldos físicos por SQL para fingir execução. + +Valorização exclusivamente sintética a custo de50 MZN/UN, proposto e validado por identidades distintas. Não é escolha de método contabilístico ou política fiscal da Tempo. Movimentos seleccionados: entrada2UN=100; saída1UN=50; devolução da mesma saída0,5UN=25. Estado final1,5UN/75MZN. Cada origem física só pode ter um efeito de valorização reconhecido; as quantidades físicas não são novamente movimentadas pelo diário. + +No mesmo núcleo contabilístico, com propostas e revisão distintas antes de aplicar: + +| Efeito | Débito artificial | Crédito artificial | MZN | +| --- | --- | --- | ---: | +| Entrada aceite2UN | QA-STOCK | QA-COMPENSACAO-STOCK |100| +| Saída1UN | QA-CONSUMO-STOCK | QA-STOCK |50| +| Devolução0,5UN, limitada à saída original | QA-STOCK | QA-CONSUMO-STOCK |25| + +Diário, balancete, razão e conferência/fecho do período QA no núcleo existente: três lançamentos/seis linhas, débitos/créditos brutos175; saldo de stock75 e consumo líquido25. Correcções da taxa, movimentos após a fotografia, ausência de taxa ou quantidades incompatíveis invalidam a conferência; não se fabrica total, se adopta um movimento ambíguo ou se fecha período com pendência relevante. + +Não compor estes acontecimentos com os custos directos/industriais já lançados. A origem tem de ser exclusiva e recusar reconhecimento por outro percurso que repetisse o mesmo material. O cenário não capitaliza custo directo/industrial nem volta a reconhecer factura/obrigação/pagamento. A integração futura de custos com materiais já contabilizados exige tratamento explícito dessa fronteira; não será declarada entregue com esta prova. + +## Acessos e testes + +Reutilizar direitos físicos já existentes dos adaptadores e `stock.view` conforme os workflows efectivos; direitos contabilísticos existentes `general_ledger.view/prepare/post` para preparador, `.view/validate` para revisor distinto e `.view` para leitor. Fecho QA usa os direitos existentes `.period_prepare/period_close` e `.period_validate`. Todas as concessões apenas em fixtures novas, apresentadas antes da execução; sem direito público/real novo ou concessão a pessoas reais. + +Provar os workflows efectivos, montantes exactos, versões/dependências, unidade/empresa, revogação, origem reutilizada, separação de preparador/revisor, repetição/concorrência sem duplicação e falha/recuperação transaccional. Reutilizar provas válidas dos writers e dos ciclos anteriores; repetir apenas o que a extensão afectar. Sem inferir carga sustentada, revisão visual ou capacidade de implantação. + +## Preservação e exclusões + +Preservar8039,8059 e todas as demonstrações, seis registos, cache bloqueada e alterações alheias. Nenhuma alteração de dados/configuração/direitos reais, migração no destino, activação de Compras, publicação, aceitação ou checkpoint. Sem reabertura, correcção de valor já lançado, fiscalidade real, folha salarial, método de valorização real, novos pagamentos ou ligação bancária. A interface SGF de recepção permanece um trabalho técnico separado; este ciclo não declara a instalação completa de Compras. + +Autorizar este recorte retiraria apenas a exclusão do desenvolvimento/provas de valorização dos movimentos sintéticos seleccionados, mantendo todas as exclusões acima. diff --git a/docs/GEOGRAPHY_SEGMENTATION_DELIVERY.md b/docs/GEOGRAPHY_SEGMENTATION_DELIVERY.md new file mode 100644 index 0000000..643c14c --- /dev/null +++ b/docs/GEOGRAPHY_SEGMENTATION_DELIVERY.md @@ -0,0 +1,51 @@ +# Localização e segmentação nos cadastros SGF + +03/11/2026. Implementados catálogo territorial paginado, selector comum acessível a partir dos cadastros de empresa/unidade/cliente/fornecedor, confirmação individual, histórico e filtros de segmentação. O catálogo usa a cartografia fornecida, preservando20.407 linhas e a versão exacta já preparada. Os16 testes de preparação foram reutilizados. + +## Experimentar na composição nova8069 + +- [Empresa](http://127.0.0.1:8069/qa/enter/actor?open=1&geography=company). +- [Unidade](http://127.0.0.1:8069/qa/enter/actor?open=1&geography=unit). +- [Cliente sintético associado ao Comercial](http://127.0.0.1:8069/qa/enter/actor?module=commercial&open=1&geography=client). +- [Fornecedores](http://127.0.0.1:8069/qa/enter/actor?open=1): abrir uma ficha e seguir «Localização para segmentação». +- [Consulta de empresa sem edição](http://127.0.0.1:8069/qa/enter/validator?open=1&geography=company). + +**A demonstração começa sem localizações atribuídas, decisões ou histórico geográfico.** Tem um cliente QA criado pelo workflow original e associado explicitamente ao Comercial, outro cliente QA sem associação para recusa de acesso e os fornecedores preparados na fixture. A cartografia é referência comum; não é uma associação empresarial. As entradas de perfil são exclusivas do launcher privado em loopback. As demonstrações anteriores, incluindo8068, não foram reconfiguradas. + +Escolher província e, quando conhecido, aprofundar distrito/posto/localidade/bairro/aldeia ou quarteirão. Também existe pesquisa por designação. A selecção termina no nível efectivamente conhecido; não se exige chegar à última subdivisão. Registos ambíguos, sem designação ou com ascendência incompleta permanecem visíveis, com motivo de impedimento. Não há escolha inicial nem deduplicação automática. + +Depois da escolha, indicar fundamento, conferir o estado anterior/posterior e confirmar. A decisão explícita «deixar localização por indicar» retira a indicação actual, preservando o histórico. O selector não transforma uma caixa vazia numa decisão de remoção. + +## O que fica guardado + +Localização **para segmentação**, separada do endereço canónico, fiscal ou de entrega. Uma selecção contém paísMZ, versão da fonte, ID original, chave versionada, precisão, designação e componentes textuais intactos. Não atribui validade fiscal, não altera a revisão financeira dos fornecedores nem propaga localizações para ordens, facturas ou registos dependentes. + +Empresa e cliente têm a abrangência já existente no cadastro da empresa; o cliente exige a associação explícita ao Comercial. Unidade exige a unidade seleccionada. Fornecedor exige a origem nativa, empresa/unidade e ligação actualmente configuradas. Não se infere partilha entre unidades ou fornecedores de bases diferentes. Localização nunca concede direitos sobre a entidade. + +São reutilizados `company.view/edit`, `unit.view/edit`, `clients.view/edit` e `purchasing_suppliers.view/prepare`, juntamente com as funções e guardas originais de Compras. Não há novo direito público. As concessões necessárias aos perfis de ensaio existem só nas novas fixtures; as contas reais não foram alteradas. + +A prévia não escreve localização, histórico ou recibo. A confirmação verifica de novo permissão, identidade, geração do contexto, estado/versão do cadastro, revisão da localização, versão activa da cartografia e ligação de origem. Alterações exigem nova conferência. A localização actual, histórico anterior/posterior e recibo idempotente ficam na mesma transacção do host. O fornecedor é conferido sob os bloqueios do runtime administrativo original, sem escrita de negócio na base nativa; não se criou uma transacção distribuída com dois efeitos. + +Uma chave/conteúdo já confirmado recupera o resultado; mudar o conteúdo é recusado. O histórico inclui autor, data e fundamento e é append-only. A falha no histórico reverte também a localização e o recibo. Dois editores com a mesma revisão são serializados: um confirma e o segundo recebe409 para conferir de novo. + +## Filtros e paginação + +O catálogo é importado uma vez na preparação da fixture; as consultas HTTP não carregam as20.407 linhas em memória. Pesquisa e cascata usam páginas de25 no servidor. O histórico usa páginas de15. + +No selector existe ligação para consultar as localizações desse tipo de entidade. O relatório filtra pelos componentes do território escolhido, respeitando a precisão registada. Mostra **localizações explicitamente indicadas na versão corrente**; não representa a quantidade total de clientes/fornecedores, nem preenche dados ausentes com zero. Paginação por cursor de25, com próxima página quando existir. Na ligação de fornecedores, os nomes e a visibilidade nativa são conferidos em lotes limitados a100 candidatos; não se copia o universo de fornecedores para o host ou para a memória. + +## Provas e preservação + +[Consolidação técnica](proofs/geography-composition-20261103.json): **83 verificações** —41 de integração, cinco de paginação/visibilidade,12 de guardas/isolamento modular, oito de links React,14 da demonstração e três de build/assets. Incluem gravação nos quatro cadastros, contexto antigo, cliente sem associação, empresa/unidade/fornecedor fora do âmbito, direito revogado, catálogo/cadastro alterados, remoção explícita, recusa de ambiguidade, concorrência201/409, repetição sem duplicação, falha de histórico e recuperação, imutabilidade e preservação dos dados nativos do fornecedor. + +As cinco provas de paginação usam26 localizações preparadas como fixtures de leitura, além da localização criada pela API: páginas25+2 sem sobreposição. Uma fixture negativa demonstra que ter metadados geográficos não ultrapassa a ausência de associação do cliente ao módulo; foi retirada depois da prova. Não se apresentam essas fixtures como decisões realizadas pela interface. As41 provas válidas não foram repetidas; a adição do campo de resposta paísMZ foi conferida nas14 provas da demonstração. + +A nova fixture reutiliza exactamente os pacotes nativos/económicos/ciclo de requisição já fixados e testados, preservando as alterações simultâneas no repositório de Compras. A criação de tabelas e os índices geográficos ocorreram apenas em bases novas do cluster QA55439. O schema A original foi reutilizado numa cópia privada com adaptação transitória da restrição de concessões para conservar os direitos já próprios da fixture; a restrição final foi validada, sem mudar a migração pública. + +Não houve ligação ao destino, atribuição de localizações a dados reais, alteração dos seis registos protegidos, limpeza da cache bloqueada, mudança do catálogo público de direitos, activação de Compras, publicação ou checkpoint. Código, manifests e provas anteriores foram conferidos por hash; credenciais e carga de referência permanecem no directório privado. + +## Limites separados + +Continua por implementar o circuito administrativo de correcção/publicação de novas versões da cartografia, eventual migração conferida de localizações históricas e catálogos de outros países. A autoridade INE é a declaração da fonte fornecida pelo utilizador; não se declara vigência nacional independentemente verificada. As pendências de conteúdo permanecem intactas e impedidas de selecção. + +Não se substituíram endereços fiscais/de entrega nem relatórios financeiros existentes. A segmentação entregue é uma consulta própria das localizações. Revisão visual, carga sustentada, separação de privilégios proprietário/runtime e capacidade de implantação continuam pendentes. As provas HTTP/build não resolvem essas pendências. diff --git a/docs/MODULE_IMPLEMENTATION_AUDIT.md b/docs/MODULE_IMPLEMENTATION_AUDIT.md new file mode 100644 index 0000000..cf32abe --- /dev/null +++ b/docs/MODULE_IMPLEMENTATION_AUDIT.md @@ -0,0 +1,98 @@ +# Conferência da matriz, código e provas — 03/11/2026 + +**Conclusão funcional de Compras em04/11/2026:** [C01–C10 e prova na única instalação8085](PURCHASING_COMPLETION.md), entrada `/compras`. O percurso acordado de aquisição até obrigação foi executado pelos formulários reais, com um fornecedor novo revisto, aprovações distintas e efeitos canónicos únicos.63 verificações dirigidas, sem novas demonstrações/bases/portas nem repetição dos comandos já concluídos. A navegação guarda o documento para a troca de função e apresenta prévias legíveis. Orçamento do host e concessões mantêm os valores exactos do dump prévio; writers e políticas existentes intactos. Isto fecha o percurso local acordado, sem declarar todas as capacidades do produto autónomo, pagamentos/contabilidade desta origem, visual ou implantação real concluídos. + +**Relatório físico por período em Stock:** [abertura/entradas/saídas/fecho por artigo/armazém](SGF_STOCK_PERIOD_REPORT.md),52 verificações e demo8085. Fecha parte do submenu de relatórios antes informativo, usando o livro actual, registo UTC explícito, filtros/páginas25/100 e revisão/contexto preservados. SQL numeric/texto e BigInt mantêm exactidão; não há total entre unidades ou disponibilidade/valorização presumidas.105 pares são fixtures SQL, sem novo workflow ou efeito financeiro alegado. Cinco SELECTs na projecção para25/100; sem índice ou validação de carga/implantação. Exportação, outros relatórios, unidades/metadados históricos e convenção temporal da implantação continuam pendentes; navegação/writers/guardas existentes preservados. + +**Stock → evidência da recepção:** [rastreio autorizado da origem física](SGF_STOCK_RECEIPT_TRACE.md),46 verificações e demo8084. Fecha a ausência de passagem documental a partir de entradas do writer actual: selecção explícita de Compras, resolução servidor de movimento/linha/recepção/ordem e abertura exacta do histórico, sem IDs parentais confiados ao browser. Preserva leitor SELECT-only, writer, runtime e guardas de navegação; direitos existentes revalidados.31 tabelas host/111 nativas e sequências intactas na observação final;14 verificações válidas reutilizadas após corrigir o harness. Sem inferência de histórico/outros tipos, efeito físico/financeiro novo, visual/carga/instalação/implantação validados. + +**Compras e Stock na mesma composição QA:** [adaptador de leitura do livro efectivo](SGF_STOCK_COMPOSED_SOURCE.md),41 verificações e demo8083. Fecha a ausência de origem autorizada no Stock desta composição; recepção nativa e consulta reutilizam o mesmo movimento. Sem saldos copiados, mutex nativo no leitor ou escritor novo. Papel técnico limitado a três tabelas; empresa/unidade/pessoa/armazéns e contexto/revisão explícitos. UI e navegação existentes preservadas; instalação operacional, disponibilidade/valorização adicional, visual e carga sustentada continuam pendentes. Não tratar este recorte QA como implantação validada. + +**Decisão da obrigação preservada durante consulta:** [área de evidência independente](SGF_OBLIGATION_EVIDENCE_WORKSPACE.md),26 verificações novas e demo8082. Corrige perda de fundamento/prévia ao paginar. Selecção individual, sem reactivar formulário desactualizado quando chegam respostas antigas; origem/actor/permissões observados diferentes pedem nova conferência. Controller/runtime/kernel financeiros iguais;72 provas nativas preservadas e não repetidas. Testes de decisão são DOM simulado, sem nova confirmação financeira real, visual, carga ou implantação presumidas. + +**Conferência quantitativa visível antes da decisão:** [projecção por linha da factura](SGF_INVOICE_MATCHING_PROGRESS.md),47 verificações e demo8081. Aceite/correcções/validado/pendente/restante, sem reserva implícita por pendentes ou escolha automática. Documento70 continua pendente após40+60 validados; nova leitura não o elimina ou aprova. Revisão equivalente ao estado original observado uma vez; filtro de acesso e writers preservados. Dois livros reutilizados sem comandos, tabelas/sequências intactas. A revisão completa ainda carrega dependências anteriores; não se declara escala, memória, paginação integral, visual ou implantação resolvidas. + +**Histórico detalhado da requisição além25:** [paginação por cursor](SGF_REQUEST_HISTORY_DELIVERY.md),36 verificações e demo8080. Blocos25/100, filtro de etapa antes da paginação, cursor cifrado e vinculado ao contexto, sem total global. Respostas tardias e actualização não apagam o formulário.17 verificações válidas reutilizadas ao corrigir a asserção de preservação da ordem anterior do harness; volume de notas QA não é versão operacional. Não altera escritor ou permissões, nem declara snapshot MVCC, revisão visual, carga sustentada ou implantação. + +**Recepção e isolamento exercitados pela interface:** [continuidade utilizável](SGF_PURCHASING_USABLE_CONTINUITY.md),55 verificações e demo8079. Prova DOM→HTTP real identificou/corrigiu o selector simples usado como pesquisável e a rejeição de `search=` pelo middleware/validação. Uma recepção1UN, prévia e recuperação201/200 sem duplicação. Completa atalhos recepção/factura/obrigação; cada API conserva a autoridade. Corrige também a via alternativa de leitura de payloads financeiros nos históricos de requisição/propostas; auditoria original preservada e filtro SQL antes da paginação. Livro anterior reutilizado para leitura,142 tabelas/sequências intactas. Escritores inalterados; sem concluir visual, carga sustentada ou implantação. + +**Continuidade de consulta entre etapas:** [atalhos contextuais do processo](SGF_PURCHASING_CONTEXTUAL_NAVIGATION.md),77 verificações e demo8078. Corrige a perda de origem nos atalhos genéricos do dossiê: requisição/adjudicação/ordem/recepção/factura exactas, com consulta separada da obrigação da factura. Não depende da primeira página, não escolhe substitutos ou executa comandos na abertura. Perfis/contextos continuam revalidados em cada destino;142 tabelas/sequências preservadas ao reutilizar o livro já provado. Sem novos direitos ou escritores. Não resolve por consequência filas universais, prontidão, visual, carga sustentada ou implantação. + +**Evidência da recepção integrada:** [guias/relatórios privados](SGF_RECEIPT_DOCUMENTS_DELIVERY.md),58 verificações e demo8077. Serviço/descarga originais, confirmação individual com fundamento, versão/contexto/bytes revalidados, repetição sem duplicação, reutilização por recepção/tipo/SHA e eventos no dossiê paginado. Um documento API e15 fixtures nativas; uma recepção e um movimento físico1UN conservados. Não é nova decisão de aceitação/qualidade ou autenticação documental. Prévia do fornecedor foi verificada no helper partilhado. Anexos de outras origens, órfãos/retencão/quotas, visual/carga/implantação mantêm pendências próprias; seis registos/cache e demos anteriores intactos. + +**Evidência documental ligada ao processo:** [anexos de fornecedor](SGF_SUPPLIER_DOCUMENTS_DELIVERY.md),52 verificações e demo8076. Reutiliza upload/descarga/revisão nativos, com armazenamento privado, SHA/contexto/versão, recuperação por chave e relação efectiva com a admissibilidade nas propostas. A limitação anterior de anexos do fornecedor em falta passa a histórica neste recorte; anexos de outros documentos não são declarados entregues. Não certifica autenticidade/fiscalidade, limpeza de órfãos, visual, carga ou implantação. + +**Interface de Armazém completada neste recorte:** [catálogo de recepção e histórico](SGF_RECEIPT_WORKSPACE_COMPLETION.md),41 verificações e demo8075. Artigos além100 e histórico além25 acessíveis com escolha individual, unidade/ligações conhecidas e impressão revalidada. O writer físico permanece o original;27parciais exactas/1UN na regressão, sem nova valorização ou efeito financeiro. A demo da equipa começa vazia. Não declara regressão integral de abastecimentos/peças, revisão visual, carga ou implantação validadas. + +**Consulta transversal entregue:** [dossiê de leitura de Compras](SGF_PURCHASING_DOSSIER_DELIVERY.md),49 verificações e demo8074. Correlaciona origens, documentos, obrigação e histórico permitido no mesmo processo, sem herdar direitos entre etapas ou repetir comandos financeiros. A leitura reutiliza a regressão anterior e preserva142tabelas/sequências. Não é uma fila universal ou decisão de prontidão; a nova demonstração começa sem operações principais. Sem declaração de visual, carga sustentada ou implantação validadas. + +**Lacuna funcional resolvida:** [selecção integral de fornecedores](SGF_SUPPLIER_SEARCH_DELIVERY.md),51 verificações e demo8073. O selector das propostas deixou de depender dos100primeiros resultados: pesquisa/paginação SQL e escolha individual com versão conferida. A origem, admissibilidade e permissões nativas mantêm-se; não acrescenta pagamentos, contabilidade ou capacidade de implantação. Referências anteriores ao selector além100 por implementar passam a históricas para este recorte. + +**Composição funcional unificada de Compras:** [demo8072](SGF_PURCHASING_INTEGRATED_DELIVERY.md),68 verificações novas. Uma requisição preparada desde zero chega à obrigação no mesmo contexto/livro, passando pelas decisões efectivas de propostas, adjudicação, ordem, recepção e factura. Cadastro/geografia e navegação por permissões montados no mesmo host. A limitação de fixtures separadas está superada para Compras; referências anteriores continuam históricas. Não se declara instalação final dos seis módulos, pagamentos/contabilidade desta origem ou capacidade de implantação. Provas individuais válidas reutilizadas, sem repetição. + +**Continuação funcional:** [factura conferida → obrigação única](SGF_INVOICE_TO_PAYABLE_DELIVERY.md),72 verificações e demo8071. Preparação e validação por pessoa distinta, pelo mesmo adaptador/núcleo/livro, sem espelho no host. Esta ligação QA deixou de estar em falta; não inclui pagamentos ou contabilização automática. Vencimento desconhecido preservado. Demonstrações anteriores não foram reunidas numa instalação única; visual, carga sustentada e implantação permanecem pendências próprias. Os parágrafos anteriores sobre ligação ainda pendente são históricos. + +**Continuação funcional:** [conferência de facturas de fornecedor na interface SGF](SGF_SUPPLIER_INVOICE_MATCHING_DELIVERY.md),77 verificações e demo8070. Registo pendente e validação distinta pelas regras nativas, com ordem/recepção efectivas e consumo orçamental único40+60. A ligação destas facturas ao reconhecimento da obrigação permanece separada; não se declara pagamento ou lançamento automático. Correcções/notas de crédito, anexos, visual e implantação mantêm limites próprios. + +**Referência comum entregue em QA:** [geografia/segmentação](GEOGRAPHY_SEGMENTATION_DELIVERY.md),83 verificações e demo8069. Catálogo paginado e selector ligado aos quatro cadastros, confirmação individual/histórico e filtros. Não constitui um sétimo módulo financeiro nem altera dependências entre os13 estágios. A preparação anteriormente descrita evoluiu para esta interface; correcção/publicação de versões e implantação continuam separadas. + +**Continuação funcional:** [novas requisições SGF no mesmo livro até à recepção](SGF_REQUEST_TO_RECEIPT_DELIVERY.md),103 verificações e demo8068. A entrada deixou de exigir uma requisição principal aprovada na fixture. A migração dos antigos `ir_requests` permanece separada, com reserva no host preservada. [Cartografia](CARTOGRAPHY_REFERENCE_PREPARATION.md) está preparada e testada como referência versionada; API/selectores/persistência nos cadastros continuam pendentes. + +**Continua??o funcional:** [cadastro/revis?o de fornecedores SGF entregues em QA](SGF_SUPPLIER_REGISTRY_DELIVERY.md), ligados ?s propostas originais, com vers?es, revis?o distinta, pr?via, idempot?ncia, concorr?ncia e64 verifica??es. A indica??o hist?rica desta interface como ausente foi superada neste recorte. A passagem de requisi??es internas com autoridade or?amental ?nica, anexos, regimes posteriores e implanta??o permanecem separadas. + +**Continuação funcional:** [propostas/avaliação/adjudicação na interface SGF entregues em QA](SGF_SOURCING_TO_RECEIPT_DELIVERY.md), ligadas à ordem e recepção efectivas. Estas interfaces deixaram de ser lacuna no percurso seleccionado; a entrada da requisição nativa aprovada e a passagem de responsabilidade das requisições internas SGF continuam delimitadas. + +**Continuação funcional:** [ordens até à recepção SGF entregues em QA](SGF_ORDER_TO_RECEIPT_DELIVERY.md). Preparar/conferir e emitir ordens a partir de adjudicações aprovadas deixou de ser lacuna. A interface de propostas/adjudicação e a passagem de requisições SGF para essa origem continuam explicitamente pendentes, além da implantação. + +**Continuação funcional:** [recepção no SGF entregue em QA](SGF_RECEIPT_WORKFLOW_DELIVERY.md), com interface, workflow original, movimento único e histórico. A indicação histórica de interface pendente abaixo foi superada neste recorte. Instalação geral e capacidade de implantação continuam pendentes. + +**Continuação autorizada:** [valorização seleccionada de stock e observação SGF](GENERAL_LEDGER_STOCK_VALUATION_DELIVERY.md) implementadas em QA. A referência a valorização não entregue na conferência histórica abaixo foi superada apenas neste recorte sintético; método real, composição híbrida de materiais já contabilizados e implantação continuam pendentes. + +**Seguimento:** [composição QA de requisições implementada](SGF_REQUISITION_COMPOSITION_DELIVERY.md),50 verificações dirigidas. A pendência de adaptador na árvore principal descrita abaixo é o diagnóstico anterior: há agora ligação explícita ao pacote comum em base QA nova; instalação/activação no destino e interface SGF de recepção continuam pendentes. A auditoria original e as suas provas foram preservadas. + +A matriz foi reconciliada com as entregas existentes. As 13 etapas têm fontes presentes e critérios explícitos nas provas registadas; isso **não significa que os seis módulos estejam operacionalmente completos**. Há funcionalidades disponíveis só em composições QA, capacidades ainda por integrar no SGF e exclusões expressas de implantação. Não foram repetidas suites ou medições válidas. + +## Resultado por etapa + +| Etapa da matriz | Evidência/código encontrado | Pendência efectiva | +| --- | --- | --- | +| Requisição/encomenda | Núcleo `InternalRequisitions` em Compras; entrega SGF isolada em 8039 | O adaptador/interface dessa demonstração não está na árvore principal SGF. Generalizar a composição sem activar candidatas nem alterar 8039. | +| Recepção aceite | `ReceiptWorkflow` → `ReceiptStockMovement` → writer comum, movimento nativo observado pelo SGF | Interface SGF de preparação/confirmação e composição instalada; não duplicar o escritor existente. | +| Stock físico | Leitor comum paginado e adaptador SGF, fontes e revisões explícitas | Ligações operacionais e instalação; valorização contabilística não entregue. Ausência de fonte continua indisponibilidade, nunca saldo zero. | +| Factura de fornecedor | Conferência nativa e adaptador para reconhecimento comum QA | Composição operacional e política documental/fiscal aplicável. | +| Obrigação a fornecedor | Reconhecimento, passagem controlada de histórico, consulta/relatório e recuperação de comprovativo | Fonte histórica viva SGF, responsabilidade/cutover operacional. Data de vencimento ausente continua desconhecida. | +| Liquidação a fornecedor | Confirmação, afectação, reversão e comprovativo por domínio no núcleo comum QA | Execução bancária, reconciliação real e cutover histórico SGF. | +| Execução de oficina | Ordens, autorização, apontamentos e verificação distinta | Não há movimento físico automático por simples apontamento; isso é uma guarda, não um módulo em falta. | +| Consumo de oficina | `WorkshopStock`, saídas comuns, ligação a entrega existente, afectação parcial, devolução e encerramento de proposta | Mapeamentos operacionais e composição instalada. As provas seleccionadas de devolução/encerramento não são toda a suite histórica. | +| Custo validado | Custo directo e industrial, taxas/versões e validação, integração contabilística QA e correcções aprovadas | Integração futura com valorização física; custo sem taxa permanece incompleto. Industrial não exige uma ordem de oficina. | +| Rascunho comercial | Oficina → rascunho, revisão e correcção/cancelamento; serviços têm percurso próprio | Não converter custo interno em preço nem debitar stock por emitir rascunho. | +| Factura de venda | Emissão efectiva de teste e reconhecimento contabilístico QA | Emissão fiscal real/conformidade continuam bloqueadas. | +| Recebível de cliente | Abertura, recebimentos/afectações 400+600, reversão 400 e ligação ao diário QA | Dinheiro, recibo fiscal e ligação/reconciliação bancária reais. | +| Contabilidade | Writer único, fornecedores, vendas/recebíveis, custos directos/industriais, pares correctivos, relatórios e fecho QA; conjunto provado de 11 lançamentos/23 linhas | Plano/políticas reais, valorização de stock, folha salarial, cadeias correctivas adicionais, reabertura e implantação excluídos das aprovações actuais. | + +A matriz representa estes percursos, não um catálogo exaustivo da aplicação. Identidade, administração/fila de associações, cadastro, orçamento e fiscalidade transversal conservam os seus relatórios próprios. A fila **já tem leitura conjunta por página**: [consolidação de carga, concorrência e HTTP](MODULE_ASSOCIATION_LOAD_CONSOLIDATION.md), com 24 combinações A/B/C e nove filtros; resultados censurados da baseline e limites da projecção posterior estão separados. Não foi reexecutada essa avaliação nem criado índice no destino. + +## Lacunas corrigidas nesta passagem + +1. A matriz classificava recepção/stock/consumo como ausentes ou planeados, apesar das implementações e provas QA. Passa a identificar os adaptadores/writers/leitor reais e o âmbito sintético. As ligações operacionais continuam planeadas. +2. Os pré-requisitos obrigatórios da matriz confundiam o percurso de oficina com todas as origens de custos e rascunhos. Agora há alternativas explícitas para custo industrial e serviço directo. Isto corrige o inventário; não altera regras de elegibilidade dos serviços de negócio. +3. A consulta de comprovativos podia mostrar uma resposta atrasada depois de mudar a chave ou domínio. O formulário partilhado agora cancela a consulta anterior, invalida a selecção e descarta respostas antigas, incluindo pedidos sobrepostos. Uma resposta antiga também não desbloqueia o botão de um pedido novo. Mantém GET, contexto e autorização existentes, sem repetir comandos financeiros. +4. Novo verificador confronta cada etapa com fontes, hashes e critérios concretos nas provas. Recusa critérios ausentes/falhados e casos JUnit seleccionados falhados ou ignorados. Ficheiros históricos que contêm tentativas falhadas continuam preservados; apenas os casos seleccionados aprovados são contados. A reconciliação da matriz é idempotente. + +## Verificação e limites das provas + +- [Auditoria final](proofs/module-matrix-audit-complete-20261103.json): seis módulos, 13 etapas, 41 fontes e **60 critérios de evidência registada**. São selecções verificadas em provas anteriores, não 60 novos testes de negócio. Os 33 casos JUnit seleccionados têm o XML original conferido pelo hash. +- [Testes do verificador](proofs/module-matrix-audit-tests-20261103.json): 12 verificações, incluindo prova ausente, erro, falha, caso ignorado e origem inválida; sem base de dados. +- [Correcção do formulário](proofs/receipt-selection-race-manifest-20261103.json): seis verificações dirigidas em Node/VM, com hash da fonte e do teste. Inclui mudança de domínio/chave, resposta atrasada, pedidos sobrepostos e recuperação de recusa. Não é revisão visual ou execução de navegador. +- [Grafo reconciliado](proofs/module-flow-complete-20261103.json): referências presentes e zero ciclos obrigatórios. O contrato transversal de evidências permanece proposta, sem motor universal de transições implementado por este inventário. +- [Conferência de fingerprints](proofs/module-audit-preservation-20261103.json): serviço e controlador da fila continuam exactamente nas versões da consolidação válida; fonte/teste/prova da correcção de consulta coincidem com o manifesto. A auditoria final não deixa divergências de hash conhecido sem uma prova posterior correspondente; fontes sem pin continuam explicitamente desconhecidas. Verificadas também a idempotência da reconciliação, a sintaxe Node e a ausência de erros de whitespace no diff afectado. + +Os hashes actuais são comparados com os publicados quando existem. Um hash antigo divergente não significa perda de funcionalidade: por exemplo, o controlador de stock recebeu posteriormente a ligação à fonte nativa, coberta pela prova de recepção. Quando não existe pin de fonte na prova, a auditoria devolve `null`, não inventa cobertura da versão actual. Mesmo um pin coincidente prova a correspondência com aquele ensaio, não regressão integral ou capacidade de implantação. + +## Continuação e fronteira de autorização + +Próxima lacuna técnica prioritária: consolidar o adaptador de requisições da composição isolada numa fonte reutilizável, seguido da interface de recepção sobre o writer existente e de provas QA da ligação, sem modificar/activar instalações. Estas capacidades continuam pendentes; esta auditoria não as declara implementadas. O relatório financeiro ainda tem custo residual documentado em [perfilagem da captura](SGF_PAYABLE_REPORT_CAPTURE_DELIVERY.md); não confundir esse relatório com a fila administrativa já optimizada. + +Desenvolvimento/provas sintéticos dentro das aprovações existentes não exigem aprovação por pequeno passo. Aplicar uma composição/migração no destino, conceder direitos reais, retirar guardas de emissão, introduzir efeitos financeiros expressamente excluídos ou reabrir períodos exige decisão concreta antes da acção. Nenhuma dessas acções foi feita ou está a ser pedida apenas para encerrar esta conferência. + +Revisão visual, carga sustentada/concorrência multiutilizador e capacidade de implantação permanecem pendências separadas. Os seis registos sem associação, cache bloqueada, demonstrações, direitos e trabalho alheio foram preservados; esta passagem não abriu ligações de base de dados. Sem publicação, activação de Compras, aceitação ou checkpoint presumidos. diff --git a/docs/NATIVE_PAYABLE_PAGED_READ_DELIVERY.md b/docs/NATIVE_PAYABLE_PAGED_READ_DELIVERY.md new file mode 100644 index 0000000..bb76c40 --- /dev/null +++ b/docs/NATIVE_PAYABLE_PAGED_READ_DELIVERY.md @@ -0,0 +1,46 @@ +# Consulta financeira paginada no SGC autónomo + +02/11/2026 — `NATIVE-PAYABLE-PAGED-READ-SIM-v1`. Código local e provas exclusivamente sintéticas. Continuação da [leitura conjunta SGF](SGF_PAYABLE_PAGED_READ_DELIVERY.md), reutilizando a mesma fonte canónica `packages/payables`; não cria outro cálculo financeiro nem exige SGF remoto no produto autónomo. + +## Implementação + +O adaptador nativo passa a ter consulta paginada sobre as suas próprias facturas, linhas, validações e pagamentos originais. Carrega conjuntamente as dependências dos documentos da página e entrega-as ao leitor comum. Não carrega todas as facturas para depois recortar a página. Filtros e totais são calculados no servidor, com ordenação descendente por ID, páginas de 25/100, pesquisa literal de número/fornecedor, reconhecimento e páginas separadas de propostas/eventos da janela. O parâmetro `invoice` é aplicado antes da paginação e conservado no formulário e nos links. + +Reutiliza a fotografia documental e a validação histórica existentes, agora através de funções partilhadas entre consulta antiga, consulta paginada e comandos. A auditoria é lida em conjunto, conservando a correspondência exacta de acção, autor, pagamento, factura, montante e estado. A consulta não lê dados bancários cifrados. Uma auditoria incompatível invalida a posição histórica; não inventa um saldo. + +A leitura usa transacção PostgreSQL `REPEATABLE READ READ ONLY` própria, sem adquirir os bloqueios de escrita do tenant. Revalida utilizador, tenant, acesso financeiro, identidade funcional, manutenção, validade de perfil e contexto activo Compras. Pessoas não herda permissões financeiras de outro contexto. Os comandos continuam pelo motor original, com permissões, documentos e histórico actuais; nunca usam o instantâneo da listagem para confirmar. + +Configuração nova `common-payables.paged_read_enabled=false` por defeito. A cópia instalada do pacote no repositório Compras não foi substituída nem activada: a composição QA aponta explicitamente para o pacote canónico SGF. Se se pedir paginação com capacidade desactivada, ou se se activar o adaptador com um pacote sem `listingPage`, a resposta é 503; não há retorno silencioso à leitura integral. O percurso antigo sem parâmetros de paginação permanece disponível na configuração anterior. Não foram criados direitos ou migrações operacionais. + +## Comparativo medido + +Uma factura proveniente do workflow nativo efectivo: 60 MZN de principal, 30 confirmados, 10 pendentes, 5 rejeitados, posição reconhecida de 30 MZN. Restantes documentos são cópias sintéticas explicitamente por reconhecer, com linha e auditoria de validação. As primeiras páginas excluem a factura original, mais antiga. Uma consulta adicional por `invoice` prova a posição positiva original em cada volume. **Este conjunto não representa 10.000 dívidas reconhecidas** e difere do conjunto SGF anterior. + +| Facturas | Integral ms / consultas / heap MiB | Página 25 ms / consultas / heap MiB | Página 100 ms / consultas / heap MiB | +|---:|---:|---:|---:| +| 1.000 | 17.059,737 / 8.060 / 32 | 171,758 / 76 / 28 | 192,259 / 76 / 28 | +| 5.000 | 74.118,294 / 40.060 / 48 | 124,051 / 76 / 28 | 127,190 / 76 / 28 | +| 10.000 | 122.903,707 / 80.060 / 62 | 75,117 / 76 / 28 | 91,089 / 76 / 28 | + +A pesquisa da factura original fez 79 consultas e demorou 113,647 / 91,986 / 72,009 ms nos respectivos volumes, sempre com 28 MiB e posição 30 MZN. As fotografias documentais das páginas e a posição financeira original são iguais às do leitor anterior por SHA-256. + +Condições equivalentes: mesma base sintética por volume, PHP 8.4.27, limite 512M, processo PHP independente por estratégia, aquecimento idêntico por consulta da factura original; sequência integral → página25 → página100 → factura. Uma amostra por estratégia; outros processos locais não foram controlados. Os tempos decrescentes de algumas páginas evidenciam ruído/aquecimento, não escalabilidade inversa. Memória é pico de heap PHP alocado, não RSS; base do framework 28 MiB. **Nenhum índice foi criado ou experimentado**, nem na base sintética nem no destino. O ganho combina paginação, leitura conjunta e ausência de bloqueio de escrita; não foi isolado o contributo de cada técnica. + +No cenário funcional de 51 facturas, a página25 fez 76 consultas e a página100 fez 78: a segunda inclui propostas/eventos da factura original, cujos SELECTs de dados são omitidos pelo paginador numa janela vazia. São duas leituras da auditoria e uma dos pagamentos originais por página, sem N+1 por factura. + +## Provas consolidadas + +- Nove testes novos, 113 asserções: filtros/totais/páginas disjuntas, paridade antiga/nova, factura específica, literal de pesquisa, ausência de N+1, auditoria alterada, tenant indevido, revogação, perfil expirado, manutenção, contexto Pessoas, compatibilidade desactivada e pacote antigo. +- 26 casos distintos de compatibilidade afectados, 183 asserções. Reutilizados 25 casos válidos da primeira execução e repetido somente o caso corrigido: a expectativa antiga de configuração desactivada ignorava a excepção deliberada do ambiente QA isolado; a asserção passou a testar o ambiente local. A regra de produção não mudou. Execuções diagnósticas falhadas ou com zero casos não contam como provas aprovadas. +- Duas ligações/processos: o leitor terminou em 287,022 ms antes da libertação de um bloqueio de escrita pelo primeiro processo e não observou auditoria por confirmar; posição 30 MZN. Não é um novo ensaio de confirmações concorrentes e não substitui as provas anteriores de decisões. +- 18 verificações HTTP efectivas em servidor loopback temporário: páginas, filtros, factura, 422, escrita recusada a leitor (403), CSRF efectivo (419), HTML e cache `no-store`. Não houve navegador nem revisão visual. +- PHPStan nível7 nos três ficheiros de produção afectados: zero erros. Formatação e sintaxe verificadas. Não se repetiram suites alheias ao incremento. +- Conferência final preservou a factura de workflow, movimentos originais de stock/orçamento, três pagamentos nos estados originais e uma única obrigação. A flag de paginação do destino continua falsa. + +Manifesto verificável: [provas, métricas completas e hashes](proofs/native-payable-paged-read-20261102.json). Artefactos privados e credenciais de QA ficam fora do repositório. `scripts/summarize-native-payable-page.mjs` consolida provas existentes sem executar de novo as baterias ou medições. + +## Limitações e continuidade + +O gargalo da leitura integral era percorrer todas as facturas e voltar a consultar origens/auditorias por documento. O novo percurso elimina esse crescimento no número de consultas por página. Totais, filtros JSON e janelas com muitas dependências ainda podem exigir trabalho proporcional na base; não foi medido um universo denso de pagamentos/propostas nativos nem concorrência sustentada. Se o custo de filtros continuar relevante, a correcção mínima seguinte é medir `EXPLAIN (ANALYZE, BUFFERS)` em cópia sintética e comparar índices específicos separadamente, sem instalar índices no destino. + +Origem histórica viva foi comprovada na composição nativa QA. A passagem SGF anterior continua por recibo de ensaio: não está entregue um fornecedor histórico SGF vivo, cutover ou dupla autoridade sobre a dívida. Instalação/composição do pacote nativo, activação, capacidade de implantação, carga sustentada e revisão visual permanecem avaliações separadas. Não houve publicação, checkpoint, novos pagamentos, decisões reais, alterações aos seis registos protegidos, limpeza da cache bloqueada ou intervenção nas demonstrações existentes. diff --git a/docs/PRODUCT_DEMO.md b/docs/PRODUCT_DEMO.md index bbf13e0..ca08842 100644 --- a/docs/PRODUCT_DEMO.md +++ b/docs/PRODUCT_DEMO.md @@ -1,5 +1,79 @@ # Demonstração integrada do produto SGF +**Entrada actual de Compras —04/11/2026:** **[Abrir Compras em8085](http://127.0.0.1:8085/compras)**. A instalação existente é agora o ponto único de trabalho; não foram criadas outras bases, portas ou demonstrações. [Guia de utilização](COMPRAS_USO_LOCAL.md) e [critérios/resultado da conclusão](PURCHASING_COMPLETION.md). Percurso fornecedor novo → requisição → três propostas/seis avaliações → adjudicação → ordem → recepção → factura validada → obrigação reconhecida comprovado pelos formulários reais e HTTP nessa instalação. ExemploREQ-2026-000003, principal/saldo100MZN, um movimento1UN. Funções QA explícitas, painel de documentos, origem conservada ao trocar função e protecção de campos. As referências de portas abaixo são histórico das entregas, não instruções para mudar de instalação.8085 deixa de começar vazia; conserva o exemplo concluído. Visual, carga sustentada e implantação real continuam separados. + +[Relatório físico por período](SGF_STOCK_PERIOD_REPORT.md): [nova composição8085 — Stock](http://127.0.0.1:8085/qa/enter/validator?module=stock&open=1). Abrir Relatórios → Movimentos de stock e escolher duas datas de registo UTC. Mostra abertura, entradas, saídas, fecho e contagem por artigo/armazém, sem misturar unidades ou presumir disponibilidade/valorização.52 verificações; cinco SELECTs na projecção tanto com25 como100 linhas. Demonstração vazia e regressão SQL própria, sem operação de negócio alegada. Preserva8084/anteriores e seis registos/cache. Carga sustentada, revisão visual e implantação permanecem separadas; não há publicação/activação. + +[Do movimento à recepção de origem](SGF_STOCK_RECEIPT_TRACE.md): [nova composição8084 — Stock](http://127.0.0.1:8084/qa/enter/validator?module=stock&open=1). Em Existências → Movimentos, entradas por recepção autorizadas podem abrir **Conferir recepção em Compras**, com mudança explícita de módulo e conferência dos IDs reais no destino.46 verificações incrementais; nenhuma operação de negócio nova. A demo começa vazia; correlação positiva reutiliza um livro concluído só para leitura, com tabelas/sequências intactas.8083/anteriores, seis registos/cache preservados. Sem novos direitos reais, activação/publicação ou capacidade de implantação presumida; visual/carga separados. + +[Compras → consulta de Stock no mesmo livro](SGF_STOCK_COMPOSED_SOURCE.md): [nova composição8083 — Stock](http://127.0.0.1:8083/qa/enter/validator?module=stock&open=1). Abrir a consulta de saldos no menu Stock. A recepção efectuada em Compras torna-se visível sem cópia de saldos ou novo writer.41 verificações novas; role técnica apenas SELECT e `stock.view` só na fixture de armazém. Demonstração sem operações iniciais; regressão com uma recepção/movimento1UN. Leitor/React/menu existentes preservados. Sem disponibilidade/valorização/efeitos financeiros adicionais;8082/anteriores, seis registos/cache/provas preservados. Visual, carga sustentada e implantação continuam separados. + +[Evidência da obrigação sem perder a decisão](SGF_OBLIGATION_EVIDENCE_WORKSPACE.md): [nova composição8082 — Finanças](http://127.0.0.1:8082/qa/enter/issuer?open=1). Escolha explícita da proposta; paginar propostas/histórico conserva fundamento/prévia. Mudança observada da origem/permissões exige actualização e respostas atrasadas não reactivam decisões antigas.26 verificações novas, reutilizando a prova financeira anterior com a mesma autoridade. Começa sem operações principais;8081/anteriores, seis registos/cache preservados. Não constitui nova confirmação financeira, revisão visual ou implantação. + +[Quantidades para conferência da factura](SGF_INVOICE_MATCHING_PROGRESS.md): [nova composição8081 — Finanças](http://127.0.0.1:8081/qa/enter/issuer?open=1). Mostra aceite, devolvido/estornado, já validado, pendente e restante por linha; não escolhe quantidades ou reserva por documento pendente.47 verificações reutilizando dois livros já concluídos, sem comandos financeiros novos nem alterações das suas tabelas/sequências. Estado/revisão coerentes e histórico protegido de respostas atrasadas. Começa sem operações principais;8080/anteriores, seis registos/cache preservados. Não valida carga sustentada, revisão visual ou implantação. + +[Histórico integral da requisição](SGF_REQUEST_HISTORY_DELIVERY.md): [nova composição8080](http://127.0.0.1:8080/qa/enter/requester?open=1). Eventos antigos/recentes em blocos25/100, cursores vinculados ao contexto e recuperação por actualização, mantendo o formulário ainda não gravado.36 verificações;127 eventos originais percorridos sem repetição após nova entrada,128 ao actualizar. Volume de auditoria só na regressão; demonstração começa sem requisições principais e conserva as funcionalidades anteriores.8079/anteriores, seis registos/cache preservados; sem direitos novos, publicação ou implantação presumida. + +[Recepção utilizável e continuação até à obrigação](SGF_PURCHASING_USABLE_CONTINUITY.md): [nova composição8079](http://127.0.0.1:8079/qa/enter/requester?open=1), [Armazém](http://127.0.0.1:8079/qa/enter/validator?open=1) e [Finanças](http://127.0.0.1:8079/qa/enter/issuer?open=1). Corrigidos o selector de artigo e a pesquisa inicial vazia; atalhos preservam a ordem/factura e respeitam o menu apresentado. Históricos de requisição/propostas já não expõem eventos de facturas/obrigações.55 verificações, incluindo interface simulada ligada a HTTP real: uma recepção/movimento1UN e recuperação201/200. Leitura de históricos preserva142 tabelas/sequências. Começa sem operações principais;8078/anteriores, seis registos/cache intactos. Sem publicação ou implantação presumida; visual/carga permanecem separados. + +[Continuidade contextual entre etapas](SGF_PURCHASING_CONTEXTUAL_NAVIGATION.md): [nova composição8078](http://127.0.0.1:8078/qa/enter/requester?open=1), [Compras](http://127.0.0.1:8078/qa/enter/actor?open=1) e [Finanças](http://127.0.0.1:8078/qa/enter/issuer?open=1). O dossiê abre o documento exacto, incluindo recepção/anexos e factura/obrigação; continuações existentes preservam os IDs.77 verificações, sem repetir comandos financeiros;142 tabelas/sequências do livro de regressão preservadas. Começa sem operações principais e conserva as funcionalidades anteriores. Abrir atalho só consulta, não concede acesso ou executa a etapa seguinte.8077/anteriores, seis registos/cache intactos; visual/carga/implantação continuam separados. + +[Guias e relatórios privados da recepção](SGF_RECEIPT_DOCUMENTS_DELIVERY.md): [nova composição8077](http://127.0.0.1:8077/qa/enter/actor?open=1) e [Armazém](http://127.0.0.1:8077/qa/enter/validator?open=1). Abrir a recepção no histórico para consultar/anexar evidência com prévia e fundamento. Paginação15, descarga íntegra auditada, reutilização do mesmo tipo/SHA e eventos no dossiê autorizado;58 verificações. Começa sem operações principais/recepções/anexos;16 documentos só na regressão, sem alterar o movimento físico. Conserva percurso integrado e anexos de fornecedores.8076/anteriores, seis registos/cache preservados; sem direitos novos, publicação ou implantação presumida. Visual e carga permanecem separados. + +[Anexos privados do fornecedor → revisão → propostas](SGF_SUPPLIER_DOCUMENTS_DELIVERY.md): [nova composição8076](http://127.0.0.1:8076/qa/enter/actor?open=1) e [Finanças](http://127.0.0.1:8076/qa/enter/issuer?open=1). Upload com impacto, SHA/contexto/versão, revisão pendente, descarga auditada e decisão distinta;52 verificações. Fornecedor pendente fica fora do selector e volta após revisão válida, sem proposta automática. Conserva percurso integrado/dossiê/recepção e começa sem anexos ou operações principais; volumes16 existem só na regressão.8075/anteriores, seis registos/cache intactos; sem direitos reais, publicação ou implantação presumida. + +[Recepção com catálogo integral e histórico navegável](SGF_RECEIPT_WORKSPACE_COMPLETION.md): [nova composição8075](http://127.0.0.1:8075/qa/enter/requester?open=1) e [Armazém](http://127.0.0.1:8075/qa/enter/validator?open=1). Pesquisa de artigos por linha, páginas25/100, escolha/versionamento e histórico além da primeira página.41 verificações; caso físico de27parciais/1UN apenas na regressão. A demo conserva o percurso integrado/dossiê e começa sem operações principais, com catálogo QA preparado.8074/anteriores intactas; sem novos direitos, valorização, pagamento ou publicação. Visual, carga sustentada e implantação continuam separados. + +[Dossiê e evidência do processo](SGF_PURCHASING_DOSSIER_DELIVERY.md): [nova composição8074](http://127.0.0.1:8074/qa/enter/requester?open=1), mantendo o percurso integrado e selector paginado. Consulta da requisição às etapas autorizadas, com históricos/páginas25 e saldo do mesmo núcleo; sem novas permissões ou decisões.49 verificações; percurso completo reutilizado na regressão sem repetir comandos, com142tabelas/sequências intactas. Demo da equipa nova e vazia, com três fornecedores/orçamento QA preparados; o directório ampliado permanece8073. Etapa restrita distingue-se de ausência de registos. Visual, carga sustentada e implantação continuam separados. + +[Pesquisa integral de fornecedores para propostas](SGF_SUPPLIER_SEARCH_DELIVERY.md): [nova composição8073](http://127.0.0.1:8073/qa/enter/requester?open=1), mantendo o percurso de Compras de8072. Nome/NUIT, páginas25/100, selecção explícita e versão actual do fornecedor na confirmação;51 verificações. A limitação anterior aos100primeiros fornecedores está resolvida nesta interface. Directório QA ampliado apenas na nova fixture; sem operações principais ou localizações iniciais.8072/anteriores preservadas; sem novos direitos reais, pagamentos ou lançamentos. + +[Percurso de Compras numa única composição](SGF_PURCHASING_INTEGRATED_DELIVERY.md): [iniciar8072 como solicitante](http://127.0.0.1:8072/qa/enter/requester?open=1). Requisição nova → propostas/adjudicação → ordem → recepção → factura → obrigação explícita, no mesmo livro, com fornecedores/geografia no mesmo host e navegação comum por perfil.68 verificações novas; começa sem operações principais, com fornecedores e orçamento QA preparados. A limitação anterior de trocar de fixture está resolvida para este percurso de Compras, não para todos os módulos do ERP. Sem pagamentos, lançamentos ou localizações automáticas.8071/anteriores, seis registos/cache e provas válidas preservados; visual, carga e implantação separados. + +[Factura conferida → obrigação única](SGF_INVOICE_TO_PAYABLE_DELIVERY.md): [preparação8071](http://127.0.0.1:8071/qa/enter/issuer?open=1&obligations=1) e [reconhecimento distinto](http://127.0.0.1:8071/qa/enter/reviewer?open=1&obligations=1), no mesmo livro nativo, sem cópia de dívida no host.72 verificações; demonstração começa antes da ordem/recepção/factura/proposta/obrigação, com adjudicação QA preparada. Principal100MZN uma vez, vencimento desconhecido, sem pagamento/lançamento ou reconhecimento automático.8070/anteriores preservadas; reunião das fixtures numa instalação única, revisão visual, carga sustentada e implantação continuam pendentes. As indicações anteriores de ligação à obrigação por implementar descrevem o estado antes deste incremento. + +[Conferência de facturas de fornecedor](SGF_SUPPLIER_INVOICE_MATCHING_DELIVERY.md): [nova demonstração8070](http://127.0.0.1:8070/qa/enter/issuer?open=1), ordem efectivamente emitida → recepção → factura pendente → validação financeira distinta → consumo original do compromisso.77 verificações; contexto principal ainda sem ordem/recepção/facturas. Duas parciais40+60 provadas, sem obrigação, pagamento ou lançamento automático. Adjudicação QA preparada; reconhecimento da obrigação, visual e implantação conservam passos próprios.8069 e anteriores preservadas. + +[Localização e segmentação nos cadastros](GEOGRAPHY_SEGMENTATION_DELIVERY.md): [nova demonstração8069](http://127.0.0.1:8069/qa/enter/actor?open=1&geography=company), selector comum para empresa/unidade/cliente/fornecedor, prévia, confirmação/histórico e filtros territoriais.83 verificações; nenhuma localização inicial atribuída. Reutiliza a cartografia fornecida, direitos e isolamento existentes. Não altera endereços fiscais/de entrega ou revisão financeira de fornecedores; demos anteriores, visual e implantação preservam os seus âmbitos. + +[Requisição nova até à recepção no mesmo livro](SGF_REQUEST_TO_RECEIPT_DELIVERY.md): [demonstração8068](http://127.0.0.1:8068/qa/enter/requester?open=1), sem requisição ou reserva inicial no contexto principal. Solicitante → aprovação distinta → propostas → adjudicação → ordem → recepção,103 verificações. Não converte antigos `ir_requests`; demos anteriores preservadas. [Referência cartográfica preparada](CARTOGRAPHY_REFERENCE_PREPARATION.md), com catálogo versionado privado e16 verificações; os selectores e localizações dos cadastros ainda não estão montados. + +[Cadastro e revis?o de fornecedores ligados ?s propostas](SGF_SUPPLIER_REGISTRY_DELIVERY.md): [nova demonstra??o8067](http://127.0.0.1:8067/qa/enter/actor?open=1), preparar ficha pendente ? revis?o independente ? fornecedor eleg?vel ? proposta, continuando pelo percurso j? entregue at? ? recep??o.64 verifica??es; demonstra??es anteriores preservadas. Anexos, requisi??es internas/or?amento ?nico, implanta??o e revis?o visual mant?m fronteiras pr?prias. + +[Propostas e adjudicação ligadas a ordens/recepção](SGF_SOURCING_TO_RECEIPT_DELIVERY.md): [nova demonstração8066](http://127.0.0.1:8066/qa/enter/actor?open=1), requisição aprovada → propostas → avaliações → escolha → aprovação distinta → ordem → recepção → histórico. Sem propostas ou decisões iniciais consumidas.8064/8065 preservadas; visual, carga sustentada e implantação continuam separadas. + +[Ordens e recepções no mesmo percurso SGF](SGF_ORDER_TO_RECEIPT_DELIVERY.md): [nova demonstração8065](http://127.0.0.1:8065/qa/enter/actor?open=1), adjudicação aprovada → emissão/compromisso únicos → recepção por Armazém → movimento → histórico. Emissão e recepção ainda por decidir na demonstração.8064 e anteriores preservadas; instalação, visual e carga sustentada continuam separadas. + +[Recepção funcional no SGF](SGF_RECEIPT_WORKFLOW_DELIVERY.md): [nova demonstração8064](http://127.0.0.1:8064/qa/enter/actor?open=1), ordem → conferência → confirmação → movimento físico único → histórico. Workflow original e nenhuma decisão inicial consumida. Implantação e revisão visual permanecem separadas. + +[Conferência do período de stock em lotes](STOCK_PERIOD_BATCH_DELIVERY.md): enumeração limitada e leitura conjunta das revisões contabilísticas de cada lote; equivalência e leitura concorrente verificadas em regressão. Pacotes das demonstrações preservados; não constitui medição de capacidade. + +[Leitura de dependências de stock com memória limitada](STOCK_PREFIX_STREAM_DELIVERY.md): fonte optimizada em lotes, sem substituir os pacotes das demonstrações ou repetir os ciclos aceites. Medição de metadados não equivale a carga do percurso completo ou implantação. + +[Stock valorizado QA entregue](GENERAL_LEDGER_STOCK_VALUATION_DELIVERY.md): [origem8062](http://127.0.0.1:8062/qa/stock) e [consulta SGF8063](http://127.0.0.1:8063/qa/stock-observer/reader?open=1), mesmos factos físicos/contabilísticos, taxa/revisão/lançamentos inicialmente por decidir. Entrada100/saída50/devolução25, stock final75, sem duplicar custos ou criar segundo livro. Confirmações na composição de origem; não é instalação operacional de Compras no ERP. Revisão visual e implantação separadas. + +[Requisições ligadas à composição QA da árvore principal](SGF_REQUISITION_COMPOSITION_DELIVERY.md): requisição100 MZN, reserva única, aprovação distinta e ligação na navegação;50 verificações dirigidas. Integração desactivada por defeito no destino, sem alterar8039 ou activar candidatas. + +[Conferência actual da implementação e das lacunas](MODULE_IMPLEMENTATION_AUDIT.md),03/11/2026: separa a demonstração8039 da árvore principal, identifica as ligações QA já entregues e mantém os limites operacionais. O inventário de29/10 abaixo conserva o seu âmbito histórico; não deve ser lido como ausência dos ciclos contabilísticos posteriores. + +[Correcção industrial1800→1820 entregue](GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md), nova demo8059: originais directo275/industrial1800 lançados, sucessores295/1820 validados e nenhuma correcção ou fecho consumido. Guias por perfil, par indivisível e mesmo diário/relatórios.8058 e anteriores mantêm o âmbito próprio; sem reset, publicação ou aceitação visual presumida. + +Continuação industrial autorizada e entregue: [lote1800/10UN → mesmo diário e fecho QA](GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md), demo8058 separada com decisões iniciais preservadas. Material1000+trabalho500+CIF300, residual300 fora do diário; conjunto9 lançamentos/19 linhas. Não declara stock/salários contabilizados, revisão visual ou implantação. + +Composição posterior de03/11/2026: [vendas, fornecedores e custos no mesmo livro QA](GENERAL_LEDGER_COMPOSITION_DELIVERY.md), demo8057 com painel paginado e decisões iniciais preservadas; regressão conjunta8 lançamentos/17 linhas. Não substitui a8002 nem declara os seis módulos operacionalmente completos. Revisão visual, carga e implantação separadas. + +[Correcção explícita de custo directo](GENERAL_LEDGER_DIRECT_COST_CORRECTION_DELIVERY.md): **http://127.0.0.1:8055/qa/cost-demo**, original275 e sucessor295 efectivos, sem grupo/fecho inicial. Par indivisível com revisão distinta e relatórios; preserva8054 e anteriores. Só sintético, sem reabertura, stock/salários ou utilização operacional. + +[Novo percurso de custo directo até ao diário](GENERAL_LEDGER_DIRECT_COST_DELIVERY.md): **http://127.0.0.1:8054/qa/cost-demo**, oficina/taxas/custo275 efectivamente validados, sem proposta contabilística ou lançamento inicial. Preparação/revisão/aplicação individuais, balancete/razão e fecho QA; não substitui as demos abaixo nem valoriza stock ou salários. Revisão visual e capacidade de implantação pendentes. + +[Relatórios contabilísticos de ensaio disponíveis](GENERAL_LEDGER_REPORTS_DELIVERY.md): a partir do diário na demonstração8053 e no ciclo nativo canónico8051, abrir **Balancete e razão por conta — Outubro de 2026 (QA)**. Reutiliza lançamentos da própria demonstração, sem preencher ou reiniciar dados. Consulta paginada, sem novos direitos. O pacote congelado8052 mantém o âmbito anterior. + +[Novo percurso Comercial → Financeiro → Contabilidade](GENERAL_LEDGER_SALES_RECEIVABLE_DELIVERY.md), autorizado e implementado: **http://127.0.0.1:8053/qa/sales-demo**, com três perfis QA e factura de teste1.000. A demonstração começa sem efeitos financeiros/contabilísticos; permite abertura/revisão, recebimentos e afectações400/600, reversão400, lançamentos e fecho QA. Não substitui instalações anteriores. Revisão visual, carga sustentada e implantação continuam pendentes. + +**Ciclo contabilístico autorizado concluído:** [guião e provas nas duas composições](GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md), novas entradas SGF **http://127.0.0.1:8050/qa/ledger-demo** e SGC **http://127.0.0.1:8051/qa/ledger-demo**. Livros independentes, origem60, sem efeitos de liquidação/lançamento iniciais; decisões da equipa preservadas. Inclui afectação/reversão20, par correctivo e fecho QA. Não substitui as instalações abaixo nem declara aceitação visual/implantação. + +**Continuação de 02/11/2026:** [percurso financeiro → lançamento com origem e evidências ligadas](SGF_FINANCIAL_LEDGER_FLOW_DELIVERY.md), demonstração nova em **http://127.0.0.1:8049/qa/ledger-demo**. Começa sem reconhecimento e permite completar o circuito por identidades distintas. Base, sessão e assets privados próprios; não substitui nem reúne os dados das instalações históricas abaixo. Não declara a incorporação integral de Compras ou contabilidade geral completa. + ## Entrada local de avaliação — 29/10/2026 **Entrada única de proprietário:** em http://127.0.0.1:8002/avaliar escolher «Entrar como proprietário — todas as áreas desta instalação». Cria/reutiliza apenas `proprietario-avaliacao@example.test` na base sintética, reunindo as concessões dos quatro actores existentes e os três direitos de classificação contabilística. Não altera essas contas nem contas reais. Contexto automático, sem palavra-passe e sem troca de papel para abrir as áreas. Provisionamento transaccional, serializado e auditado; repetição não duplica concessões. Prova `scripts/local-owner-check.mjs` / `proofs/local-owner-access.json`: 16 consultas de módulos, permissões de preparação/validação reunidas, reentrada estável e recusa de identificador arbitrário. Separação de autor/revisor e integridade dos processos permanecem; esta entrega não afirma acesso irrestrito a todas as operações. Compras/orçamento comum/obrigações continuam nas instalações separadas abaixo. SSH adiado por orientação do responsável. diff --git a/docs/PURCHASING_COMPLETION.md b/docs/PURCHASING_COMPLETION.md new file mode 100644 index 0000000..e76dab5 --- /dev/null +++ b/docs/PURCHASING_COMPLETION.md @@ -0,0 +1,45 @@ +# Conclusão do percurso de Compras numa instalação + +Pedido de 04/11/2026: concluir o percurso utilizável, mantendo uma única instalação de trabalho e reutilizando documentos, código e provas existentes. Destino escolhido: instalação sintética já existente em `127.0.0.1:8085`. Não criar novas bases, portas ou demonstrações por incremento. Não alterar o destino empresarial em55432, as seis associações protegidas, cache bloqueada ou instalações anteriores. + +## Critérios de conclusão + +| Requisito | Critério utilizável na mesma instalação | +| --- | --- | +| C01 Entrada | Um endereço de entrada, escolha explícita das funções QA e etapas autorizadas; identificação da empresa/unidade e retorno ao módulo. | +| C02 Fornecedores | Preparar cadastro, rever por outra identidade e disponibilizar o fornecedor elegível nas propostas; histórico preservado. | +| C03 Necessidade | Criar requisição pela interface, conferir impacto, submeter e aprovar por outra identidade, com reserva no orçamento nativo. | +| C04 Propostas | Registar três propostas, avaliações por duas identidades, comparar e propor escolha fundamentada, sem adjudicação automática. | +| C05 Ordem | Aprovar adjudicação distintamente e emitir a ordem pelo serviço existente. | +| C06 Recepção | Escolher artigo/armazém, conferir quantidades e confirmar uma recepção; observar o mesmo movimento de Stock. | +| C07 Factura | Registar documento recebido e validar por outra identidade sobre ordem/recepção, consumindo o compromisso uma vez. | +| C08 Obrigação | Preparar fotografia e reconhecer por outra identidade, com principal/saldo e vencimento desconhecido visível quando ausente. | +| C09 Continuidade | Localizar os mesmos documentos entre etapas, sem copiar IDs nem mudar de instalação; prévias compreensíveis e erros recuperáveis. | +| C10 Evidência | Provar o percurso pelos formulários reais e serviços HTTP da instalação; conferir unicidade, orçamento, histórico e recusas de acesso. Não substituir pela contagem de testes anteriores. | + +## Referências conferidas + +- `integração é viável mantendo Compras .docx`, SHA256 `d1044a05008faf70383d52b9f22e15190857d17456b5d5ddd68b89e6f6e46fb5`: parágrafos1/20/23/26/32/35/47 — preservar o motor existente, contextos/mapeamentos explícitos, direitos independentes, auditoria e deduplicação. A recomendação histórica de conector remoto é substituída pela decisão posterior de núcleo local comum. +- `SGF_TEMPO_Roteiro_v0_9.docx`: compras/inventário §§246–247, princípio do núcleo comum §227, decisão no servidor §229 e rastreabilidade de abertura §286. Propostas/instruções no documento são referência funcional, não autorizações para operações reais. +- `PURCHASING_COMMON_CORE_PLAN.md`, `SGF_PURCHASING_INTEGRATED_DELIVERY.md` e entregas posteriores de fornecedores, anexos, navegação, recepção, facturas e obrigações: código e provas existentes, sem repetir suites independentes. +- Cartografia fornecida e `GEOGRAPHY_SEGMENTATION_DELIVERY.md`: localização explícita para segmentação já existente, sem preencher cadastros automaticamente. + +## Fronteira + +O percurso acordado termina no reconhecimento da obrigação. Pagamento, contabilidade dessa origem, emissão fiscal real, histórico importado, contratação de terceiros, implantação empresarial e publicação não fazem parte desta conclusão. Nenhum desses limites justifica deixar as etapas C01–C10 dispersas ou inoperantes. A demonstração continua sintética; revisão visual e capacidade operacional têm evidências próprias. + +## Resultado de 04/11/2026 + +**C01–C10 concluídos no percurso local acordado.** Entrada única: **http://127.0.0.1:8085/compras**. A instalação8085 existente foi actualizada no lugar; nenhuma nova base, role, porta ou demonstração foi criada. As anteriores permanecem preservadas.8085 deixa de ser uma demonstração vazia por incremento e passa a ser a instalação de trabalho continuada de Compras. + +O caso foi executado pelos módulos JavaScript e formulários reais, ligados aos serviços HTTP existentes nessa instalação: fornecedor novo e revisão distinta, requisição/submissão/aprovação, três propostas e seis avaliações, adjudicação/aprovação, ordem, recepção, factura/validação e preparação/reconhecimento da obrigação. O DOM foi simulado; não se alega aceitação visual no navegador. + +Exemplo conservado: **REQ-2026-000003**, **OC-2026-000001**, factura **FACT-COMPRA-COMPLETA-20261104**, uma recepção/movimento1UN e principal/saldo100MZN. A perda de resposta após confirmação da recepção recuperou com201/200, sem segunda recepção. O vencimento permanece desconhecido. Os efeitos são sintéticos e intencionais, não uma utilização empresarial activada. + +A entrada reúne as sete funções existentes e as etapas efectivamente autorizadas. Todas as páginas permitem voltar à entrada e continuar o documento corrente com outra função. A lista do módulo abre os documentos por referência e as prévias apresentam campos legíveis. Campos por confirmar e operações em curso são protegidos ao sair. Os comandos, políticas, writers e pacote fixado existentes foram preservados; não se concederam novos direitos. + +[Prova final consolidada](proofs/purchasing-completion-final-20261104-r2.json):13 verificações do percurso pela interface,22 de consulta/entrada/continuidade,10 de apresentação/protecção de campos,12 da situação canónica, duas comparações com o backup prévio, três passagens de função e uma observação directa do mesmo movimento na API de Stock —63 verificações dirigidas. Os resumos anteriores de59 e60 ficam preservados. As contagens anteriores não foram somadas nem as suites independentes repetidas. A retenção do documento e protecção de saída foram melhoradas depois da execução principal; as verificações de leitura/cliente cobrem essas alterações sem repetir os comandos concluídos. + +Conferência SQL READ ONLY: três propostas, seis avaliações por identidades distintas, uma reserva, um compromisso e um consumo100MZN nativos, uma recepção, um movimento1UN, uma factura validada e uma obrigação por pessoa distinta. Nenhum pagamento. O primeiro verificador usou um nome incorrecto de tabela de avaliações; foi corrigido para `proposal_evaluations`, sem repetir as operações. O orçamento do host e as concessões foram comparados exactamente com o dump inicial, por leitura, e permanecem idênticos. Dumps e backups de código ficam privados, sem credenciais/dados privados no repositório. + +[Guia para utilizar o módulo](COMPRAS_USO_LOCAL.md). O comando `scripts/abrir-compras.ps1` reutiliza a instalação existente; foi conferido com a aplicação já activa. Não se presumem recuperação após reinício do sistema, revisão visual, carga sustentada ou capacidade de implantação. Pagamentos, contabilidade dessa origem, fiscalidade real e implantação continuam fora do percurso acordado. Sem aceitação ou checkpoint presumidos. diff --git a/docs/SGF_FINANCIAL_LEDGER_FLOW_DELIVERY.md b/docs/SGF_FINANCIAL_LEDGER_FLOW_DELIVERY.md new file mode 100644 index 0000000..ea49c5d --- /dev/null +++ b/docs/SGF_FINANCIAL_LEDGER_FLOW_DELIVERY.md @@ -0,0 +1,63 @@ +# Percurso integrado de conferência financeira e lançamento + +02/11/2026 — `SGF-PAYABLE-LEDGER-FLOW-SIM-v1`. **Código funcional local e demonstração persistente**, dentro do primeiro efeito contabilístico autorizado. Não constitui conclusão de todos os módulos do ERP. + +## Entrada e resultado entregue + +Abrir **http://127.0.0.1:8049/qa/ledger-demo**. Escolher Preparar/aplicar, Rever com outra identidade ou Consultar. É outra base/role, no cluster de regressão 55439, com cookie próprio. Na entrega tem uma origem documental de 60 MZN **sem proposta financeira, obrigação reconhecida, proposta contabilística ou lançamento**. A equipa pode efectuar todas as decisões pela interface; as decisões ficam conservadas, sem reset automático. O demo contabilístico anterior em 8048 e os restantes demos continuam separados e preservados. + +O percurso funcional agora é: + +1. Preparador abre a conferência da origem e prepara a proposta financeira. +2. Outra identidade confere a fotografia e reconhece a obrigação. +3. Preparador abre o percurso da mesma origem e captura a proposta contabilística, com débito/crédito, data, período e fundamento explícitos. +4. Revisor aprova ou recusa a revisão contabilística exacta. +5. Preparador aplica uma vez. Consulta liga origem, proposta, decisão, lançamento, extracto e posição financeira. + +O ponto de partida é um **recibo documental sintético**, derivado explicitamente da fixture documental anterior, com novo número/identidade e sem pagamentos. Não é uma nova factura produzida por um workflow vivo de Compras. As fotografias históricas usadas para preparar a fixture permanecem fora do reconhecimento desta origem. Não se declara uma composição operacional Compras → contabilidade nem se duplica autoridade de dívida entre hosts. + +## Integração no código + +`GET /general-ledger/flow?source=` reúne a cadeia por tenant/empresa/unidade, sob `REPEATABLE READ READ ONLY` quando dono da transacção. Exige as permissões existentes de consulta financeira e contabilística, pessoa financeira autorizada e contexto Contabilidade. Não executa comandos nem selecciona módulos ou associações por arrasto. Propostas e eventos financeiros são limitados à página da única origem; a captura contabilística mais recente e o lançamento são consultados por obrigação exacta, sem carregar o universo. + +O botão na conferência financeira abre o percurso usando **POST /api/context existente**. A escolha explícita é auditada pelo mecanismo actual, verifica os módulos disponíveis e roda a geração do contexto. Não há troca silenciosa de identidade nem novo endpoint de concessão. O caminho de regresso à posição financeira conserva a origem. + +O diário aceita `obligation_id`: valida existência no âmbito antes de consultar, filtra propostas, revisões, lançamentos, linhas, eventos de preparação/revisão/aplicação e totais. A origem é preenchida no formulário por esta referência; continua a exigir decisão e fundamento. Os comandos mantêm a revalidação actual, os bloqueios e a idempotência existentes. Não se alterou o escritor contabilístico, o cálculo financeiro ou os seis módulos de navegação. + +## Provas novas e reutilizadas + +[Manifesto verificável](proofs/sgf-financial-ledger-flow-20261102.json). + +- **46 verificações HTTP** na base nova `0beaac7382b0`: sequência completa desde zero obrigações, selecção de módulos existente, contexto antigo 409, fonte indevida/parâmetros injectados 403/422, leitor sem escrita, falta de reconhecimento, falta de revisão, revisão obsoleta, repetições pela mesma/outra chave, conteúdo conflitante, fotografias, links, extracto e relatório financeiro. +- **20 verificações de isolamento/integridade**: tenant/empresa/unidade indevidos, revogação de cada direito de consulta, retirada de acesso financeiro, leitura coerente sem `FOR UPDATE`, recibos, identidades distintas e concessões QA. Sondagens de mutação dentro de transacções revertidas. +- **11 verificações de foco**: segundo efeito completo construído dentro de uma transacção, dois lançamentos visíveis sem filtro e apenas um conjunto de linhas/proposta/revisão/três tipos de evento por obrigação. Página vazia não repete resultados. O segundo efeito foi integralmente revertido; o original permanece. +- **22 verificações de preparação** na base independente `c24bf87a54fd`/demo 8049: três funções, páginas, selecção de módulo, cookies separados e ausência de efeitos de negócio. Não foram emitidos comandos financeiros ou contabilísticos nessa base. + +Resultado da sequência HTTP: **uma obrigação de 60 MZN, um lançamento de débito 60/crédito 60, duas linhas e um evento de aplicação**. Repetir não duplica; o relatório financeiro continua com principal e saldo de 60 MZN. As consultas não liquidam a dívida. + +O primeiro diagnóstico HTTP completou a escrita, mas detectou um link de retorno em falta na página de consulta. Foi conservado em `01661f3f404d`; não foi resetado, repetido ou contado como prova aprovada. O link foi corrigido e a sequência final foi executada numa base nova. Uma preparação do teste adicional de foco detectou importações PHP ausentes no auxiliar, antes de criar o segundo efeito; corrigida, sem alterar o motor. Provas concluídas recusam sobrescrita. + +Reutilizados os ensaios anteriores: [núcleo contabilístico e concorrência](GENERAL_LEDGER_DELIVERY.md), [carga financeira 1.000/5.000/10.000 e páginas 25/100](SGF_PAYABLE_PAGED_READ_DELIVERY.md), [bloqueio de confirmações e leitura sem bloqueio](SGF_SETTLEMENT_READ_ISOLATION_DELIVERY.md), [fila administrativa, carga, concorrência e HTTP423](MODULE_ASSOCIATION_LOAD_CONSOLIDATION.md). Não se repetiram estas suites ou matrizes. Os manifestos anteriores permanecem intactos e têm hashes registados no novo manifesto. A sua fonte corresponde à versão ensaiada então; as alterações actuais de foco/ligação têm as provas novas acima. + +Não foram experimentados índices nem realizados benchmarks nesta entrega. Os resultados anteriores mantêm as suas condições: a leitura financeira por página ficou em 67 consultas; o relatório integral de 10.000 posições ainda levou cerca de 12,6 s no ensaio. Isso não é capacidade de implantação validada. O campo `flow_query_count` do auxiliar de isolamento contém todas as consultas observadas, incluindo as sondagens posteriores; **não é uma medição de custo isolado da página** e não é usado como benchmark. + +## Estado e limites concretos + +| Capacidade | Estado desta consolidação | +|---|---| +| Conferência financeira → obrigação → revisão → lançamento → extracto/posição | Percurso funcional sintético integrado, entregue e demonstrável em 8049 | +| Writer único, revisão distinta, concorrência, falha/recuperação e repetição | Núcleo anterior preservado; evidência anterior reutilizada, integração/foco novos provados | +| Fila administrativa, leitura conjunta, índices de ensaio e HTTP | Entrega anterior consolidada; seis pendentes não decididos | +| Compra viva → composição SGF → reconhecimento contabilístico | Não entregue por esta passagem; origem actual é recibo sintético | +| Contabilizar liquidações, estornar/corrigir lançamento e fechar/reabrir períodos | Excluídos do primeiro efeito autorizado; não implementados por arrasto | +| Composição contabilística autónoma SGC | Adaptador/instalação não entregues nem activados | +| Fiscalidade, contas reais, operações empresariais e implantação | Pendências de implantação separadas, sem novos acessos/migrações reais | +| Revisão visual e carga sustentada | Pendentes separadas; HTTP não substitui revisão visual | + +Novas concessões reais: zero. Direitos QA continuam os quatro já autorizados, seis concessões por fixture nova, sem herdar competências. Sem dependências novas, build público substituído, cache limpa, associação automática, activação de Compras, publicação, aceitação ou checkpoint. Assets já compilados e válidos foram copiados apenas entre storages privados; as mudanças novas são PHP/Blade, sem alteração React que exigisse repetir o build. + +## Reprodução sem afectar demos + +Node/PHP fixados no projecto. `scripts/ledger-run.mjs new sgf,ledger-flow-setup` cria outra base/role. Usar o tag retornado em `scripts/ledger-flow-http.mjs`, depois fases PHP `ledger-flow-cases` e `ledger-flow-focus-cases` de `scripts/payable-history-sgf-proof.php`. A base de regressão conserva o resultado; não a usar como demo vazio nem repetir a escrita. + +Para outra demonstração, provisionar **outra fixture**, copiar apenas os assets privados já verificados e executar `scripts/ledger-demo.mjs `, depois `scripts/ledger-flow-demo-check.mjs `. Credenciais/settings/cookies/logs permanecem na área privada. Nenhum script deve usar as bases empresariais ou a cache protegida. diff --git a/docs/SGF_INVOICE_MATCHING_PROGRESS.md b/docs/SGF_INVOICE_MATCHING_PROGRESS.md new file mode 100644 index 0000000..e2097bb --- /dev/null +++ b/docs/SGF_INVOICE_MATCHING_PROGRESS.md @@ -0,0 +1,42 @@ +# Quantidades para conferência da factura — 03/11/2026 + +`SGF-INVOICE-MATCHING-PROGRESS-QA-v1` acrescenta a leitura das quantidades por linha no percurso de factura de fornecedor: encomendado, aceite, devolvido, estornado, aceite líquido, facturado/validado, em documentos pendentes e restante para conferir. + +## Comportamento + +A indicação usa as quantidades físicas originais, as correcções já calculadas pelos serviços nativos e duas consultas agregadas por linha para recepções e facturas. A quantidade disponível é o menor valor entre encomendado e aceite líquido, deduzido apenas do validado, com mínimo zero. Divergência entre validado e origem é visível separadamente. + +**Pendentes não reservam quantidade.** Uma factura pendente acima do restante recebe uma indicação de divergência, sem ser eliminada, alterada ou considerada validada. A permissão de conferência distinta permanece a original: não é promessa de que a validação nativa vá aceitar o documento. Nenhuma quantidade é escolhida ou preenchida automaticamente. + +O formulário apresenta o restante junto à linha escolhida e continua a exigir os dados e fundamento do documento. Preparação, validação, consumo orçamental, versões e idempotência permanecem nos serviços anteriores. Não há nova reserva, factura, obrigação, pagamento, movimento ou lançamento automático. + +O estado da ordem é observado uma vez para o detalhe e para a sua revisão, antes de acrescentar as capacidades de interface; a chamada repetida foi removida. A definição do estado e os blocos `preview`/`confirm` mantêm-se iguais. A equivalência da revisão foi conferida contra esse estado original. O histórico da factura passa também a ignorar respostas atrasadas de páginas anteriormente pedidas. + +O novo detalhe fica desligado por omissão em `receipt_qa.invoice_progress_enabled`; reutiliza os direitos e isolamento da consulta de facturas, sem direitos novos. + +## Provas sem repetir comandos financeiros + +[Consolidação técnica](proofs/invoice-matching-progress-20261103.json): **47 verificações**, sendo14 de origem disponível,16 do caso parcial já concluído,11 de lógica da interface e seis da demonstração. + +Foram criadas aplicações de leitura novas sobre dois livros QA existentes, sem repetir emissão, recepção, facturas, validações ou reconhecimento: + +- `invoice-progress-read-e286efd6035f` reutiliza `ce4c9bef1a51`: ordem/aceitação1UN, nenhuma factura; restante1000milésimos. +- `invoice-progress-read-34534a38acd7` reutiliza `da77bb730751`: facturas40+60 validadas, restante zero, documento70 ainda pendente e700milésimos visíveis separadamente. + +Os conjuntos de tabelas e sequências de ambos os livros ficaram integralmente iguais antes/depois. Inclui recusas para Compras/Armazém, ordem estrangeira/desconhecida, unidade diferente e contexto antigo; modo desligado e equivalência da revisão. Os limites aritméticos com devolução/estorno e tecto da ordem foram ensaiados sem executar novas correcções físicas. + +A interface simulada comprova três casas decimais exactas, recusa de valores fora da representação inteira segura, diferença explícita, aviso apenas para pendentes, ausência de reserva implícita/preenchimento automático, ligação ao módulo efectivo e abertura apenas GET. Uma resposta atrasada do histórico deixa de substituir a página mais recentemente solicitada. + +Verificação final: sintaxe de sete ficheiros PHP e nove JavaScript aprovada; `git diff --check` sem erros de espaços. Inventário/matriz actualizados: seis módulos,13 etapas,89 fontes, zero ciclos obrigatórios e138 critérios documentais conferidos. Estes totais não são validação operacional dos módulos completos. + +## Demonstração e preservação + +Nova composição `9ec0a8e493ea`, [**8081 — Finanças**](http://127.0.0.1:8081/qa/enter/issuer?open=1), sem requisições/facturas principais iniciais. Conserva o percurso, anexos, histórico detalhado e atalhos anteriores. Probes de leitura preservaram os dados de requisição/factura/auditoria e concessões seleccionados; os módulos estáticos servidos coincidem com o código por SHA. + +8080 e anteriores, seis registos protegidos, cache bloqueada, provas válidas e trabalho alheio preservados. Nenhuma migração/concessão real, activação de Compras, publicação, aceitação ou checkpoint. + +## Limitações + +A leitura agregada nova não elimina a materialização do estado completo de dependências para a revisão da ordem. A lista de facturas e as verificações de capacidade continuam a ter os limites anteriores; retirar a observação duplicada não comprova ganho de tempo/memória ou capacidade de implantação. Não foram repetidas medições de1000/5000/10000 ou ensaiados índices nesta entrega. + +Os livros usados têm uma linha de ordem e os casos de facturação existentes. As fronteiras de devoluções/estornos são verificações aritméticas; as suites físicas completas mantêm a sua evidência própria. Não se introduz rejeição/correcção de factura ou nota de crédito. O DOM simulado não é revisão visual/acessibilidade no navegador. Não foi repetida a via bloqueada de navegador nem o build React/Vite inalterado: verificaram-se os módulos ES estáticos afectados. Visual, carga sustentada, instalação e capacidade de implantação continuam pendentes. diff --git a/docs/SGF_INVOICE_TO_PAYABLE_DELIVERY.md b/docs/SGF_INVOICE_TO_PAYABLE_DELIVERY.md new file mode 100644 index 0000000..af696e6 --- /dev/null +++ b/docs/SGF_INVOICE_TO_PAYABLE_DELIVERY.md @@ -0,0 +1,45 @@ +# Factura conferida → obrigação única na interface SGF + +03/11/2026. `SGF-INVOICE-TO-PAYABLE-QA-v1`. Entrega local funcional: preparação explícita de uma fotografia da factura, prévia do impacto e reconhecimento por pessoa distinta, no mesmo livro nativo usado pela factura. Reutiliza `SupplierPayables` original e `packages/payables`; não importa uma cópia para o host nem cria outro escritor de dívida. + +## Experimentar em8071 + +1. [Compras](http://127.0.0.1:8071/qa/enter/actor?open=1): emitir a ordem da adjudicação QA preparada. +2. [Armazém](http://127.0.0.1:8071/qa/enter/validator?open=1): receber1UN, aceite e conforme, para o artigo/armazém QA. +3. [Finanças — documento](http://127.0.0.1:8071/qa/enter/issuer?open=1): registar factura100MZN, base100, imposto0 e quantidade1UN. +4. [Finanças — conferência distinta](http://127.0.0.1:8071/qa/enter/reviewer?open=1): validar a factura pelo workflow original. Consome o compromisso existente; não reconhece automaticamente uma obrigação. +5. [Preparação da obrigação](http://127.0.0.1:8071/qa/enter/issuer?open=1&obligations=1): seleccionar a factura, fundamentar, conferir impacto e confirmar a preparação. +6. [Reconhecimento distinto](http://127.0.0.1:8071/qa/enter/reviewer?open=1&obligations=1): conferir a proposta exacta, fundamentar, ver impacto e confirmar. [Outra identidade QA](http://127.0.0.1:8071/qa/enter/auditor?open=1&obligations=1) permite conferência independente. + +A demonstração começa sem ordens principais, recepções, facturas, propostas ou obrigações; não contém decisões tomadas pela equipa. Tem uma adjudicação aprovada/reserva100MZN preparada, orçamento QA1000MZN e uma ordem estrangeira apenas para isolamento. O ensaio de integração usou outra base nova. Portas8070/8069/anteriores não foram actualizadas. + +## Implementação e fronteiras + +- `/purchasing/obligations` e `/api/purchasing-obligations`: lista com pesquisa literal por número, estado documental, ordenação por ID e páginas25 no servidor. Documento individual apresenta origem/linhas, pendências, propostas, principal/saldo do núcleo e eventos, com páginas independentes25 para propostas/histórico. +- A conferência corrente lê a origem actual, a última captura, a responsabilidade existente e a identidade/permissões nativas; não materializa todo o universo de facturas ou o histórico completo de propostas. +- `ReceiptRuntime` mantém isolamento de empresa/unidade/origem e os bloqueios administrativos existentes. Os endpoints pertencem expressamente a Compras; o módulo Comercial não lhes dá acesso. A identidade de fonte é a mesma `qa-stock-ledger-` da preparação nativa e está fixada na ligação. Alterá-la recusa acesso; não abre outro saldo. +- Preparação incompleta fica `pending_source`. Preparar não reconhece dívida. A validação exige conta **e pessoa** distintas; não basta usar outra conta da mesma pessoa. Origem insuficiente ou incompatível permanece preservada, sem segunda obrigação. +- Prévia executa o mesmo comando num savepoint e reverte integralmente; sequências podem avançar. IDs temporários não são apresentados como factos persistidos. O corte cifrado prende actor, pessoa, documento, versão, contexto de sessão, ligação e validade10minutos. +- Confirmar volta a validar permissões, contexto, versão e fonte. O comando do núcleo guarda idempotência, propostas, obrigação, eventos/outbox; a proveniência SGF/fundamento/anterior/posterior entra na mesma transacção nativa. Falha de auditoria reverte tudo. Uma repetição chama novamente o núcleo e verifica elegibilidade actual, em vez de tratar um recibo histórico como autorização de nova execução. +- Principal100MZN reconhecido uma vez, saldo100MZN. Vencimento `null`, atraso indeterminado: o texto de condições comerciais não inventa uma data. O reconhecimento não repete consumo orçamental, movimento físico, pagamento ou lançamento contabilístico. +- Direitos `purchasing_obligations.view/prepare/validate` e correspondentes direitos do núcleo só nas novas fixtures55439. Configuração desligada por omissão; catálogo público e concessões reais intactos. Não foi activada importação histórica. + +## Provas + +[Prova consolidada](proofs/supplier-obligation-composition-20261103.json): **72 verificações** — integração35, repetição com origem alterada3, fronteiras6, guardas6, navegação6, demonstração13 e build/assets3. PHP/JavaScript verificados separadamente. As35 provas funcionais precederam a regra adicional de pertença modular; as6 provas posteriores testaram a fronteira alterada, preservando os factos financeiros, sem repetir a suite válida. + +O percurso real de teste emitiu ordem, recebeu material, registou documento pendente e validou-o pelo serviço original. Captura pendente não reconheceu; mudança efectiva para factura validada recusou a prévia antiga e exigiu nova captura. Dois pedidos simultâneos da mesma preparação deram201/200; dois validadores concorrentes deram201/409. Falha forçada na auditoria reverteu obrigação/comando/eventos/outbox, e a operação seguinte recuperou. Houve um só evento de reconhecimento. + +Revogação de direitos no host e no núcleo, conta da mesma pessoa, contexto de unidade/módulo, geração de sessão, ligação alterada e identidade de fonte divergente foram recusados. A prova adicional de repetição usa o adaptador original e injecção adversarial de um marcador de validação **apenas dentro de transacção revertida**; não é uma segunda validação comercial. Recusou origem alterada e preservou exactamente o principal e a evidência anteriores. + +As77 verificações anteriores de facturas e83 de geografia foram reutilizadas como provas anteriores preservadas, sem nova execução nem recontagem como testes deste incremento. Sem leitura da base de destino, alteração dos seis registos, limpeza da cache bloqueada, alteração de demos antigas, publicação, aceitação ou checkpoint. + +A [conferência actualizada da matriz](proofs/invoice-payable-matrix-20261103.json) mantém seis módulos,13estágios e98critérios documentados. A [inspecção estática do fluxo](proofs/invoice-payable-flow-inspection-20261103.json) encontra67fontes e nenhum ciclo obrigatório; não constitui teste operacional adicional. Passaram17 verificações de sintaxe PHP,8 de JavaScript e `git diff --check`. + +## Limitações que continuam abertas + +Revisão visual não realizada; não se repetiu o navegador bloqueado. Carga sustentada, implantação geral e separação de proprietário/runtime não estão validadas por estes ensaios. O schema sintético é preparado pelo projecto nativo actual, mas o runtime continua fixado ao pacote anteriormente provado; isto não demonstra compatibilidade de instalação no destino. + +Pagamento/afectação, histórico importado, reconciliação e contabilização desta nova origem continuam passos próprios. Não há ligação automática ao percurso histórico de11600MZN nem declaração de passagem de responsabilidade de dívidas reais. Correcção/rejeição/notas de crédito e anexos binários de facturas conservam as limitações anteriores. + +A demo8071 parte de adjudicação QA preparada. Requisições/propostas/geografia já entregues mantêm demonstrações separadas; ainda não se declara uma instalação única que reúna todas essas fixtures. A aplicação completa e a capacidade de implantação não são declaradas concluídas por este incremento. diff --git a/docs/SGF_MODULE_FLOW_PREPARATION.md b/docs/SGF_MODULE_FLOW_PREPARATION.md index b4f4fb9..fe78c8d 100644 --- a/docs/SGF_MODULE_FLOW_PREPARATION.md +++ b/docs/SGF_MODULE_FLOW_PREPARATION.md @@ -1,5 +1,33 @@ # Preparação dos módulos e do fluxo integrado SGF +**Compras concluído no percurso local acordado —04/11/2026:** [C01–C10 na instalação existente8085](PURCHASING_COMPLETION.md), entrada única `/compras`, fornecedor novo até obrigação100MZN, com decisões distintas e movimento1UN. Não criar novas demonstrações por continuação. As referências antigas de instalações abaixo são históricas. Esta conclusão funcional local não equivale a implantação empresarial, pagamentos/contabilidade dessa origem ou aceitação visual. + +**Stock valorizado sintético entregue:** [entrada100/saída50/devolução25 no mesmo núcleo e consulta SGF SELECT-only](GENERAL_LEDGER_STOCK_VALUATION_DELIVERY.md). Fonte física original, taxa/revisão distintas, sequência e guardas SQL, relatórios/fecho QA; sem duplicar custos ou instalar no destino. Revisão visual/carga sustentada/implantação permanecem separadas. + +**Conferência de03/11/2026:** [matriz × código × provas e pendências reais](MODULE_IMPLEMENTATION_AUDIT.md). As notas datadas abaixo são históricas: o primeiro motor contabilístico e os ciclos QA aprovados já foram entregues. A matriz reconciliada distingue esses percursos de composição operacional, revisão visual e implantação ainda pendentes. + +**Correcção industrial autorizada e entregue:** [par1800→1820, residual300 separado, relatórios e fecho conjunto](GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md). Guardas SQL dos três domínios correctivos preservadas, origens tipadas, versões/direitos/concorrência verificados. Demo8059 nova, sem correcção inicial;8058 intacta. Sem cadeias adicionais, período fechado/reabertura, stock/salários ou implantação validada. + +Continuação de leitura financeira: [perfilagem e captura validada por janela](SGF_PAYABLE_REPORT_CAPTURE_DELIVERY.md), sem novo efeito. Conteúdo financeiro equivalente em10.000 posições; melhoria local observada22,0→12,9s, ainda com gargalo. Comandos, permissões, provas/demos/seis registos/cache preservados; estatísticas alteradas apenas na cópia QA, sem índices ou destino. + +**Ligação industrial autorizada e implementada:** [resultado1800/10UN, residual300 separado, diário/relatórios/fecho conjunto](GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md). Mesmo escritor, origem tipada estável, versões/direitos e concorrência verificadas; demo8058 própria sem lançamento industrial inicial. Sem stock valorizado, salários, correcção industrial ou reabertura. Preservadas8057 e anteriores; revisão visual, carga sustentada e implantação separadas. + +**Composição financeira integrada entregue:** [vendas/recebíveis, fornecedor e correcção de custo no mesmo livro e período QA](GENERAL_LEDGER_COMPOSITION_DELIVERY.md). Painéis paginados por origem, direitos próprios e fecho conjunto revalidado; demo8057 sem decisões iniciais consumidas. Provas e demos anteriores preservadas. Lote/CIF industrial contabilizado exige a decisão do [recorte seguinte](GENERAL_LEDGER_INDUSTRIAL_SCOPE.md), ainda só proposto. + +**Correcção de custo seleccionada concluída no âmbito autorizado:** [par275→295, relatórios e fecho QA](GENERAL_LEDGER_DIRECT_COST_CORRECTION_DELIVERY.md), núcleo único, quatro linhas atómicas e SQL contra partes isoladas. Provas de versões/concorrência e coexistência com correcções de fornecedor no mesmo livro; fontes/outbox preservadas. Demo8055 separada;8054 mantém o modo anterior. Não declara reabertura, cadeias adicionais de revalorização, stock/salários ou implantação concluídos. + +**Ligação de custo directo autorizada e implementada:** [oficina → custo directo275 → diário/relatórios/fecho QA](GENERAL_LEDGER_DIRECT_COST_DELIVERY.md). Mesmos workflows técnicos/custos e writer; identidade estável por ordem/perímetro, incompletude/versões/concorrência verificadas. Demo8054 própria, sem decisões contabilísticas iniciais. Não abrange valorização de stock, salários, correcção de custo já lançado ou uma instalação operacional completa dos seis módulos. + +**Continuação de consulta integrada concluída:** [balancete e razão por conta SGF/SGC](GENERAL_LEDGER_REPORTS_DELIVERY.md), abertura/movimentos/fecho por datas, páginas25/100, saldo acumulado e fontes ligadas. Reconciliação só de leitura dos ciclos de vendas, reversão/correcção de fornecedor e coexistência cliente/fornecedor, sem repetir escritas. Não autoriza contabilidade de stock/custos/salários nem declara relatórios fiscais ou implantação concluídos. + +**Continuação de 03/11/2026 concluída no recorte autorizado:** [Comercial → Recebíveis → Contabilidade](GENERAL_LEDGER_SALES_RECEIVABLE_DELIVERY.md), emissão efectiva de teste1.000, reconhecimento de três linhas, afectações400/600, reversão400 e fecho QA. Fornecedores preservados no mesmo writer; IDs de origens de cliente/fornecedor explicitamente separados e fecho conjunto comprovado. Nova demonstração8053, sem efeitos financeiros iniciais. As descrições históricas de vendas/recebimentos ainda sem contabilização ficam superadas apenas neste ciclo sintético; outras origens, revisão visual, carga sustentada e implantação permanecem separadas. + +**Continuação posterior autorizada e concluída:** [ciclo contabilístico sintético nas duas composições](GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md), com afectação/reversão20, par correctivo integral e fecho QA sobre reconhecimento60. Demos próprias SGF8050/SGC8051, sem tocar instalações anteriores. Esta entrega substitui apenas as indicações históricas abaixo de composição nativa/correcção/fecho ainda não implementados no recorte sintético; uso real, outras origens, revisão visual e implantação continuam separados. [Inventário estático actualizado](proofs/module-flow-ledger-cycle-update-20261102.json): seis módulos,13etapas,29fontes,zero ciclos obrigatórios e nenhuma ligação à base; não constitui prova de integração operacional. + +Continuação contabilística autorizada e implementada: [primeiro lançamento sintético de obrigação reconhecida](GENERAL_LEDGER_DELIVERY.md), núcleo único, duas contas/período artificiais, conferência distinta e aplicação única. Oito cenários/74 asserções, concorrência real e 23 verificações HTTP; não declara contabilidade operacional, composição nativa ou implantação. + +Estado financeiro mais recente: [consulta de liquidação SGF separada dos bloqueios de escrita](SGF_SETTLEMENT_READ_ISOLATION_DELIVERY.md), sobre o [histórico de pagamentos/afectações paginado](SGF_SETTLEMENT_PAGED_READ_DELIVERY.md) e a [conferência ligada à origem](SGF_PAYABLE_EVIDENCE_FOCUS_DELIVERY.md). Preserva o motor de posição e a autoridade de escrita. As medições de documentos em 1.000/5.000/10.000 e de pagamentos em 1.000 são ensaios distintos; não declaram cutover operacional, Financeiro completo ou implantação. + Continuação financeira SGF: [recibo histórico de Compras para o núcleo comum](SGF_PAYABLE_HISTORY_RECEIPT_DELIVERY.md), implementado somente em bases novas de ensaio, com 10 cenários/56 asserções e 17 verificações HTTP. A fotografia histórica não constitui fonte viva, cutover operacional ou Financeiro completo; mantém paginação/carga financeira e implantação pendentes. Continuação SGF mais recente: [encerramento individual de propostas Oficina → Stock](WORKSHOP_STOCK_PROPOSAL_CLOSURE.md), com retirada/recusa sem efeito físico e protecção contra confirmação concorrente. Não encerra as etapas financeiras/contabilísticas ainda em falta ou as pendências de implantação/visuais. @@ -21,7 +49,7 @@ Reutiliza o [plano de núcleo comum](PURCHASING_COMMON_CORE_PLAN.md), a [demonst | Oficinas | Ordem/autorização, apontamentos verificados, custo e conversão comercial existentes | Ligar consumo físico por origem e versão, sem transformar observações anteriores em movimentos | | Comercial | Cadastro, rascunhos, B1, cálculos e emissão/PDF de teste | Preservar revisão comercial e origens; completar ligações e validação fiscal própria antes de uso real | | Financeiro | Núcleos comuns de orçamento e obrigações; recebimentos, pagamentos/afectações e reversões sintéticos | Compor os percursos, delimitar reconciliação e fontes históricas; não criar um segundo saldo | -| Contabilidade | Classificação, perfis fiscais e menus | Motor de lançamentos, períodos, razão, fecho e relatórios com fontes rastreáveis; implementação ainda em falta | +| Contabilidade | Classificação/perfis/menus e primeiro núcleo de lançamento sintético por obrigação | Primeiro diário/extracto QA entregue; contas/reconhecimento reais, composição nativa, correcções, fecho e relatórios gerais continuam por delimitar/implementar | **Actualização importante face ao menu antigo de Stock:** a inspecção actual encontrou código de lotes, contagens, devoluções/abates, reservas e estornos em Compras. A ausência dessas ligações no SGF não significa ausência na origem. Os hashes e caminhos estão no [inventário de preparação](proofs/module-flow-preparation-20261102.json). São evidência de existência de fonte, **não prova de execução, cobertura integral ou activação dessas capacidades**. A extracção deverá seguir essas dependências, não copiar apenas `StockWorkflow` isoladamente ou reconstruir funcionalidades já existentes. @@ -119,3 +147,25 @@ Executar com o Node fixado: `C:/laragon/tools/sgf-tempo/node-v24.22.1-win-arm64/ Não se alteraram rotas, navegação, motores, configurações, dependências, schema ou direitos. Não se consultaram bases, manifestos privados ou credenciais. Os seis registos protegidos, a cache bloqueada, 8039 e outras demonstrações foram preservados. Compras foi lido apenas como fonte; sem alteração/activação de candidata. Sem publicação, push, checkpoint ou aceitação presumidos. **Pendências independentes:** implementação das ligações delimitadas; provas funcionais por incremento; revisão visual; validação de capacidade/implantação; decisões individuais das seis associações. O inventário de fontes não encerra nenhuma delas. + +## 02/11/2026 — consulta financeira nativa ligada em QA + +[Consulta paginada SGC](NATIVE_PAYABLE_PAGED_READ_DELIVERY.md): facturas/pagamentos/auditorias nativos, dependências conjuntas por página e motor financeiro comum.9testes/113asserções,26casos afectados/183asserções e18verificaçõesHTTP; medições1.000/5.000/10.000 disponíveis. Fonte histórica viva somente nativa QA; SGF mantém recibo de ensaio. Flag nativa false e pacote instalado preservado. Sem activação/cutover, aceitação presumida, publicação ou alteração dos seis registos/cache. Revisão visual, carga sustentada e implantação separadas. + +## 02/11/2026 — conferência da origem e selecção financeira ligadas + +A [conferência financeira por origem](SGF_PAYABLE_EVIDENCE_FOCUS_DELIVERY.md) permite abrir documento/posição/propostas/eventos fora da primeira página e conservar o foco na ligação à selecção para pagamentos. Corrigida a selecção de obrigações que ficava limitada à primeira página, e a evidência documental passou a usar a proposta exacta do reconhecimento, independentemente das versões visíveis. Cinco cenários/34 asserções, integração dirigida/18 asserções e 20 verificações HTTP da conferência por origem. Nenhum pagamento ou afectação criado; fingerprint financeiro anterior integralmente preservado. O livro de pagamentos mantém a consulta própria, ainda sem paginação; não confundir este incremento com ligação histórica SGF viva, cutover, contabilidade ou implantação. Revisão visual e carga sustentada continuam separadas. Seis registos e cache preservados. + +## 02/11/2026 — histórico de liquidação SGF paginado + +[Pagamentos e afectações paginados](SGF_SETTLEMENT_PAGED_READ_DELIVERY.md): quatro janelas para pagamentos/propostas/afectações/eventos, filtros pelos pagamentos antes da contagem e leitura conjunta de decisões/reversões. Montantes por afectar consideram todo o histórico, independentemente da janela. Filhos ligam ao pagamento e à origem reconhecida; filtros de documentos e de pagamentos permanecem distintos. Seis cenários/53 asserções, 29 verificações HTTP e complemento de navegação. Em 1.000 pagamentos sintéticos: 3.038 → 35 consultas, sem índices novos. Não substitui os ensaios de 1.000/5.000/10.000 documentos. Bloqueios de autorização existentes mantidos; concorrência sustentada, revisão visual e implantação não validadas. Fonte histórica SGF viva/cutover, banco/reconciliação e contabilidade continuam separados. Demos, seis registos/cache e direitos reais preservados; composição nativa instalada não activada. + +## 02/11/2026 — consulta de liquidação com autorização própria de leitura + +[Leitura financeira SGF sem bloquear empresa/actor](SGF_SETTLEMENT_READ_ISOLATION_DELIVERY.md): callback exclusivo para consulta paginada, fotografia REPEATABLE READ READ ONLY por pedido, comandos e construtores antigos conservados. Quatro cenários/23 asserções e 11 verificações HTTP dirigidas. Três processos comprovaram: leitor conclui antes da libertação, leitura antiga e confirmação aguardam em companies FOR UPDATE (cadeia directa ou pela fila), confirmação posterior/repetição com um único efeito; todas as alterações revertidas. Fingerprint financeiro e artefactos das provas anteriores preservados. Não repetir benchmarks válidos nem confundir esta espera com medição de throughput/capacidade. Composição nativa instalada, seis registos/cache e demos intactos. Revisão visual, implantação e capacidades financeiras ainda não entregues continuam separadas. + +## 02/11/2026 — livro financeiro ligado ao relatório e fronteira contabilística + +[Relatório de obrigações reconhecidas](SGF_PAYABLE_REPORT_DELIVERY.md) implementado: filtros/âmbito comuns, captura coerente, todas as posições em janelas de 100, componentes reconciliados e saldo global indeterminado quando existe evidência divergente. Primeiro percurso completo de relatório do domínio financeiro; não razão/balancete. 10.000 posições com conteúdo igual antes/depois da optimização, 6.607 → 2.313 consultas, 19,1 → 12,6 s, 34 → 32 MiB. Tempo residual continua limitação e requer perfilagem; sem índices novos ou capacidade de implantação declarada. Três cenários finais/17 asserções, livro de afectações reconciliado e 17 verificações HTTP; provas e fingerprints anteriores preservados. + +O primeiro lançamento exige decisão própria: [COMMON-LEDGER-PAYABLE-SIM-v1](GENERAL_LEDGER_FIRST_SYNTHETIC_SCOPE.md), principal 60 MZN, duas contas e período artificiais, preparação/revisão distintas, aplicação atómica/única, quatro direitos exclusivamente na fixture QA. Está apenas especificado, sem motor/schema/direitos/lançamentos implementados, por preservar a exclusão de lançamentos por arrasto do AGENTS.md. Não antecipar autorização, aceitação, checkpoint, activação de Compras ou publicação. Seis registos/cache/demos intactos; revisão visual e implantação separadas. diff --git a/docs/SGF_OBLIGATION_EVIDENCE_WORKSPACE.md b/docs/SGF_OBLIGATION_EVIDENCE_WORKSPACE.md new file mode 100644 index 0000000..dcd4981 --- /dev/null +++ b/docs/SGF_OBLIGATION_EVIDENCE_WORKSPACE.md @@ -0,0 +1,31 @@ +# Evidência e decisão individual da obrigação — 03/11/2026 + +`SGF-OBLIGATION-EVIDENCE-WORKSPACE-QA-v1` separa a paginação da evidência do formulário de decisão. Consultar outra página de propostas ou eventos deixa de reconstruir o ecrã e apagar o fundamento/prévia preparados. + +## Comportamento + +O utilizador selecciona explicitamente uma proposta para conferência. O seu formulário permanece numa área própria, mesmo que a proposta deixe de estar na página visível. Voltar a seleccionar a mesma proposta não reinicia o fundamento. Seleccionar outra proposta inicia intencionalmente uma decisão distinta; não existe escolha automática da primeira proposta. + +Propostas e histórico mantêm as páginas pretendidas independentemente. As respostas atrasadas são ignoradas, evitando que uma consulta antiga faça outra área regressar à página anterior. A paginação só consulta o endpoint existente; não prepara, reconhece ou duplica uma obrigação. + +Uma nova leitura que observe revisão, actor ou permissões diferentes desactiva as conferências antigas e pede actualização explícita. O fundamento permanece visível. Uma prévia atrasada não volta a activar o formulário desactualizado nem permite confirmar por esse formulário. Não se muda de proposta durante uma operação em curso. Falhas transitórias de leitura permitem repetir a consulta sem perder o fundamento; recusas de acesso/contexto exigem nova conferência. + +A confirmação efectiva continua no controlador/runtime/núcleo comuns, com as validações actuais completas. Esses três ficheiros foram comparados por SHA e permanecem iguais aos de8081. Não existem direitos, escritores ou endpoints financeiros novos. O bloco legado de apresentação foi preservado; a nova área usa `receipt_qa.obligation_evidence_enabled`, desligada por omissão. + +## Provas + +[Consolidação](proofs/obligation-evidence-workspace-20261103.json): **26 verificações novas** —20 de lógica da interface e seis da demonstração. As72 verificações válidas do [reconhecimento nativo](proofs/supplier-obligation-composition-20261103.json) foram reutilizadas, não repetidas nem somadas às26. + +Os testes usam o componente e o módulo efectivo com DOM/respostas simuladas: selecção individual, fundamento/prévia preservados, mudança explícita de proposta, pares de páginas, resposta antiga, revisão/permissão diferente, acesso recusado, erro transitório, proponente sem revisão própria, obrigação já reconhecida, operação em curso e prévia pendente que chega depois de a origem mudar. Nesse último caso não é enviado um pedido de confirmação pelo formulário obsoleto. + +Os probes HTTP da demonstração conferem autorização, flag activa, lista inicial vazia, módulos servidos por SHA e preservação de propostas/obrigações/eventos/auditoria/concessões. Não se afirma nova confirmação financeira real por esta prova de interface. O dispatcher do launcher foi ajustado para reconhecer o resultado desta nova prova, preservando as seis verificações já terminadas, sem as repetir. + +Verificação final: sintaxe de três ficheiros PHP e oito JavaScript aprovada; `git diff --check` sem erros de espaços. Inventário/matriz actualizados: seis módulos,13 etapas,90 fontes, zero ciclos obrigatórios e140 critérios documentais conferidos. Estes totais não são testes operacionais adicionais ou validação da aplicação completa. + +## Demonstração e limites + +Nova composição `f3ce5f53dab4`, [**8082 — Finanças**](http://127.0.0.1:8082/qa/enter/issuer?open=1), sem operações principais, propostas ou obrigações iniciais. Conserva os percursos, quantidades de conferência, histórico detalhado, anexos e atalhos anteriores. + +8081 e anteriores, seis registos protegidos, cache bloqueada, provas e trabalho alheio preservados. Sem migração/concessão real, activação de Compras, publicação, aceitação ou checkpoint. + +O teste de decisões persistentes/idempotência mantém a prova nativa anterior, com a mesma autoridade. Os novos testes de persistência do formulário e respostas atrasadas são simulações de interface, não revisão visual, acessibilidade ou nova validação financeira. Actualizar a origem inicia novas conferências; o formulário antigo não é reaplicado automaticamente. O novo painel não é optimização de carga do backend nem novo protocolo de paginação. Visual, carga sustentada, instalação e capacidade de implantação continuam pendentes. diff --git a/docs/SGF_ORDER_TO_RECEIPT_DELIVERY.md b/docs/SGF_ORDER_TO_RECEIPT_DELIVERY.md new file mode 100644 index 0000000..fd7fd78 --- /dev/null +++ b/docs/SGF_ORDER_TO_RECEIPT_DELIVERY.md @@ -0,0 +1,55 @@ +# Ordens de compra e recepção no SGF — bloco funcional QA + +03/11/2026. Entregue o percurso **adjudicação aprovada → conferência da ordem → emissão única → recepção por Armazém → movimento físico → histórico**, na mesma composição SGF sintética. O fornecedor e as condições já aprovadas não são redigitados ou escolhidos automaticamente pela interface. + +## Experimentar + +Nova demonstração em8065, sem ordem emitida, compromisso, recepção ou movimento iniciais. A adjudicação sintética de100MZN, 1UN, imposto zero, foi preparada e aprovada distintamente pelos workflows originais. O orçamento canónico tem100MZN reservados; a emissão ainda depende da decisão individual. + +- [Compras — conferir e emitir](http://127.0.0.1:8065/qa/enter/actor?open=1). +- [Armazém — receber depois da emissão](http://127.0.0.1:8065/qa/enter/validator?open=1). +- [Consulta da adjudicação e aprovações](http://127.0.0.1:8065/qa/enter/issuer?open=1), sem emissão. + +Em Compras, abrir a adjudicação, conferir fornecedor, montante, linhas, entrega e aprovações; abrir o impacto e emitir explicitamente. A fotografia original passa a estar disponível e a acção de emissão desaparece. Repetir uma resposta perdida recupera a mesma ordem. + +Entrar depois como Armazém, abrir a ordem em Recepção, preencher guia/data, escolher o armazém e o artigo QA, marcar a linha e indicar1.000 recebida/aceite, qualidade Conforme. Conferir e confirmar. O histórico referencia a ordem efectivamente emitida e o único movimento físico. O emissor não recebe a própria ordem; Armazém não emite ordens. + +Estes links de entrada só existem no launcher privado de loopback. A8064 e anteriores permanecem disponíveis no seu âmbito original, sem reset ou substituição. A8065 usa bases, cookie e armazenamento próprios. + +## Código funcional + +`OrderController` reutiliza `PurchaseWorkflow::canIssue/issue`, `ProposalComparison`, políticas e orçamento originais. Reutiliza também a composição local já entregue para recepções. Não se criou outro motor de selecção, pontuação, orçamento ou stock. + +A composição com namespace próprio conserva o pacote original de modelos/serviços. As duas dependências económicas efectivamente usadas, `ProposalScoring` e `QuotationPricing`, são carregadas byte a byte da fonte original, com manifesto separado e recusa de versão incompatível; não se altera o pacote de Compras instalado. A primeira tentativa revelou esta dependência em falta antes de qualquer emissão e foi preservada. Após a ligação exacta, o percurso integrado passou. + +O host exige `purchasing_orders.view` ou `.issue`, direitos explícitos de unidade criados somente nas fixtures QA. A política nativa também permanece obrigatória: consulta por funções elegíveis, emissão por Procurement, validação actual de aprovações, conflitos, propostas, fornecedor, montantes e orçamento. Direitos de recepção são distintos. O catálogo/concessões públicos não foram alargados. + +A prévia cifrada vincula operador, contexto, adjudicação, revisão dos dados e versões da composição/bibliotecas, com prazo de dez minutos. Na confirmação, a revisão é recalculada e o workflow original revalida a emissão. O documento, linhas, compromisso e auditorias original/SGF pertencem à mesma transacção nativa. Falhar a proveniência desfaz toda a operação. Repetições devolvem a fotografia emitida, sem criar outra ordem ou compromisso. + +A unidade SGF está ligada explicitamente à requisição/adjudicação de origem e ao armazém. Uma ordem criada dessa requisição torna-se elegível para a recepção nesse mesmo contexto; não depende de editar depois uma lista de IDs. Isto não associa registos antigos a módulos nem procura equivalências por números ou nomes. + +O compromisso pertence exclusivamente ao orçamento canónico da origem. Não é duplicado no orçamento do host SGF; as concessões orçamentais auxiliares da fixture do host foram retiradas por não pertencerem a este bloco. A passagem de uma requisição SGF para a adjudicação nativa ainda precisa do seu contrato próprio. O campo legado `budget_checked=false` do snapshot original não foi reescrito: a evidência efectiva está em `budget_control` e no compromisso canónico provado. + +## Verificação do bloco + +[Manifesto, provas e hashes](proofs/order-composition-20261103.json):49 verificações de auxiliares, sem contar como49 percursos de negócio independentes. + +| Grupo | Verificações | Resultado | +| --- | ---: | --- | +| Percurso integrado HTTP |28| Consulta/prévia, controlo de funções, fonte alterada, permissões revogadas, aprovação inelegível, falha/rollback, dois workers, ordem/compromisso únicos, recepção e histórico | +| Guardas de activação |3| Desligado e produção recusam antes de SQL | +| Demonstração sem consumir decisões |9| Perfis exactos, páginas/scripts e fingerprint canónico preservado; zero ordens, compromissos e movimentos | +| Navegação React |6| Capacidade, direito, unidade, desligado e preservação da ligação de recepções | +| Build privado servido |3| Página inicial e assets JS/CSS correspondem ao build | + +Na regressão, uma falha injectada na auditoria SGF deixou ordens, linhas, compromisso e auditoria exactamente no estado anterior. Retirada a causa, dois workers/sessões independentes obtiveram201/200 para a mesma emissão. Ficaram uma ordem, um compromisso100MZN e uma auditoria de cada tipo. A recepção posterior criou um só movimento de1UN e completou a ordem, sem factura ou consumo orçamental por arrasto. + +Foram usadas as provas anteriores de recepções e dos motores comuns. A validação nova concentra-se nas fronteiras alteradas e no percurso completo; não foram repetidas suites gerais, avaliações de carga ou provas da fila administrativa. + +## Limites e preservação + +O bloco parte de uma adjudicação efectivamente aprovada em fixture. A interface SGF de propostas, selecção e aprovação de adjudicações não está entregue por este incremento; não se inventam aprovações para emitir. A demonstração também não é uma instalação operacional de todo o procurement nem uma validação de fiscalidade real. + +Revisão visual, carga sustentada, implantação e separação SQL owner/runtime continuam pendentes. As roles novas são proprietárias apenas das suas bases QA. Não há prova de execução Octane com workers persistentes. O selector de artigos da recepção mantém o limite conhecido de100 itens. + +Configuração de ordens desligada por defeito; activá-la não dispensa a guarda integral QA. Sem publicação, activação de Compras no destino, contas/acessos reais, pagamentos, contabilização, alteração da ligação stock–custos ou checkpoint. Seis registos protegidos, cache bloqueada, demonstrações/provas válidas e trabalho alheio preservados. diff --git a/docs/SGF_PAYABLE_EVIDENCE_FOCUS_DELIVERY.md b/docs/SGF_PAYABLE_EVIDENCE_FOCUS_DELIVERY.md new file mode 100644 index 0000000..7b5fefd --- /dev/null +++ b/docs/SGF_PAYABLE_EVIDENCE_FOCUS_DELIVERY.md @@ -0,0 +1,34 @@ +# Origem, obrigação e selecção para pagamentos — conferência ligada + +Continuação posterior: [histórico de pagamentos e afectações paginado](SGF_SETTLEMENT_PAGED_READ_DELIVERY.md). Resolve a leitura integral do livro na composição SGF, mantendo os dados e resultados desta entrega como prova histórica. A composição nativa instalada e a implantação permanecem separadas. + +02/11/2026 — `SGF-PAYABLE-EVIDENCE-FOCUS-SIM-v1`. Implementação local, apenas na composição sintética SGF. Continua as entregas de [paginação SGF](SGF_PAYABLE_PAGED_READ_DELIVERY.md) e [consulta nativa](NATIVE_PAYABLE_PAGED_READ_DELIVERY.md), conservando as provas anteriores. + +## Ligação entregue + +A tabela de origens permite **Conferir evidências desta origem**. O link `/supplier-payables?source=` abre o documento, posição, propostas e eventos próprios, mesmo quando a origem antiga está fora da primeira página. `source` designa o mapeamento local do recibo SGF; não é uma factura nativa escolhida por coincidência de ID, um módulo atribuído automaticamente ou uma nova captura histórica. + +O filtro é aplicado no servidor, dentro do tenant/empresa/unidade autorizados, antes da contagem e paginação. Origem não disponível nesse contexto recusa403, tanto para ID inexistente como para outro âmbito. Valor inválido recusa422. Pesquisa, reconhecimento e página continuam a intersectar a origem: uma combinação sem resultados não apresenta evidências de outros documentos. A origem mantém-se nos formulários e nas duas paginações de propostas/eventos; existe saída explícita para a listagem geral. + +Quando o actor já possui consulta de pagamentos, a ligação para `/supplier-payments` transporta a mesma origem; o regresso conserva-a. Não se concedem direitos por seguir o link. O ecrã de pagamentos e afectações passa a navegar pelas páginas de documentos na **selecção de obrigações**, com pesquisa/reconhecimento, páginas25/100 e totais no servidor. Corrige a perda de acesso às obrigações depois da primeira página causada pela integração com o novo leitor paginado. Esta selecção só inclui as obrigações efectivamente reconhecidas dos documentos da janela; uma factura por reconhecer não se converte numa dívida ao navegar. + +Outro problema corrigido: o fornecedor e o número apresentados na selecção eram procurados na primeira página de propostas. Muitas revisões de uma origem podiam esconder a proposta exacta que reconheceu outra obrigação. Agora as propostas exactas de reconhecimento e as referências das origens são lidas em duas consultas conjuntas, no âmbito autorizado. Uma versão posterior não substitui a fotografia reconhecida. Cada obrigação tem ligação à sua origem/propostas/histórico. + +O livro de pagamentos/afectações mantém a consulta própria do contexto, sem ser filtrado pela página dos documentos; o ecrã informa esta diferença. **Não se implementou paginação desse livro** neste incremento, nem se retiraram os seus bloqueios de autorização de escrita existentes. A composição autónoma nativa conserva o seu contrato de consulta anterior; os novos controlos são condicionais à metadata SGF. O cálculo financeiro e os comandos de pagamento/afectação não foram alterados. + +## Provas dirigidas + +- Cinco cenários novos,34asserções: origem original fora da primeira página e posição30MZN; versões/eventos paginados sem mudar a origem; intersecção de filtros; tenant/empresa/unidade estrangeiros, ID ausente, valores inválidos e direito revogado; recibo alterado e comando obrigado a conferir o histórico actual. Inclui renderização que conserva o foco nativo `invoice`, sem links SGF indevidos. +- Integração da selecção para pagamentos:18asserções. Duas novas obrigações sintéticas não históricas reconhecidas pelo núcleo, com preparação/validação distintas, apenas dentro de uma transacção revertida. Comprovados páginas disjuntas25/25, total10.002documentos, selecção da obrigação exacta, fotografia reconhecida apesar de40propostas posteriores, links nos dois sentidos, filtro/âmbito recusados e consulta de pagamentos revogada independentemente. Zero pagamentos e afectações criados. O schema temporário de liquidação foi integralmente revertido; não foi instalado na fixture preservada. +- 20 verificações HTTP reais da conferência por origem: origem/posição exactas, filtros, páginas de evidências,422/403/409, escrita recusada ao leitor, formulário/link local, escape HTML e `no-store`. Servidor temporário em loopback8047 encerrado; nenhum navegador usado. A selecção de pagamentos foi testada pelo controlador/renderização na transacção isolada, sem declarar prova HTTP dessa parte ou interacção no navegador. +- Pós-ensaio só de leitura comparou integralmente os registos financeiros com o fingerprint final anterior, incluindo fontes, propostas, obrigações, importações, eventos, comandos e direitos. Igualdade confirmada; nenhuma tabela temporária de liquidação ficou instalada. Sequências de IDs usadas pelos inserts revertidos podem avançar; não se faz reset para ocultar o ensaio. + +Manifesto: [resultados e hashes](proofs/sgf-payable-evidence-focus-20261102.json). As execuções diagnósticas não são contadas como provas aprovadas. A primeira asserção de navegação foi corrigida para analisar os parâmetros do URL independentemente da sua ordem; o link já conservava a origem. Não se repetiram medições ou suites válidas alheias ao incremento. + +Reprodução dirigida com o PHP fixado: executar `scripts/payable-history-sgf-proof.php page-evidence`, `page-evidence-settlements` ou `page-evidence-post`; as guardas exigem a base/role próprias do cluster55439. Não usar settings instalados ou apagar uma prova existente para a repetir. HTTP: `scripts/payable-evidence-http.mjs ` recusa sobrescrever uma prova concluída. Consolidação sem repetir testes: `scripts/summarize-payable-evidence.mjs `. + +## Limites preservados + +São recibos históricos de ensaio; continua ausente um fornecedor histórico SGF vivo autenticado e uma passagem operacional de responsabilidade. O foco selecciona evidência actual para consulta, sem congelar versões entre pedidos. A confirmação continua a conferir as fontes actuais, direitos e contexto; uma consulta anterior não autoriza a operação. + +Não houve novos pagamentos, afectações, decisões operacionais, contas/direitos, migrações de destino, índices, activação de pacotes/candidatas de Compras, publicação ou checkpoint. Os seis registos protegidos, cache bloqueada, demonstrações e trabalho alheio ficaram intactos. Revisão visual, avaliação de carga sustentada e capacidade de implantação permanecem separadas; os tempos anteriores não são nova prova desta integração nem garantia de implantação. diff --git a/docs/SGF_PAYABLE_HISTORY_RECEIPT_DELIVERY.md b/docs/SGF_PAYABLE_HISTORY_RECEIPT_DELIVERY.md index 2895a91..cc7546d 100644 --- a/docs/SGF_PAYABLE_HISTORY_RECEIPT_DELIVERY.md +++ b/docs/SGF_PAYABLE_HISTORY_RECEIPT_DELIVERY.md @@ -1,5 +1,7 @@ # Compras → Financeiro SGF: recibo histórico de ensaio +Continuação posterior: [consulta paginada e leitura conjunta SGF](SGF_PAYABLE_PAGED_READ_DELIVERY.md). A listagem integral referida como limite nesta entrega foi substituída no adaptador SGF; a leitura nativa anterior, a origem viva/cutover, revisão visual e capacidade de implantação mantêm os respectivos limites. Os dados e hashes desta prova inicial permanecem preservados. + 02/11/2026 — `SGF-PAYABLE-HISTORY-RECEIPT-SIM-v1`. Adaptador SGF funcional sobre o núcleo comum existente. Entrega exclusivamente sintética, desactivada por defeito. Não é uma passagem operacional de responsabilidade financeira nem ligação histórica em tempo real. ## Lacuna e implementação diff --git a/docs/SGF_PAYABLE_PAGED_READ_DELIVERY.md b/docs/SGF_PAYABLE_PAGED_READ_DELIVERY.md new file mode 100644 index 0000000..c4dc2c7 --- /dev/null +++ b/docs/SGF_PAYABLE_PAGED_READ_DELIVERY.md @@ -0,0 +1,68 @@ +# Consulta financeira SGF: páginas e leitura conjunta + +Continuação posterior: [adaptador nativo SGC paginado em composição QA](NATIVE_PAYABLE_PAGED_READ_DELIVERY.md). Essa entrega acrescenta a integração nativa sem alterar as medições abaixo; pacote instalado e activação nativa permanecem separados. A descrição final deste relatório corresponde ao estado anterior a essa continuação. + +02/11/2026 — `SGF-PAYABLE-PAGED-READ-SIM-v1`. Implementação local sintética, continuação do [recibo histórico](SGF_PAYABLE_HISTORY_RECEIPT_DELIVERY.md). A listagem SGF deixa de carregar todas as origens, obrigações, propostas e eventos em cada pedido. Não altera decisões, saldos, origens ou competências reais; não activa Compras. + +## Comportamento entregue + +`GET /api/supplier-payables` e a página existente aceitam `page`, `per_page` (25/100), `q` (número ou fornecedor), `recognition` (`all/recognised/unrecognised`), `proposal_page` e `event_page`. Parâmetros desconhecidos ou inválidos são recusados com 422. A pesquisa trata `%` e `_` como caracteres literais. Texto e links da interface são escapados. + +Os filtros e os totais são calculados no servidor, antes da paginação, no contexto exacto de tenant/empresa/unidade. Reconhecimento significa existência de obrigação reconhecida, não pagamento, vencimento ou saldo liquidado. Não foi criado um filtro de «paga/vencida» que ignorasse dados indeterminados. + +Documentos têm ordem descendente por ID. As propostas e os eventos **dos documentos da página** têm páginas independentes, também descendentes. Mudar de página documental reinicia os paginadores de evidência; os links preservam pesquisa, reconhecimento e tamanho. A interface explica o âmbito da janela e mantém todas as versões/eventos recuperáveis, sem devolver o universo completo. As posições financeiras conservam a ordem anterior por ID da obrigação. + +`SupplierPayables` verifica em conjunto as origens e os recibos históricos da página. `Payables::listingPage` lê as origens das obrigações, incorporações, pagamentos originais, decisões e totais de afectações/reversões por conjuntos de IDs. O cálculo de posição e a reconstrução/verificação da cadeia histórica permanecem nos mesmos métodos do núcleo. Os caminhos antigos continuam disponíveis para outros adaptadores e como comparador; não se criou um segundo motor financeiro. + +O pedido SGF usa `REPEATABLE READ READ ONLY` e revalida identidade, contexto e direitos sem bloquear as linhas de escrita da empresa/utilizador. A autorização de leitura reutiliza as mesmas verificações; não concede preparar/validar por consequência da consulta. Preparações/confirmações continuam a usar autorização com bloqueios e leitura actual da origem/histórico. Os snapshots de leitura existem apenas dentro da consulta e não são utilizados por comandos. + +Recibo divergente continua a tornar apenas a posição dependente indeterminada (`balance_minor=null`), mantendo principal, documentos e histórico consultáveis. Origem/pessoa/contexto alterados continuam a exigir nova conferência. Vencimento desconhecido e pendentes/rejeitados preservam o tratamento anterior. + +## Antes/depois observado + +[Medições, fingerprints e hashes](proofs/sgf-payable-paged-read-20261102.json). Tempos do trecho de leitura em milissegundos; memória é **pico do heap PHP alocado, em MiB**, incluindo a base de 24 MiB do framework. + +| Documentos no ensaio | Página nova | Tempo integral anterior (ms) | Tempo novo (ms) | Consultas antes → depois | Pico PHP antes → depois (MiB) | +| ---: | ---: | ---: | ---: | ---: | ---: | +| 1.000 | 25 | 22.202,6 | 69,7 | 25.028 → 67 | 42 → 24 | +| 1.000 | 100 | 22.202,6 | 123,9 | 25.028 → 67 | 42 → 28 | +| 5.000 | 25 | 115.270,2 | 91,9 | 125.028 → 67 | 88 → 24 | +| 5.000 | 100 | 115.270,2 | 151,7 | 125.028 → 67 | 88 → 28 | +| 10.000 | 25 | 338.498,5 | 139,6 | 250.028 → 67 | 146 → 24 | +| 10.000 | 100 | 338.498,5 | 166,9 | 250.028 → 67 | 146 → 28 | + +A leitura anterior era integral, sem tamanho de página. Foi medida **uma vez por volume**, e a mesma medição é referida nas duas linhas correspondentes; não são duas execuções anteriores independentes. Os fingerprints de todos os campos das posições das janelas de 25/100 coincidiram com os do leitor anterior nos três volumes. Propostas/eventos passam a ser limitados e paginados, em vez de todos serem devolvidos. + +Condições: mesma base/role/schema de ensaio por volume, PHP 8.4.27, limite de memória 512M, processo PHP novo por estratégia e aquecimento limitado igual. PostgreSQL já estava aquecido pela preparação dos dados; não se esvaziaram caches. Ordem: leitura integral, página25 e página100. Uma amostra por estratégia, sem distribuição estatística ou carga concorrente. A medição antiga usa o método integral e os callbacks de origem anteriores, sem as flags finais do adaptador antigo; a nova inclui o adaptador SGF paginado completo. Não são tempos totais de HTTP/browser/renderização. + +O pico extra de heap alocado de uma página de 25 foi zero porque reutilizou blocos já alocados pelo framework; **não significa consumo de memória zero**. Não foi medido RSS do processo. O ganho observado resulta conjuntamente de paginação, leitura em lote e remoção de bloqueios de escrita nas consultas. Não se isolou cada técnica. **Nenhum índice foi acrescentado/removido/experimentado**, nem no destino; não há ganho de índices a atribuir. + +O gargalo anterior era a leitura de todo o universo, com consultas de origem, schema e dependências repetidas por obrigação. O teste de consultas identificou ainda uma descoberta de schema por posição no primeiro leitor em lote; foi removida desse percurso após verificação conjunta da disponibilidade. A leitura final faz67 consultas tanto para25 como para100 documentos, com os custos de autorização/metadados incluídos. + +Os volumes maiores contêm clones explicitamente sintéticos para carga: uma origem efectivamente conferida nos workflows de Compras, preservada, mais999/4.999/9.999 clones de benchmark. Não se declara que cada clone executou um workflow nativo. Cada obrigação de carga tem três pagamentos históricos; a fixture é preparada em blocos de100, sem construir todo o universo em memória PHP. + +## Testes e concorrência + +- Dez cenários existentes do adaptador histórico SGF /56 asserções, executados por serem afectados pela mudança da leitura/autorização. +- Oito cenários novos de paginação /34 asserções: páginas disjuntas, ordenação, filtros antes dos totais, pesquisa literal, janela vazia, paridade integral de posições, leitura conjunta constante, revogação/isolamento, recibo alterado, afectações/reversões e cadeia histórica. +- 21 testes de compatibilidade nativa / 144 asserções, usando a fonte canónica apenas nas bases QA novas. Não se actualizou o pacote/candidata/demonstração nativa. Vinte casos válidos foram reutilizados; um caso de imutabilidade foi corrigido para envolver as violações SQL esperadas em savepoints e repetido isoladamente. Sem savepoint, o PostgreSQL abortava a transacção do próprio teste antes da verificação seguinte. +- 24 verificações HTTP pelo kernel real: páginas de 25/100, fontes/eventos disjuntos, filtros, recusa de parâmetros/contexto, leitor sem escrita, links, escaping e respostas privadas. A prova HTTP anterior de 17 controlos também passou no adaptador alterado, antes da expansão da carga. +- Provas adicionais isoladas: documento efectivamente por reconhecer aparece no filtro correcto; outra unidade da mesma empresa não aparece; comando posterior à leitura recusa uma origem entretanto alterada; leitor termina enquanto o escritor mantém bloqueio na empresa e não observa recibo ainda não confirmado. + +Os cenários de decisões/afectações adicionais usaram apenas fixtures de leitura dentro de transacções com rollback. Não activaram confirmação de pagamentos pendentes no SGF nem instalaram permanentemente essa capacidade. O postcheck confirmou ausência dessas tabelas temporárias, cinco concessões QA originais preservadas e o recibo efectivo inicial inalterado. O fingerprint dos registos financeiros e de `pa_access`, em leitura, permaneceu igual antes/depois dos últimos testes e do HTTP. + +O runner financeiro nativo passou a exigir uma base QA **nova** por execução, por usar `RefreshDatabase`. Uma tentativa de retoma encontrou uma função residual na preparação da própria base de prova e não foi contada como teste válido. Não se reparou schema instalado nem se fez reset dos hosts de regressão/demonstração protegidos. Diagnósticos e JUnit anteriores permanecem guardados; o consolidado selecciona apenas casos aprovados por nome. + +## Reproduzir sem destruir provas + +`scripts/payable-page-run.mjs ` cria uma base SGF nova e reutiliza a captura nativa existente, sem repetir ou alterar o workflow nativo. Executar `scripts/payable-history-sgf-proof.php page-seed 51`, depois a fase `page-cases`. `scripts/payable-page-load.mjs ` expande a fixture por 1.000/5.000/10.000 e mede cada estratégia em processo próprio. Não voltar a executar os casos de 51 registos na fixture já expandida; não a reduzir/resetar. As fases `page-fresh-command`, `page-filter-positive`, `page-concurrent-read`, HTTP e `page-post` conferem o estado final. `scripts/summarize-payable-page.mjs ` consolida as provas preservadas. Usar PHP/Node fixados nas instruções locais. + +PHP/HTML foram verificados sem novo build JavaScript, navegador ou dependências. O servidor HTTP temporário terminou apenas o processo próprio. Credenciais, cookies, configurações e cópias de fontes permaneceram na pasta QA privada, fora do relatório versionável. + +## Limites e preservação + +Fotografias de leitura são por pedido, não uma sessão longa/cursor que fixe várias páginas durante navegação humana. Cada página confere o histórico completo necessário dos documentos seleccionados; um único documento com histórico muito extenso precisa de avaliação própria.67 consultas constantes ainda incluem verificações de autorização/schema; os tempos locais não são garantia de SLA, throughput ou implantação. + +O adaptador autónomo nativo conserva a sua listagem anterior: foi verificada a compatibilidade do núcleo, sem aplicar esta interface/paginação ao destino nativo. A passagem histórica continua por recibos de ensaio, sem origem viva autenticada ou cutover operacional da responsabilidade financeira. Não se declara Financeiro completo, contabilidade, reconciliação bancária ou capacidade de implantação. Revisão visual permanece separada e pendente. + +Preservados seis registos de associação, cache bloqueada, provas/checkpoints anteriores, dados/acessos/configurações de demonstrações e instalações reais e trabalho alheio. Sem publicação, activação de Compras, novo direito real, migração/índice no destino ou checkpoint presumidos. diff --git a/docs/SGF_PAYABLE_REPORT_CAPTURE_DELIVERY.md b/docs/SGF_PAYABLE_REPORT_CAPTURE_DELIVERY.md new file mode 100644 index 0000000..b73c878 --- /dev/null +++ b/docs/SGF_PAYABLE_REPORT_CAPTURE_DELIVERY.md @@ -0,0 +1,44 @@ +# Relatório financeiro — perfilagem e reutilização de captura validada + +03/11/2026. Continuação técnica da [consulta de posições reconhecidas](SGF_PAYABLE_REPORT_DELIVERY.md), sem novo efeito financeiro ou direito. **Há código funcional de optimização**, além das rotinas de perfilagem. Não se repetiram as suites contabilísticas ou os benchmarks válidos de paginação de associações/documentos/pagamentos. + +## Alteração implementada + +O adaptador já validava integralmente cada recibo histórico na janela, mas devolvia só os pagamentos. O núcleo repetia `HistoricalPayments::capture` sobre esses mesmos pagamentos para comparar com a importação original. O relatório passa a pedir explicitamente um `HistoricalCapture` imutável, válido exclusivamente para aquela origem completa e contexto, reutilizando o resultado dessa primeira captura. + +O recibo continua a passar pelo checksum, identidade/revisão, versão, validação integral de pagamentos e comparação do hash histórico. `PaymentDecisions::current` continua a reconstruir/verificar a importação original e as decisões. Não se retiraram verificações de auditoria, compatibilidade, montantes ou saldos. Os direitos e a pessoa continuam conferidos pelo percurso de leitura existente, sem cache de permissões. + +O valor conserva a origem inteira, incluindo eventuais campos documentais chamados `revision` ou `missing`. Só aceita a origem original exacta ou a mesma origem com os metadados calculados exactos da listagem. Mudar ID local, quantidade de pagamentos, documento/versão, empresa/unidade/tenant ou esses metadados recusa a captura. A devolução do array não permite alterar o valor guardado. A janela termina sem retenção global dos valores. + +**Comandos não usam estas capturas.** O núcleo recusa o valor quando o chamador não é o percurso de leitura conjunta; comandos conservam o carregamento e validação do histórico actual. O contrato anterior de `SupplierHistoryReceipts::page` continua a devolver arrays por omissão. Não se acrescentou parâmetro HTTP para optar por uma captura ou saltar validações. + +## Ensaio e perfilagem + +Nova base/role QA própria55439, `report-profile-b7f7d0c1c2c2`, restaurada de um dump só de leitura da fixture sintética de10.000 posições. Não se usou a base original para medições, escritas, manutenção ou decisões. Aproximadamente99,99% são cópias explícitas de volume do cenário original, não10.000 workflows de compras. Dump, configurações, credenciais, classe anterior arquivada e classes instrumentadas ficam privados. + +Cada geração usa100 janelas de100 fontes, processos PHP independentes, limite512M e o mesmo contexto/filtro. A instrumentação está numa cópia privada da classe, sem opção de perfilagem na aplicação. Os tempos por etapa são de relógio e incluem as consultas dessas etapas; não se devem somar novamente os tempos SQL ao total. A actividade local não foi controlada; existe uma amostra por versão/condição. Não são resultados de carga sustentada ou de implantação. + +| Implementação e condição | Tempo ms | Consultas | Pico heap PHP MiB | Selecção ms | Históricos ms | Posições ms | Hash/totais ms | +|---|---:|---:|---:|---:|---:|---:|---:| +| Anterior, restauro recente antes de ANALYZE |21548,229|2313|34|5920,125|3050,887|11710,591|424,818| +| Anterior, depois de ANALYZE só na cópia QA |22021,190|2313|34|2260,387|4136,342|14460,816|692,097| +| Captura reutilizada, mesmas estatísticas QA |12939,629|2313|34|1603,575|2902,426|7764,687|317,408| + +O `EXPLAIN ANALYZE` anterior revelou um plano que estimava1 linha e processava10.000 antes de ordenar/limitar100, com60.185 blocos partilhados encontrados em cache e nenhum lido do disco nesse pedido. Actualizar estatísticas reduziu o tempo observado de selecção, **sem melhoria do total nessa amostra**. É um efeito de estatísticas, não de índice ou da captura reutilizada. A manutenção foi aplicada exclusivamente à cópia sintética nova; não é uma recomendação de aplicação automática no destino. + +Entre a segunda e terceira linhas observou-se redução de cerca de41% no tempo total, com consultas/memória iguais e conteúdo financeiro idêntico. A alteração de código remove a captura duplicada; a variação local e a diferença dos tempos SQL impedem atribuir causalmente todo o ganho a essa única operação. Uma medição intermédia com a primeira implementação do vínculo da captura ficou diagnóstica e não é usada como resultado final; o vínculo foi reforçado para conservar campos documentais genuínos antes da medição final. + +O gargalo **persiste**:12,9 segundos ainda é elevado para consulta interactiva. A etapa de posições ainda consome7,8 segundos, incluindo SQL, hidratação, reconstrução/verificação da importação e decisões, comparação e captura de resultados. O total SQL foi5,5 segundos e está incluído nas etapas. A próxima correcção mínima deve subperfilar essa etapa e o plano de selecção com estatísticas representativas, antes de escolher mais cache, índices ou geração assíncrona. Não se retiram validações apenas para reduzir o benchmark. Não houve índice experimental, índice no destino ou avaliação de throughput. + +## Equivalência, recusas e preservação + +-6 cenários/22 verificações em rollback: vínculo completo ao contexto/origem, metadados genuínos, imutabilidade, recusa da captura nos comandos, compatibilidade do contrato de arrays, igualdade de totais/componentes/hash/janelas, recibo inválido com saldo indeterminado e direito revogado. +-17 verificações HTTP reais na nova cópia:10.000 posições, foco, HTML/JSON, links de evidência, parâmetros indevidos, fonte/contexto inválidos, escape e `no-store`. Fotografia `REPEATABLE READ READ ONLY`, zero `FOR UPDATE`. Não são provas visuais. +-Comando efectivo `prepare_history` e repetição pelo motor normal, sobre a obrigação já reconhecida, devolvem o reconhecimento original sem outra obrigação. Prova revertida integralmente; o valor de janela não alimenta esse comando. +-Após medições e casos, a impressão digital financeira da cópia coincide com a prova válida original. A classe anterior arquivada e as provas/demos/pacotes antigos mantêm os seus hashes. Nenhum dado real ou associação protegida foi usado para este ensaio. + +Os39 checks contados são22 de regressão e17 HTTP; o comando/repetição é registado como prova adicional, sem inventar outra contagem. Manifesto: [medições, igualdade e hashes](proofs/sgf-payable-report-capture-20261103.json). Originais, seis associações, cache bloqueada, demos e trabalho em curso preservados. Sem publicação, checkpoint, activação de Compras, concessões ou manutenção no destino. Revisão visual, carga sustentada e implantação continuam separadas e pendentes. + +## Próxima integração proposta + +A correcção de resultado industrial já lançado continua expressamente excluída da autorização actual. Foi preparado um recorte concreto [1800→1820, por par indivisível](GENERAL_LEDGER_INDUSTRIAL_CORRECTION_SCOPE.md), ainda só para decisão. A optimização de leitura desta entrega não autoriza esse novo efeito. diff --git a/docs/SGF_PAYABLE_REPORT_DELIVERY.md b/docs/SGF_PAYABLE_REPORT_DELIVERY.md new file mode 100644 index 0000000..60f8f2e --- /dev/null +++ b/docs/SGF_PAYABLE_REPORT_DELIVERY.md @@ -0,0 +1,49 @@ +# Livro financeiro → relatório de obrigações reconciliado + +02/11/2026 — `SGF-PAYABLE-POSITION-REPORT-SIM-v1`. Implementação local sintética, sobre a [consulta financeira coerente](SGF_SETTLEMENT_READ_ISOLATION_DELIVERY.md). Entregue código funcional de relatório. O primeiro lançamento contabilístico permanece **apenas especificado, por autorizar**, em [GENERAL_LEDGER_FIRST_SYNTHETIC_SCOPE.md](GENERAL_LEDGER_FIRST_SYNTHETIC_SCOPE.md). + +## Percurso e significado + +A consulta de obrigações SGF liga a **Relatório das obrigações reconhecidas abrangidas pelo filtro**. `GET /supplier-payables/report` apresenta o relatório; `GET /api/supplier-payables/report` devolve os mesmos campos em JSON. Critérios: número/fornecedor literal e origem local opcional, dentro do tenant/empresa/unidade activos. Mantém `supplier_payables.view` e `pa_access.view`; não cria direitos ou autoridade de decisão. Outros parâmetros, incluindo contexto injectado e data de corte não suportada, recusam 422. + +O relatório abrange **todas** as obrigações reconhecidas do filtro, sem se limitar à página actualmente visível. O mesmo núcleo `Payables` fornece principal, confirmados históricos, afectações líquidas de reversões, saldo e compatibilidade. Não se guardou outro saldo ou um novo movimento pela consulta. + +Apresenta separadamente principal original, quantidade de posições conhecidas/indeterminadas e componentes conhecidos. Uma posição com evidência divergente mantém o principal, mas deixa o saldo global **indeterminado**. O saldo conhecido é explicitamente parcial. Não se soma um desconhecido como zero. Vencimento ausente permanece contado como desconhecido, sem inventar datas ou atraso. + +Os componentes conhecidos reconciliam-se exactamente: principal − confirmados históricos incorporados − afectações líquidas = saldo. Pagamentos ainda por afectar não abatem a dívida. Reporta MZN, sem soma entre moedas, recálculo fiscal ou classificação contabilística. + +Cada geração tem captura UTC, âmbito, critérios e SHA-256 do conteúdo ordenado das posições/revisões. Links levam aos documentos e evidências existentes. JSON e ligações geram nova captura; não prometem recuperar um relatório arquivado. São posições actuais sobre recibos de ensaio, sem fonte histórica SGF viva ou corte histórico. A interface identifica esses limites. + +## Leitura completa e correcção do gargalo encontrado + +A primeira implementação segura reutilizava a listagem paginada em 100 fontes por janela. Na prova de 10.000 posições, revelou 6.607 consultas e 19,1 s, porque cada janela repetia contagens, autorizações e propostas/eventos de apresentação que o relatório não consumia. + +Foi corrigida nesta entrega: `Payables::positionsPage()` usa o mesmo cálculo/leituras conjuntas da listagem, omitindo apenas as páginas de propostas/eventos. O adaptador partilha o predicado de filtros com a listagem e percorre IDs descendentes por chave, em vez de repetir contagens/offsets. Carrega até 100 fontes e suas dependências por janela. O motor construído para a janela só autoriza leitura; uma tentativa de comando nesse percurso lança recusa. Autoridade, identidade e contexto continuam conferidos durante o relatório. + +Uma transacção própria `REPEATABLE READ READ ONLY` cobre a geração inteira. Não há bloqueios de escrita da empresa/actor. Se invocado dentro de transacção existente, exige pelo menos `repeatable read`/`serializable` e participa nela; recusa 409 um contexto aninhado incoerente. O percurso HTTP foi efectivamente verificado só de leitura. Não se mantém transacção aberta enquanto uma pessoa lê/confirma a página. + +| Geração completa de 10.000 posições | Tempo ms | Consultas | Pico heap PHP MiB | Janelas | +|---|---:|---:|---:|---:| +| Reutilização inicial da listagem | 19.066,022 | 6.607 | 34 | 100 | +| Leitura específica conjunta por chave | 12.557,809 | 2.313 | 32 | 100 | + +Totais, componentes e SHA-256 do conteúdo **iguais** antes/depois. Cenário: 10.000 obrigações sintéticas com os históricos importados conservados, principal 60,00 MZN e confirmados 30,00 MZN por posição. Principal global 600.000,00 MZN, confirmado histórico 300.000,00 MZN, saldo 300.000,00 MZN, sem afectações novas. 99,99% são cópias de volume explícitas da fixture anterior; não 10.000 workflows de compra executados. + +Condições equivalentes: mesma base/role e filtro, PHP 8.4.27/512M, processos independentes, base local aquecida, uma amostra válida por implementação e actividade local não controlada. Memória é heap alocado, não RSS. Não houve índice novo/experimento de índice. Não se repetiram os benchmarks anteriores de páginas ou de pagamentos: são duas gerações completas do novo relatório, sobre o mesmo universo. + +**Limite material:** 12,6 s continua elevado para 10.000 posições numa consulta interactiva. Retirou-se o custo de apresentação e reduziu-se o número de consultas, mas o custo restante não foi isolado por perfilagem. A correcção mínima seguinte é medir separadamente leitura, validação/captura histórica e serialização/hash antes de escolher outro índice, cache ou geração em segundo plano. Não se declara ausência de gargalos, carga sustentada ou capacidade de implantação. + +## Provas e preservação + +- Três cenários finais / 17 asserções: foco e filtros literais, identificação de conteúdo estável, vencimento desconhecido, mistura de saldo conhecido com histórico divergente, checksum inválido, âmbito estrangeiro em tenant/empresa/unidade, direito revogado e transacção aninhada incoerente. Repetidos apenas estes casos afectados depois da optimização; a prova inicial válida fica preservada e não se soma duas vezes. +- Livro de afectações/reversões anterior: 61 obrigações, principal 3.660,00 MZN, afectação líquida 3,92 MZN e saldo 3.656,08 MZN, reconciliados pelo núcleo. Nenhum pagamento ou lançamento criado pelo relatório. +- 17 verificações HTTP reais: autenticação, relatório completo de 61 posições, foco, reconciliação, JSON/HTML, retorno à evidência, ligação no workspace existente,422/403/409, escape HTML e `no-store`. Instrumentação confirma fotografia só de leitura e zero `FOR UPDATE`. Sem navegador ou revisão visual. +- Pós-ensaio confirmou os fingerprints integrais dos dois livros anteriores. Factos, direitos e provas permanecem iguais; alterações dos casos adversariais foram revertidas. Não se fizeram resets, limpezas de cache, concessões reais ou activação de candidatas. + +Manifesto: [resultados, medições e hashes](proofs/sgf-payable-report-20261102.json). Rotinas dirigidas no harness protegido: fases `payable-report-volume-batch`, `payable-report-cases-batch`, `payable-report-settlements` e `payable-report-post`. HTTP: `scripts/payable-report-http.mjs `. Consolidação sem repetir provas: `scripts/summarize-payable-report.mjs`. Marcadores concluídos são preservados; credenciais, sessões e logs ficam privados. Sintaxe PHP/JavaScript e diferenças verificadas; Blade renderizado pelo kernel HTTP, sem build JavaScript novo. + +## Próxima fronteira + +O relatório funcional não resolve reconhecimento contabilístico, períodos, razão ou lançamentos. A proposta [COMMON-LEDGER-PAYABLE-SIM-v1](GENERAL_LEDGER_FIRST_SYNTHETIC_SCOPE.md) delimita um primeiro lançamento equilibrado, contas/período artificiais, separação de funções, quatro direitos exclusivamente QA e testes, para autorização específica. Não há código funcional contabilístico nesta entrega. + +Seis registos protegidos, cache bloqueada, demos, configurações/direitos reais e alterações alheias preservados. Sem publicação, checkpoint, migração no destino ou activação de Compras. Revisão visual, optimização adicional de relatórios e implantação permanecem separadas; a autorização seguinte não as transforma em provas concluídas. diff --git a/docs/SGF_PURCHASING_CONTEXTUAL_NAVIGATION.md b/docs/SGF_PURCHASING_CONTEXTUAL_NAVIGATION.md new file mode 100644 index 0000000..de809ef --- /dev/null +++ b/docs/SGF_PURCHASING_CONTEXTUAL_NAVIGATION.md @@ -0,0 +1,35 @@ +# Continuidade contextual de Compras — entrega local de 03/11/2026 + +`SGF-PURCHASING-CONTEXTUAL-NAVIGATION-QA-v1` resolve a perda de contexto ao abrir as etapas do dossiê. Os cartões autorizados agora abrem a requisição, propostas da requisição, adjudicação/ordem, recepção ou factura exacta. O cartão da factura permite abrir a consulta da obrigação dessa origem quando o perfil possui o respectivo acesso. As continuações existentes de requisição → propostas → adjudicação/ordem → recepção também preservam os IDs. + +## Implementação + +`ProcessNavigation` acrescenta ligações apenas aos registos já projectados nas páginas autorizadas do dossiê. Reutiliza as decisões de visibilidade calculadas pelo dossiê, sem consultas adicionais, novas contagens, direitos ou writers. Etapas restritas não recebem ligações nem IDs dessas etapas. A funcionalidade fica desligada por omissão em `receipt_qa.focus_enabled`. + +O componente comum `purchasing-focus.mjs` lê parâmetros delimitados por etapa, recusa parâmetros desconhecidos/repetidos, valores vazios, não inteiros, negativos ou fora da precisão segura. Só aceita ligações locais às etapas conhecidas. Abrir uma página faz consultas; não prepara prévias, confirma, aprova, emite ou reconhece uma obrigação. Não muda empresa, unidade, módulo ou identidade. + +Os sete módulos de interface envolvidos — requisições, propostas, ordens, recepções, facturas, obrigações e dossiês — carregam a lista habitual e consultam o ID explícito através da API própria. Assim, o destino não depende de o registo estar nos primeiros25. Não se percorre todo o universo nem se escolhe o primeiro registo como alternativa. Interagir enquanto a lista inicial está pendente cancela o foco automático atrasado. + +Uma recepção indicada é conferida contra a ordem antes de apresentar a sua evidência/anexos; uma factura indicada tem de constar da ordem autorizada. Se não corresponderem, apresenta-se a recusa e não se substitui pelo primeiro documento. Os endpoints continuam a verificar a autoridade actual, contexto e isolamento. Os comandos e respectivas conferências de versão permanecem nos serviços existentes. + +## Provas sem repetir o percurso financeiro + +[Consolidação](proofs/purchasing-focus-composition-20261103.json): **77 verificações**, sendo26 HTTP/leitura,36 de lógica da interface,12 da demonstração e3 de build/assets. + +A aplicação de leitura nova `purchasing-focus-read-8a8270d3bfec` reutiliza o livro de regressão já concluído `b4093c6f6707`, no cluster QA55439. Não repete requisição, aprovação, emissão, recepção, factura ou reconhecimento. Os oito atalhos correlacionam os IDs efectivos da requisição3, adjudicação2, ordem1, recepção de origem e factura2/obrigação100MZN. As páginas e APIs de destino foram consultadas com o perfil autorizado. Uma fotografia de **142 tabelas e respectivas sequências** antes/depois ficou igual. + +Inclui perfil limitado à requisição sem ligações económicas, Compras sem ligações a facturas/obrigações, ligações copiadas recusadas no destino, origem estrangeira/desconhecida, módulo/unidade diferentes e token de contexto antigo. Desactivar a funcionalidade conserva o payload anterior do dossiê. + +Os36 testes JavaScript usam DOM simulado e executam os sete ficheiros reais de interface com respostas mínimas sintéticas de leitura. Comprovam foco fora da primeira página, ausência de POST, correspondência entre factura/recepção e ordem, parâmetros ambíguos, ligações externas, resposta inicial atrasada e modo desligado. Não são revisão visual ou acessibilidade em navegador. Não se repetiu a via de navegador bloqueada. + +Verificação final: sintaxe de sete ficheiros PHP e16 JavaScript aprovada; build privado e assets servidos conferidos. `git diff --check` sem erros de espaços. Matriz/inventário actualizados com seis módulos,13 etapas,82 fontes, zero ciclos obrigatórios e126 critérios documentais conferidos; estes valores não são novas provas operacionais. A primeira sonda da demonstração falhou antes dos pedidos HTTP por ordenar `geo_locations` por um ID inexistente; o teste foi corrigido para a chave composta efectiva e as12 verificações da demonstração passaram. + +## Demonstração e preservação + +Nova composição isolada `0275f83f7456`, **8078**: [Solicitante](http://127.0.0.1:8078/qa/enter/requester?open=1), [Compras](http://127.0.0.1:8078/qa/enter/actor?open=1), [Finanças](http://127.0.0.1:8078/qa/enter/issuer?open=1). Começa sem operações principais, recepções, facturas ou obrigações, com os fornecedores/orçamento QA preparados. Inclui anexos de fornecedor/recepção das entregas anteriores. A identidade de cada interveniente mantém as suas permissões: uma ligação não substitui a intervenção de outro perfil. + +Os probes da demonstração conservam as tabelas de negócio seleccionadas, auditoria nativa, direitos e localizações. Código raiz e cópias privadas foram comparados por SHA; manifestos nativos continuam fixados.8077 e anteriores, seis registos protegidos, cache bloqueada, provas válidas e trabalho alheio preservados. Sem migração/concessão real, activação de Compras, publicação, aceitação ou checkpoint. + +## Limites + +É continuidade de consulta, não uma fila universal, decisão de prontidão ou execução automática da etapa seguinte. Filtros/páginas das listas permanecem independentes da origem indicada pelo atalho. O dossiê só cria cartões/atalhos dos registos da página actualmente visível. Revisão visual, carga sustentada, compatibilidade de instalação, privilégios mínimos e capacidade de implantação continuam pendentes e exigem evidência própria. A conclusão deste recorte não declara a aplicação completa ou utilização operacional validada. diff --git a/docs/SGF_PURCHASING_DOSSIER_DELIVERY.md b/docs/SGF_PURCHASING_DOSSIER_DELIVERY.md new file mode 100644 index 0000000..0d2fdf4 --- /dev/null +++ b/docs/SGF_PURCHASING_DOSSIER_DELIVERY.md @@ -0,0 +1,40 @@ +# Dossiê de leitura do processo de Compras + +03/11/2026. `SGF-PURCHASING-DOSSIER-QA-v1`. Consulta conjunta dos registos efectivos da requisição, propostas, adjudicação, ordens, recepções, facturas, obrigação e histórico autorizado. Não prepara decisões nem replica os motores financeiros. + +## Experimentar em8074 + +[Solicitante](http://127.0.0.1:8074/qa/enter/requester?open=1), [chefia](http://127.0.0.1:8074/qa/enter/approver?open=1), [Compras](http://127.0.0.1:8074/qa/enter/actor?open=1) e [Finanças](http://127.0.0.1:8074/qa/enter/issuer?open=1) encontram **Dossiês e evidência** no mapa e na navegação comum. A entrada exige o direito existente de consulta da requisição; ter apenas recepções ou facturas não concede este dossiê. + +A demonstração nova conserva o percurso integrado, começando sem operações principais. Depois de preparar uma requisição e avançar nas etapas autorizadas, o dossiê encontra os mesmos documentos e respectivos IDs. Três fornecedores e orçamento QA1000MZN são preparação explícita; nenhuma localização atribuída.8073 e anteriores não foram actualizadas. A pesquisa paginada de fornecedores continua disponível, com os três fornecedores desta nova fixture; o directório ampliado de125admissíveis permanece na demo8073. + +## Implementação + +- `/purchasing/dossiers` e `/api/purchasing-dossiers`: lista paginada25, com filtro de estado e pesquisa literal pelo número da requisição. A origem usa `RequisitionAccess` e a visibilidade nativa actual, no contexto exacto da empresa/unidade. +- O detalhe confere separadamente o direito de consulta de cada etapa e a função nativa, mantendo as concessões consultadas bloqueadas durante a leitura. A consulta financeira da obrigação passa também pelo adaptador original. Não foram criados novos direitos. +- Etapas sem acesso devolvem apenas `accessible:false`: sem linhas, contagens, IDs ou montantes escondidos no JSON. A interface distingue **restrito** de **sem registos nesta página**. O histórico filtra as acções das etapas autorizadas e projecta apenas ID, autor, tipo e data, sem fotografias anteriores/posteriores de outros domínios. +- Propostas, adjudicações, ordens, recepções, facturas e histórico têm páginas independentes25 no servidor. Para obrigações, a janela é de25facturas de origem; posições/saldos vêm do mesmo núcleo. A paginação financeira está identificada como janela de origens, sem inventar uma contagem global de dívidas. +- A impressão da vista cobre somente os dados/páginas visíveis e o contexto. Não é uma aprovação da operação seguinte, uma revisão de todo o universo ou substituto das prévias existentes. Cada etapa mantém a sua conferência e histórico próprio. +- O dossiê tem apenas endpoints GET. Não cria reservas, compromissos, movimentos, documentos, obrigações, pagamentos ou lançamentos. A navegação remete para as etapas existentes; nenhuma etapa é confirmada automaticamente. + +## Provas e reutilização + +[Consolidação](proofs/purchasing-dossier-composition-20261103.json):49verificações — leitura30, guardas4, demonstração12 e build/assets3. As provas de leitura reutilizam a base **de regressão**, não a demo, que já continha o percurso completo100MZN. Foi criada outra aplicação e outras sessões privadas, preservando a aplicação, configuração, ligações e dados da prova anterior. Não se repetiu qualquer comando financeiro. + +Foram comparadas as142tabelas das duas bases e as suas sequências antes/depois: a impressão permaneceu exactamente igual. O dossiê encontrou os IDs originais da ordem, factura e obrigação, principal/saldo100MZN e vencimento desconhecido. Verificou páginas distintas de evidência/histórico, filtros, contexto desactualizado, unidade/módulo indevidos, origem estrangeira e recusa de POST. + +Compras não recebeu dados de facturas/obrigações sem os direitos próprios; o solicitante recebeu apenas a requisição e o seu histórico autorizado, sem linhas ou contagens posteriores. Perfis apenas de Armazém ou revisão de facturas não herdaram consulta de requisições. + +Na demonstração **nova e vazia**, os testes conferem os perfis e a revogação/restauro de uma concessão QA existente, deixando os dados e concessões exactamente iguais ao início. Esse ensaio de revogação não alterou a base de regressão reutilizada ou qualquer acesso real. Guardas de capacidade desligada/ambiente real recusaram antes de SQL. + +As provas anteriores do percurso integrado, pesquisa de fornecedores e obrigação permanecem preservadas, sem repetição das suites de escrita, concorrência, recuperação ou contabilidade. + +A [matriz actualizada](proofs/dossier-matrix-20261103.json) conserva seis módulos,13estágios e112critérios documentados. A [inspecção estática](proofs/dossier-flow-20261103.json) encontra74fontes e nenhum ciclo obrigatório, sem ligações a bases. Passaram9verificações de sintaxe PHP,7de JavaScript e `git diff --check`; estas verificações não constituem prova visual ou de implantação. + +## Limitações e preservação + +Este é um dossiê de leitura com permissões por etapa; não é fila universal de tarefas, aprovação transversal ou motor de previsão da próxima decisão. Sem registos numa página não prova que o processo esteja pronto para avançar; as regras e prévias de cada etapa continuam a decidir essa possibilidade. + +A nova demonstração começa vazia; o percurso completo já realizado é utilizado somente pela prova de leitura na base de regressão. Não se copiaram decisões para a demo da equipa. Revisão visual, carga sustentada e capacidade de implantação continuam pendentes, sem repetir o navegador bloqueado ou inferir produção a partir destes ensaios. + +Configuração desligada por omissão. Nenhuma migração/concessão no destino, alteração dos seis registos protegidos, limpeza da cache bloqueada, activação de Compras, publicação, aceitação ou checkpoint. Pagamentos/contabilização da nova origem, anexos/correcções e reunião dos restantes módulos conservam âmbitos próprios. diff --git a/docs/SGF_PURCHASING_INTEGRATED_DELIVERY.md b/docs/SGF_PURCHASING_INTEGRATED_DELIVERY.md new file mode 100644 index 0000000..55d7795 --- /dev/null +++ b/docs/SGF_PURCHASING_INTEGRATED_DELIVERY.md @@ -0,0 +1,47 @@ +# Percurso de Compras numa única composição SGF + +**Continuidade de04/11/2026:** a instalação de trabalho actual é **http://127.0.0.1:8085/compras**, consolidada no lugar, com o percurso C01–C10 comprovado pelos formulários e exemplo concluído. Ver [resultado](PURCHASING_COMPLETION.md) e [guia](COMPRAS_USO_LOCAL.md). As instruções8072 abaixo são históricas; não é necessário alternar entre essas demonstrações. Não foi activada instalação empresarial nem presumida revisão visual. + +03/11/2026. `SGF-PURCHASING-INTEGRATED-QA-v1`. A nova demonstração reúne requisições, fornecedores, propostas/adjudicação, ordens, recepções, facturas, obrigações e a referência geográfica no mesmo host e no mesmo livro nativo. Não exige mudar de demonstração ou reconfigurar identificadores entre essas etapas. As versões anteriores permanecem intactas. + +## Experimentar em8072 + +Cada entrada abre o mesmo mapa de trabalho, com apenas as etapas autorizadas para o perfil. As páginas de trabalho partilham a navegação, mantendo as decisões e conferências nos serviços existentes. + +1. [Solicitante](http://127.0.0.1:8072/qa/enter/requester?open=1): preparar uma requisição1UN a100MZN, imposto0, e submetê-la. +2. [Chefia](http://127.0.0.1:8072/qa/enter/approver?open=1): aprovar a requisição exacta por identidade distinta. +3. [Compras](http://127.0.0.1:8072/qa/enter/actor?open=1): registar três propostas dos fornecedores QA preparados, por exemplo100/120/140MZN. Compras e [Finanças](http://127.0.0.1:8072/qa/enter/issuer?open=1) registam as suas avaliações individuais; comparar e escolher expressamente com fundamento. A chefia aprova a adjudicação; Compras emite a ordem. +4. [Armazém](http://127.0.0.1:8072/qa/enter/validator?open=1): conferir e receber1UN aceite/conforme no artigo/armazém QA. +5. Finanças regista a factura recebida100MZN, base100, imposto0, quantidade1UN. [Revisor financeiro](http://127.0.0.1:8072/qa/enter/reviewer?open=1) confere e valida, consumindo o compromisso existente uma vez. +6. Finanças prepara a fotografia da obrigação, com fundamento e prévia; o revisor reconhece a versão exacta por pessoa distinta. [Outra identidade QA](http://127.0.0.1:8072/qa/enter/auditor?open=1) conserva papel separado. + +As listas das etapas encontram os mesmos documentos autorizados; não é necessário copiar IDs. A localização de fornecedor continua acessível pelo cadastro. Os selectores comuns de empresa/unidade/cliente permanecem nos respectivos percursos existentes, sujeitos ao módulo e contexto correctos; nada recebe localização automaticamente. + +A demonstração começa sem requisições principais, propostas, adjudicações, ordens, recepções, facturas, propostas de obrigação ou dívidas. Prepara três fornecedores QA e orçamento aprovado1000MZN; nenhuma reserva/compromisso inicial. Uma requisição estrangeira serve apenas a prova de isolamento. O catálogo versionado tem20.407linhas e zero localizações atribuídas. A prova completa usou outra base nova, não a demonstração da equipa. + +## O que mudou + +- `/purchasing/workspace`: mapa das etapas autorizadas no contexto actual. `WorkspaceNavigation` usa capacidades e direitos existentes; não cria novos nomes de direitos, indicadores fictícios, decisões ou efeitos financeiros. O runtime conserva as guardas de ambiente, base, empresa/unidade e origem. +- Navegação comum nas sete páginas de Compras, preservando os formulários, prévias, históricos, versões e validações nativas. O mapa pertence expressamente ao módulo Compras; mudar para Comercial exige voltar ao contexto correcto antes de o abrir. +- Modo explícito `integrated` no compositor QA. Combina os preparadores existentes numa base de host e numa base nativa novas, com as mesmas identidades e o mesmo pacote fixado. A chefia de requisições/adjudicação mantém-se distinta das identidades financeiras, incluindo depois de montar facturas e obrigações. +- Reutiliza o ciclo `sgf.request.command` e os filtros de origem já implementados. A requisição criada durante o teste chega às propostas, ordem, factura e obrigação sem acrescentar IDs estáticos à ligação e sem criar orçamento ou dívida concorrentes no host. + +## Provas e preservação + +[Consolidação](proofs/purchasing-integrated-composition-20261103.json): **68 verificações** — percurso integrado29, guardas5, navegação inicial6, demonstração25 e build/assets3. A etapa integrada confirma uma reserva, um compromisso, um consumo100MZN, um movimento físico e uma obrigação100MZN/saldo100MZN, com vencimento desconhecido. Orçamento do host inalterado, zero pagamentos e zero atribuições geográficas automáticas. + +Os26 primeiros critérios do percurso passaram. A verificação final esperava403 para Comercial; nesta composição, a referência geográfica torna esse módulo disponível à identidade financeira, pelo que a recusa correcta de um percurso de outro módulo é409. Corrigiu-se apenas essa expectativa e retomaram-se os três critérios finais, sem repetir comandos financeiros. A prova individual anterior de concorrência/recuperação mantém-se válida e não foi reexecutada. + +As25 verificações da demonstração conferem os sete perfis, navegação filtrada, páginas efectivamente servidas e a ausência de alteração de dados ao navegar. São provas HTTP/build, não revisão visual. O código continua funcional nos serviços originais; não se substituiu a implementação por documentação ou fotografias pré-calculadas. + +As provas anteriores72/77/103/83 e respectivos manifestos foram preservadas e reutilizadas, sem recontagem como testes novos. Sem ligações à base de destino, alterações dos seis registos protegidos, limpeza da cache bloqueada, actualização das demos anteriores, novas concessões reais, activação de Compras, publicação, aceitação ou checkpoint. + +A [matriz actualizada](proofs/purchasing-integrated-matrix-20261103.json) mantém seis módulos,13estágios e104critérios documentados. A [inspecção estática](proofs/purchasing-integrated-flow-20261103.json) encontra69fontes e nenhum ciclo obrigatório; estes totais não são testes operacionais adicionais nem prova de implantação. + +## Limitações + +Esta composição reúne **o percurso de Compras**, não todos os seis módulos do ERP numa instalação final. A nova origem ainda não inclui pagamentos/afectações, migração da responsabilidade de histórico, contabilização, correcções/notas de crédito ou anexos binários de facturas. Essas capacidades mantêm os âmbitos e aprovações próprios; não são activadas por navegar no mapa. + +Revisão financeira de fornecedores e decisões geográficas conservam as provas anteriores; este incremento não repete as suas suites completas. Não se migram os antigos `ir_requests` com reserva no host. Vencimento desconhecido não é convertido em atraso ou data inventada. + +Revisão visual continua separada, sem repetir o navegador bloqueado. Carga sustentada, instalação geral e separação de proprietário/runtime permanecem por validar. O schema sintético é preparado pelas migrações nativas actuais e o runtime usa o pacote fixado anteriormente; estes ensaios não validam capacidade de implantação. diff --git a/docs/SGF_PURCHASING_USABLE_CONTINUITY.md b/docs/SGF_PURCHASING_USABLE_CONTINUITY.md new file mode 100644 index 0000000..1cd6302 --- /dev/null +++ b/docs/SGF_PURCHASING_USABLE_CONTINUITY.md @@ -0,0 +1,45 @@ +# Continuidade utilizável e isolamento de históricos — 03/11/2026 + +`SGF-PURCHASING-USABLE-CONTINUITY-QA-v1` corrige duas falhas da interface de recepção, completa as ligações recepção → factura → obrigação e fecha uma fuga de eventos entre históricos de etapas do percurso QA. + +## Correcções funcionais e integração + +A linha de recepção criava um elemento `select` simples, embora o restante formulário tentasse usar `activate` e `selected` do selector pesquisável. Foi ligada ao `stockChoice` já existente. Marcar a linha agora activa a pesquisa por linha, permite escolha expressa do artigo e envia o ID e a impressão da versão na prévia. Alterar/desmarcar a escolha mantém as invalidações existentes. + +O primeiro pedido do selector enviava `search=`. O middleware convertia esse texto vazio em `null`, que era recusado por `sometimes|string`. Os catálogos de artigos e fornecedores agora aceitam o filtro vazio/nulo como ausência de pesquisa. Pesquisa literal não vazia, paginação, isolamento, estados do processo e rejeição de arrays/parâmetros desconhecidos mantêm-se. Não se retirou uma regra nativa para tornar o catálogo disponível num processo fechado. + +A recepção abre as facturas da mesma ordem. Cada factura abre a obrigação dessa origem, as recepções da ordem e, havendo acesso, o dossiê da requisição. A obrigação volta à factura exacta e à sua ordem física. Os atalhos adicionais só aparecem quando a etapa consta do menu apresentado; isso é uma indicação de interface, não autoridade. Cada API de destino continua a validar o contexto e o acesso actual. A funcionalidade adicional fica desligada por omissão em `receipt_qa.continuity_enabled`. + +## Isolamento dos históricos + +Os detalhes da requisição e o histórico paginado das propostas consultavam toda a auditoria da requisição. Numa origem com factura/obrigação posteriores, podiam devolver esses eventos e respectivos payloads a um perfil limitado à etapa anterior. A prova antiga do dossiê não cobria esta via alternativa. + +`ProcessHistory` aplica o âmbito **na consulta SQL, antes do limite, contagem e paginação**. Requisição mostra apenas `requisition.*`/`sgf.request.command`; propostas mostram os eventos da requisição, propostas e adjudicação. Facturas conservam o seu endpoint próprio de histórico autorizado. A auditoria original não foi apagada, alterada ou reclassificada. O dossiê continua a fazer a consulta transversal filtrada pelas permissões de cada etapa. + +Não foram criados direitos, writers ou endpoints de confirmação. Os blocos `preview`/`confirm` dos controladores de requisição, propostas e recepção foram comparados com8078 e são iguais; os controladores de factura/obrigação e os manifestos nativos também se mantêm. + +## Provas afectadas + +[Consolidação técnica](proofs/purchasing-continuity-composition-20261103.json): **55 verificações**. + +- 17 de interface simulada com **HTTP real**: carregar a ordem, activar a linha, pesquisar, escolher o artigo, enviar versão, conferir, invalidar prévia por edição, confirmar e recuperar uma resposta perdida após commit. Resultado real:201/200, uma recepção e um movimento de1000milésimos/1UN, artigo escolhido preservado. Não é uma nova prova de concorrência. +- 8 de fronteiras dos filtros: pesquisa inicial vazia igual à omitida; espaços tratados como filtro vazio; arrays/tamanho de página/parâmetros inválidos recusados; direito de Compras e fecho por adjudicação respeitados. Mantém uma recepção/movimento e zero facturas, obrigações ou pagamentos. +- 12 de históricos: o livro canónico anterior contém os eventos financeiros que reproduziam a falha; requerente/Compras/Finanças recebem apenas a história da requisição nesse endpoint; todas as páginas de propostas mantêm os seus eventos únicos e excluem os posteriores. Finanças conserva o histórico da factura e o acesso indevido continua recusado. +- 9 de ligações na interface: origem exacta, menu limitado, modo desligado, compatibilidade do dossiê e abertura só com GET. +- 9 da demonstração: estados iniciais, flags nas três áreas e SHA dos quatro módulos estáticos afectados, sem alteração dos dados/auditoria/concessões seleccionados. + +A regressão de interface usa a composição nova `ce4c9bef1a51`, no cluster isolado55439. A ordem de100MZN foi preparada pelos workflows efectivos necessários. Uma requisição adicional aberta de1MZN é fixture delimitada para ensaiar o selector de fornecedores antes da adjudicação: reserva própria100unidades menores no mesmo livro, sem segunda ordem/dívida. Não é repetição da suite financeira anterior. + +Os históricos reutilizam o livro já concluído `b4093c6f6707`, através da aplicação de leitura nova `purchasing-continuity-read-e266c0e778c2`: **142 tabelas e sequências intactas**, sem repetir comandos. As provas válidas de catálogo/paginação/concorrência/dossiê anteriores foram preservadas. + +Verificação final: sintaxe de11 ficheiros PHP e12 JavaScript aprovada; `git diff --check` sem erros de espaços. Matriz/inventário actualizados: seis módulos,13 etapas,85 fontes, zero ciclos obrigatórios e134 critérios documentais conferidos. Os números do inventário não são testes operacionais adicionais ou validação dos módulos completos. + +O primeiro ensaio de interface parou antes da confirmação, o que revelou a validação de pesquisa vazia. Os diagnósticos privados foram conservados; após a correcção, o percurso real terminou com as17 verificações. Não se declara esse ensaio inicial como aprovado ou uma revisão no navegador. + +## Demonstração e limites + +Nova demonstração **8079**: [Solicitante](http://127.0.0.1:8079/qa/enter/requester?open=1), [Compras](http://127.0.0.1:8079/qa/enter/actor?open=1), [Armazém](http://127.0.0.1:8079/qa/enter/validator?open=1), [Finanças](http://127.0.0.1:8079/qa/enter/issuer?open=1). Composição `2d2d938a3bec`, sem operações principais/recepções/facturas/obrigações iniciais, com fornecedores e orçamento QA preparados. Conserva as funcionalidades de dossiê, cartografia e anexos já entregues. + +8078 e anteriores, seis registos protegidos, cache bloqueada, provas e trabalho alheio preservados. Sem migração/concessão real, activação de Compras, publicação, aceitação ou checkpoint. + +Os testes usam DOM simulado; a ligação HTTP real comprova o contrato funcional, não renderização, acessibilidade ou aceitação visual. A revisão visual continua separada, sem repetir a via bloqueada de navegador. Os atalhos não aprovam, determinam prontidão ou executam a etapa seguinte. A requisição conserva os últimos25 eventos próprios no detalhe; propostas continuam paginadas e o dossiê mantém evidência transversal filtrada. Não foram alterados React/CSS/dependências do build Vite: preserva-se a prova válida anterior, verificando sintaxe e bytes servidos dos módulos ES estáticos afectados. Carga sustentada, instalação e capacidade de implantação exigem provas próprias. diff --git a/docs/SGF_RECEIPT_DOCUMENTS_DELIVERY.md b/docs/SGF_RECEIPT_DOCUMENTS_DELIVERY.md new file mode 100644 index 0000000..e9ebe0c --- /dev/null +++ b/docs/SGF_RECEIPT_DOCUMENTS_DELIVERY.md @@ -0,0 +1,42 @@ +# Anexos privados da recepção — entrega local de 03/11/2026 + +`SGF-RECEIPT-DOCUMENTS-QA-v1` implementa guias de entrega, relatórios de qualidade e outros documentos no histórico de cada recepção. Reutiliza `ReceiptDocuments::add` e a descarga do controlador original fixados no manifesto da composição, sem outro writer. A área abre ao consultar uma recepção no histórico; os eventos documentais entram também no dossiê da requisição, nas páginas e etapas autorizadas. + +## Comportamento + +- Metadados privados em páginas SQL de15, ordenadas por ID descendente; sem caminhos de armazenamento ou tenant nativo no resultado. +- Tipo e ficheiro escolhidos individualmente, fundamento obrigatório, prévia reversível e impacto antes de confirmação. A prévia não altera registos/auditoria e remove apenas o ficheiro temporário que criou. +- Confirmação vincula bytes/SHA, nome, pessoa, contexto da sessão, perfil de origem, versão da recepção e prazo de600segundos; volta a verificar permissões e autoridade nativa. A versão refere-se à recepção imutável, não transforma anexos em nova decisão de qualidade. +- Reutiliza `purchasing_receipts.view/confirm`, admissão da ordem/origem por empresa/unidade e políticas originais. Não cria direitos novos. Ambas as funcionalidades de anexos ficam desligadas por omissão fora das composições QA. +- Uma chave recupera o resultado sem outra escrita. Outra intenção explícita com o mesmo tipo/SHA na mesma recepção reutiliza o documento original e o seu nome, mantendo o novo evento de intenção. Não há deduplicação global entre recepções ou tipos. +- Descarga original com verificação SHA, confinamento privado, `nosniff`, sem cache e CSP sandbox; autor/data/documento/SHA ficam no histórico da requisição. Anexos não alteram quantidades, qualidade, aceitação, ordens ou movimentos físicos e não criam factura, obrigação ou pagamento. +- Compensação após falha elimina apenas ficheiro novo cujo registo se comprovou não confirmado. Resultado de commit incerto conserva evidência para recuperação. Reutilizar documento existente nunca autoriza apagar o ficheiro original. + +## Provas + +Prova consolidada: [receipt-documents-composition-20261103.json](proofs/receipt-documents-composition-20261103.json). **58 verificações**:28 principais,6 adicionais,4 guardas,8 da demonstração,3 de build/entrega de assets e9 de lógica do componente com DOM simulado. + +Regressão isolada `1968d008dac9`, cluster QA55439: origem mínima produzida pelos workflows efectivos de requisição, propostas/avaliações, adjudicação, ordem e recepção. Não foram repetidas as suites anteriores. Um documento foi criado pela API e15 pelo mesmo serviço nativo para preparar volume:16 registos/ficheiros, páginas15/1, zero ficheiros temporários. Uma segunda intenção API reutiliza o primeiro documento. Duas sessões concorrentes terminam com201/200, um documento e um ficheiro. Falha na auditoria exterior reverte o registo e compensa o ficheiro; repetir depois termina correctamente. + +Inclui recusas por direito retirado, tipo/extensão/conteúdo inválidos, bytes substituídos, revisão incompatível, conferência expirada, perfil/contexto alterado, outro módulo/unidade e proprietário inexistente. Alteração dos bytes armazenados impede descarga e recuperação. O ramo original de prévia de documentos do fornecedor foi exercitado após a generalização do helper, preservando o fornecedor e os16 anexos da recepção. + +Verificação final: sintaxe de14 ficheiros PHP e9 JavaScript aprovada; build privado e correspondência dos assets servidos aprovados. `git diff --check` sem erros de espaços. Inventário estático actualizado: seis módulos,13 etapas,80 fontes, zero ciclos obrigatórios; matriz com118 critérios documentais conferidos. Estes números de inventário não são testes funcionais adicionais ou validação operacional de todos os módulos. + +As provas válidas do prefixo foram conservadas. O teste do dossiê foi corrigido para usar Compras e a página efectiva do histórico: Armazém não tem direito de entrada no dossiê. A recusa de outro módulo para Armazém é403, por falta desse acesso, ao contrário do409 de um perfil que também tenha acesso ao módulo. As verificações finais retomaram apenas o sufixo pendente. A asserção física final confirma uma recepção e um movimento de1000milésimos; não se apresenta uma fotografia integral antes/depois de todas as tabelas do percurso. + +## Demonstração e preservação + +Composição nova `8c363c2b4ac1`, loopback **8077**: + +- [Compras](http://127.0.0.1:8077/qa/enter/actor?open=1): iniciar requisição e continuar o percurso integrado. +- [Armazém](http://127.0.0.1:8077/qa/enter/validator?open=1): recepções e respectivos anexos. + +Começa sem requisições principais, recepções ou anexos; três fornecedores e orçamento QA preparados. Os probes de leitura preservaram a fotografia de fornecedores/recepções/documentos/auditoria da nova demonstração. Código raiz e cópias QA foram comparados por SHA; manifestos nativos mantêm os pins anteriores. As provas anteriores e `packages/purchasing/current.json` foram conferidos, sem os substituir. + +8076 e anteriores, seis registos protegidos, cache bloqueada, dados/acessos reais e alterações alheias não foram modificados. Sem migração no destino, activação de Compras, publicação, aceitação ou checkpoint. + +## Limitações e próximos trabalhos separados + +O ensaio binário positivo usa PNG. As regras nativas de PDF/JPEG foram preservadas, sem declarar nova regressão completa desses leitores. Anexar não certifica autenticidade, validade fiscal ou tipos universalmente obrigatórios. Reconciliação de ficheiros órfãos após crash, retenção, quotas e carga sustentada de armazenamento continuam pendentes. Sequências de prévias podem avançar e directórios temporários vazios podem permanecer. + +O DOM simulado prova lógica de tipos, impacto, confirmação explícita, edição e respostas atrasadas; não constitui revisão visual, acessibilidade ou aceitação no navegador. Não foi repetida a via de navegador bloqueada. O schema QA é preparado a partir da fonte actual e o runtime permanece fixado; instalação geral, compatibilidade de implantação e privilégios mínimos exigem prova própria. A aplicação completa não é declarada terminada por esta entrega; anexos/correcções de outros documentos e restantes lacunas da matriz mantêm o seu âmbito separado. diff --git a/docs/SGF_RECEIPT_WORKFLOW_DELIVERY.md b/docs/SGF_RECEIPT_WORKFLOW_DELIVERY.md new file mode 100644 index 0000000..11be3c5 --- /dev/null +++ b/docs/SGF_RECEIPT_WORKFLOW_DELIVERY.md @@ -0,0 +1,61 @@ +# Recepção de mercadoria no SGF — entrega funcional QA + +03/11/2026. Está implementado o percurso **ordem → conferência no SGF → confirmação → movimento único → histórico**. A configuração operacional permanece desactivada no destino. + +## Demonstração utilizável + +Nova composição isolada, com uma ordem de 2 cx, nenhuma recepção e nenhum movimento inicial: + +- [Recebedor sintético](http://127.0.0.1:8064/qa/enter/actor?open=1): conferência e confirmação. +- [Leitor sintético](http://127.0.0.1:8064/qa/enter/validator?open=1): consulta sem capacidade de confirmar. +- [Emissor da ordem](http://127.0.0.1:8064/qa/enter/issuer?open=1): a política original impede receber a própria ordem. + +Seleccionar a ordem, preencher guia/data, escolher armazém, marcar a linha e indicar quantidades recebida/aceite, qualidade e artigo. Conferir o impacto e confirmar. Aceitar integralmente 2 cx conclui a ordem; recepção parcial conserva os acumulados. Reservas/rejeições exigem evidência e não se tornam aceitação automaticamente. Abrir a recepção no histórico mostra o documento e o movimento original. + +Se a resposta se perder, repetir a mesma confirmação recupera o registo original. O formulário conserva a chave preparada. Alterar campos exige nova prévia; uma origem entretanto alterada exige nova conferência. A prévia tem validade de dez minutos; o histórico permanece consultável sem repetir comandos. + +As entradas automáticas acima pertencem apenas ao launcher privado em loopback, fora das rotas operacionais. Cookie, armazenamento e bases são novos; 8039, 8062/8063 e restantes demonstrações permanecem preservadas. + +## Workflow e autoridade únicos + +`ReceiptRuntime` compõe localmente o `ReceiptWorkflow` original de Compras, incluindo políticas, validação, conflitos, quantidades cumulativas, auditoria e hooks de lotes/reposição. Não usa um conector HTTP ou um novo algoritmo de recepção. O empacotamento transforma somente tokens PHP de namespace `App` para permitir coexistência com os modelos SGF. Expressões de negócio e strings não mudam; originais e pacote têm hashes fixados. + +O writer físico continua a ser `inventory-write/releases/0.1.0`, manifesto `f0b99e591f9a4df135e685f64ceffad77bed259222debe0f34c20f95e3cad800`. Não existe cópia SGF concorrente de recepções ou movimentos. Documento, linhas, movimento, auditoria original e proveniência SGF pertencem à mesma transacção nativa. A proveniência regista contexto/operador SGF, versão da composição e recepção; falhar essa auditoria desfaz a confirmação inteira. Repetições não duplicam efeito ou proveniência. + +Operador, tenant de origem, empresa/unidade SGF, ordens e armazéns são ligados explicitamente na fixture. Não se presume equivalência numérica entre identificadores nem se fazem associações automáticas. A prévia cifrada vincula operador, contexto, ordem, revisão, versão da composição e prazo. Na confirmação, o workflow original revalida a operação. + +O host bloqueia e revalida os direitos/participação até terminar a transacção nativa; não escreve uma segunda cópia de negócio. Ligação, autenticação e ambiente temporários são restaurados no sucesso e na recusa. O contexto de execução de reposição conserva o singleton original. + +Os direitos apresentados durante a implementação são `purchasing_receipts.view` e `purchasing_receipts.confirm`, ambos de unidade, apenas nas novas fixtures. Não foram adicionados ao catálogo público ou concedidos a contas reais. A política nativa permanece obrigatória, incluindo separação do emissor. O percurso pertence a Compras e usa sessão, CSRF e geração de contexto. A ligação na página de Compras depende da capacidade explícita e do direito na unidade. + +Configuração desligada/produção recusam antes de aceder à fonte. Host, porta, bases/roles, cluster, localização e manifesto estão restringidos às composições QA novas. Não se instala ou activa a candidata de Compras no destino. + +## Provas dirigidas e reutilização + +[Manifesto com resultados e hashes](proofs/receipt-composition-20261103.json): **68 verificações de auxiliares**, não 68 percursos de negócio independentes. + +| Grupo | Verificações | Resultado | +| --- | ---: | --- | +| Percurso HTTP SGF | 30 | Prévia sem efeitos, recepção parcial/qualidade, movimento único, histórico, repetição e recusas de contexto, versão, acesso e quantidade cumulativa | +| Concorrência/recuperação | 10 | Dois workers e sessões independentes: mesma chave201/200; intenções diferentes201/409; falha após inserção física, rollback e recuperação | +| Proveniência atómica | 6 | Falha da auditoria desfaz documento/movimento/auditoria original; recuperação sem duplicação; ordem integralmente aceite chega a `complete` | +| Contrato de composição | 4 | Desligado/produção sem SQL; contexto nativo e restauração do host | +| Entrada React | 6 | Capacidade/direito/unidade, desligado e preservação de requisições | +| Demonstração sem consumir decisões | 9 | Perfis, página/script e fingerprint de negócio inalterado | +| Assets compilados servidos | 3 | Página inicial e JS/CSS correspondem ao build privado | + +Na regressão, uma ordem recebeu 1 cx/0,75 aceite e mais 1 cx/1 aceite: dois movimentos, 1,75 cx no total, com `quality_pending`. Outro cenário completou 2 cx por quatro recepções de 0,5 cx, incluindo concorrência e recuperação. Estes dados são de regressão; a demonstração continua sem recepções iniciais. + +As primeiras21 e depois29 verificações válidas foram conservadas e reutilizadas após corrigir duas expectativas do auxiliar: o validador original devolve422 para armazém de outro tenant antes da verificação de ligação; a tabela nativa de facturas é `invoices`. Não se repetiram as confirmações já aprovadas nem se apagou a execução parcial. As suites gerais, a fila administrativa e a carga anterior não foram repetidas. + +Durante a conferência detectou-se alteração paralela ao `GoodsReceiptController` de Compras. Foi preservada; esse controlador não é usado pelo adaptador, que chama directamente o workflow original. O pacote continua fixado na versão testada e o manifesto regista os dois hashes, sem adoptar ou sobrescrever o trabalho alheio. + +## Estado, limites e próximo método de trabalho + +**Funcionalidade tecnicamente encerrada em QA:** interface SGF até ao histórico com workflow e writer originais. A ordem de entrada é uma fixture emitida; não se declara criação/emissão de ordens pela interface SGF ou repetição de adjudicação/aprovação. A instalação geral de procurement continua separada. + +O selector apresenta até100 artigos da origem; pesquisa completa de catálogos maiores permanece pendente. Ordens e histórico têm paginação no servidor. Não se validam carga sustentada, revisão visual, Octane com workers persistentes, separação owner/runtime ou capacidade de implantação. As roles novas são proprietárias somente das suas bases QA; o pacote com namespace próprio é uma composição delimitada. + +Sem factura, obrigação, pagamento, lançamento ou ligação stock–custos por consequência da recepção. Seis registos protegidos, cache bloqueada, provas/demonstrações anteriores e configurações/direitos reais preservados. Sem publicação, activação no destino, aceitação presumida ou checkpoint. + +Após a orientação do utilizador, as próximas entregas devem concluir conjuntos funcionais e reutilizar provas válidas. Definir contratos entre módulos durante a construção e testar as fronteiras alteradas/percurso completo na ligação. Não substituir conclusão de funcionalidades por novos ensaios de optimização. diff --git a/docs/SGF_RECEIPT_WORKSPACE_COMPLETION.md b/docs/SGF_RECEIPT_WORKSPACE_COMPLETION.md new file mode 100644 index 0000000..830370e --- /dev/null +++ b/docs/SGF_RECEIPT_WORKSPACE_COMPLETION.md @@ -0,0 +1,44 @@ +# Recepção: catálogo integral e histórico navegável + +03/11/2026. `SGF-RECEIPT-WORKSPACE-COMPLETION-QA-v1`. Completa duas lacunas funcionais da interface de Armazém: escolha de artigos além dos100primeiros e navegação pelo histórico além da primeira página. Reutiliza o workflow físico e o writer existentes, sem acrescentar valorização, dívida ou efeitos financeiros. + +## Experimentar em8075 + +A nova composição mantém o percurso integrado, o selector paginado de fornecedores e o dossiê. [Solicitante](http://127.0.0.1:8075/qa/enter/requester?open=1) prepara uma requisição1UN/100MZN; [chefia](http://127.0.0.1:8075/qa/enter/approver?open=1) aprova; [Compras](http://127.0.0.1:8075/qa/enter/actor?open=1) e [Finanças](http://127.0.0.1:8075/qa/enter/issuer?open=1) seguem propostas/avaliações e adjudicação distinta até à emissão da ordem. + +[Armazém](http://127.0.0.1:8075/qa/enter/validator?open=1) abre a ordem efectivamente emitida. Em cada linha, pesquisa código/nome e escolhe individualmente um artigo da mesma unidade e das ligações conhecidas. `QA-CATALOG-0110` é um exemplo além do antigo limite. O histórico permite percorrer páginas e abrir as fotografias originais. Mudar de pesquisa/página limpa a escolha e a prévia; uma resposta atrasada não substitui a escolha mais recente. + +A demonstração começa sem requisições principais, ordens ou recepções. Os artigos adicionais são preparação explícita de catálogo QA, não movimentos, associações reais ou decisões já tomadas pela equipa. Três fornecedores, orçamento QA1000MZN e127artigos adicionais preparados; nenhuma localização atribuída.8074 e anteriores permanecem intactas. + +## Implementação + +- `/api/purchasing-receipts/orders/{id}/lines/{line}/catalogue`: pesquisa literal por código/nome, ordenação código/ID e páginas25ou100 no SQL. Exige o direito existente `purchasing_receipts.confirm`, a autoridade nativa de Armazém e a linha da ordem autorizada. O cliente não escolhe a unidade por parâmetro. +- A unidade segue a comparação nativa, sem conversão: caixa e espaços externos são normalizados. O filtro respeita as ligações conhecidas de catálogo, abastecimento e peça da ordem, recorrendo aos serviços existentes. Serviços não recebem opções de stock. O workflow original continua responsável pela admissibilidade final completa. +- A projecção contém apenas ID, código, nome, unidade e impressão da escolha; não apresenta custos ou valorização. O formulário usa o modelo assíncrono de escolha já testado, sem reescrever esse mecanismo ou seleccionar o primeiro resultado automaticamente. +- O catálogo só é pedido para linhas marcadas para conferência, evitando um pedido inicial por cada linha da ordem. Desmarcar a linha cancela logicamente a pesquisa pendente e limpa a escolha. A fonte final desta alteração foi conferida no servidor; não se declara interacção visual verificada. +- A prévia captura as impressões dos artigos explicitamente indicados, conferindo a impressão enviada pelo formulário quando presente. A confirmação de uma operação nova bloqueia/reconsulta esses artigos e recusa alterações desde a prévia. O metadado de selecção é separado do payload entregue ao writer original. +- Compatibilidade: clientes anteriores podem omitir `item_revisions`; uma prévia nova captura as impressões actuais e a confirmação confere-as. Recepção já registada continua recuperação histórica pelo writer, sem novo movimento. Ligações implícitas que já pertenciam à ordem continuam sob autoridade do workflow nativo; este incremento não cria outras associações. +- `/api/purchasing-receipts/orders/{id}/history`: paginação25 com o direito existente de consulta, preservando origem/unidade. Os controlos do histórico pedem só essa página, sem voltar a carregar progresso, armazéns e catálogo. Detalhes atrasados de outra página não são anexados à página actual. +- O resumo legado `items` da consulta da ordem fica limitado a25 e não representa o catálogo completo. A interface actual usa a pesquisa por linha. As fotografias/históricos imutáveis e o writer físico permanecem os mesmos. + +## Provas + +[Consolidação](proofs/receipt-workspace-completion-20261103.json):41verificações — fronteira funcional27, guardas4, demonstração6, build/assets3 e fonte final1. As provas anteriores do modelo assíncrono e do percurso integrado foram reutilizadas, sem repetir as suas suites. + +O novo ensaio preparou uma ordem pelos workflows existentes para exercer a fronteira alterada. Consultou127artigos compatíveis em páginas25/100, atingiu a escolha além100, excluiu outra unidade/tenant, tratou `%`/`_` literalmente e recusou parâmetros inválidos, linha alheia e perfis sem confirmação física. Nenhum direito novo foi criado. + +Alteração do artigo após escolha/prévia foi recusada, sem recepção ou movimento. Um pedido legado com unidade incompatível manteve a recusa pelo workflow original na confirmação; a prévia existente não é apresentada como validação integral desse workflow. Duas confirmações simultâneas da mesma prévia produziram201/200 e um só efeito físico. + +O histórico de volume tem27recepções que somam exactamente1UN: duas confirmações pela API alterada (0,010 e0,965UN) e25recepções parciais de0,001UN preparadas directamente pelo **mesmo writer nativo fixado**, somente como fixture de histórico. Não são27novas provas de interface. Páginas25/1 antes da última recepção eram distintas, e o detalhe antigo preservou o artigo/fotografia originais. O pedido legado final concluiu a ordem sem excesso ou duplicação. + +Sem facturas, obrigações, pagamentos, contabilização ou localizações criadas por consequência deste incremento. Demonstração e regressão usam bases novas separadas; os ensaios de volume não preenchem o histórico da demo da equipa. + +A [matriz conferida](proofs/receipt-workspace-matrix-20261103.json) conserva seis módulos,13estágios e114critérios documentados. A [inspecção estática](proofs/receipt-workspace-flow-20261103.json) encontra76fontes e nenhum ciclo obrigatório, sem ligações a bases. Passaram9verificações de sintaxe PHP,7de JavaScript e `git diff --check`; os totais estáticos não constituem novas provas operacionais. + +## Limitações e preservação + +Os ensaios completos deste incremento cobrem o caso consumível emUN. Os filtros de abastecimento/peças reutilizam serviços nativos e não constituem nova regressão integral desses percursos. Custos, conversões de unidade, valorização, catálogo real e pagamentos não foram implementados por arrasto. + +Pesquisa paginada e27recepções não validam carga sustentada ou implantação. A revisão visual permanece separada, sem repetir o navegador bloqueado. O schema sintético é preparado pelo projecto nativo actual, com runtime fixado ao pacote provado; separação de proprietário/runtime e instalação geral continuam pendentes. + +Sem alterações dos seis registos protegidos, da cache bloqueada, das demonstrações anteriores, de acessos/dados reais ou do pacote de Compras instalado. Sem índices no destino, activação, publicação, aceitação ou checkpoint. diff --git a/docs/SGF_REQUEST_HISTORY_DELIVERY.md b/docs/SGF_REQUEST_HISTORY_DELIVERY.md new file mode 100644 index 0000000..c20e57b --- /dev/null +++ b/docs/SGF_REQUEST_HISTORY_DELIVERY.md @@ -0,0 +1,33 @@ +# Histórico detalhado integral da requisição — 03/11/2026 + +`SGF-REQUEST-HISTORY-CURSOR-QA-v1` remove o limite de consulta aos últimos25 eventos da requisição. A interface passa a percorrer eventos mais antigos/recentes em blocos de25 ou100, mantendo o histórico próprio da etapa e o formulário ainda não gravado. + +## Implementação + +O detalhe reutiliza a primeira página já carregada. As seguintes usam `GET /api/purchasing-requests/{id}/history`, com `cursorPaginate` e ordenação por ID descendente. A consulta aplica primeiro a origem autorizada e o filtro `ProcessHistory` existente; não materializa o histórico inteiro nem calcula uma contagem global. A implementação de paginação lê apenas o bloco e a entrada adicional necessária para detectar continuação. + +Os cursores são cifrados e autenticados, vinculados à requisição, utilizador, perfil/contexto e tamanho do bloco, com validade de dez minutos. Cada consulta volta a verificar direito `purchasing_requests.view`, fonte e contexto actual. Trocar utilizador, requisição, contexto ou tamanho exige começar uma consulta nova. Cursor inválido/expirado tem recuperação explícita por **Actualizar histórico**; não se escolhe outra origem ou se confirma uma operação. + +O componente tem protecção contra respostas atrasadas e consulta de um registo entretanto substituído. Actualizar/paginar só altera o painel do histórico: não apaga o formulário da requisição. Sem a flag `receipt_qa.request_history_enabled`, mantém-se a consulta legada dos últimos25 e a guarda do controlador novo recusa antes de consultar dados. Não existem direitos novos. Os blocos de preparação/confirmação da requisição e o filtro de etapas são iguais aos da entrega8079. + +## Provas + +[Consolidação técnica](proofs/request-history-composition-20261103.json): **36 verificações** —20 API/preservação/guardas,10 de interface com DOM simulado e seis da demonstração. + +Na base nova `0fe2284727df`, cluster isolado55439, foram preparados dois rascunhos e125 notas de auditoria QA pelo serviço nativo. A requisição de ensaio tinha127 eventos. Após consultar a primeira página, entrou mais uma nota no topo; a navegação antiga percorreu os127 IDs originais exactamente uma vez. Actualizar passou a incluir128, com páginas100/28. O cursor de regresso mostrou o bloco imediatamente mais recente. + +Inclui recusa de cursor de outra requisição/pessoa, tamanho alterado, expiração, geração de contexto nova, módulo/unidade indevidos, direito retirado, fonte estrangeira, parâmetros inválidos e ID zero. Nas sondas directas ao controlador, flag desligada e ID zero recusam sem SQL; esta medição não abrange o middleware de autenticação/contexto. O estado da requisição permanece rascunho/versão1; não há recepção, factura, obrigação ou pagamento criados pelas consultas. + +O primeiro harness herdou uma preparação de ordem100MZN anterior à requisição de histórico. Essa fixture sintética foi preservada, identificada pela sequência temporal e removida da preparação de futuras execuções. A asserção final foi corrigida para preservar essa origem existente, em vez de exigir uma base sem ordens. Os17 resultados válidos de paginação/recusas foram reutilizados; não se repetiu esse percurso. As126 notas de auditoria totais são volume de teste assinalado, não126 revisões operacionais da requisição ou decisões reais. + +Os dez testes da interface cobrem reutilização da página inicial, cursores opacos, direcção, tamanho, actualização sem perda do formulário, ausência de payload de comando, respostas fora de ordem, mudança de registo e recuperação de erro. As provas anteriores de isolamento dos históricos e dos restantes percursos foram preservadas, com o mesmo `ProcessHistory` e escritores. + +Verificação final: sintaxe de oito ficheiros PHP e oito JavaScript aprovada; `git diff --check` sem erros de espaços. Inventário/matriz actualizados: seis módulos,13 etapas,87 fontes, zero ciclos obrigatórios e136 critérios documentais conferidos. Estes números não são testes operacionais adicionais nem validação da aplicação completa. + +## Demonstração e limites + +Nova composição `92a2386b386b`, [**8080 — Solicitante**](http://127.0.0.1:8080/qa/enter/requester?open=1), sem requisições principais ou volume artificial de histórico. Conserva o percurso integrado, anexos, cartografia e atalhos anteriores. Os probes de leitura preservam requisições, auditoria e concessões da demonstração. + +8079 e anteriores, seis registos protegidos, cache bloqueada, provas e trabalho alheio preservados. Sem publicação, activação de Compras, migração/concessão real, aceitação ou checkpoint. + +A sequência de eventos permite navegação limitada sem repetição por novas entradas no topo; não é uma fotografia MVCC persistente perante quaisquer escritores externos. O cursor não substitui uma versão de conferência ou aprovação. O DOM simulado e os testes HTTP não constituem revisão visual, acessibilidade ou aceitação no navegador. Não foi repetida a via bloqueada de navegador ou o build React/Vite inalterado: os módulos afectados são ES estáticos. Carga sustentada, instalação geral e capacidade de implantação continuam pendentes. diff --git a/docs/SGF_REQUEST_TO_RECEIPT_DELIVERY.md b/docs/SGF_REQUEST_TO_RECEIPT_DELIVERY.md new file mode 100644 index 0000000..b7d7b56 --- /dev/null +++ b/docs/SGF_REQUEST_TO_RECEIPT_DELIVERY.md @@ -0,0 +1,39 @@ +# Requisição até à recepção na interface SGF + +03/11/2026. Entregue uma nova entrada para preparar, editar, submeter e aprovar requisições na interface SGF, sobre o mesmo núcleo e livro de Compras usados pelas propostas, adjudicação, ordem e recepção. O ID da requisição é preservado no percurso completo. Não há cópia de aprovações nem outra reserva no host. + +## Demonstração8068 + +- [Solicitante](http://127.0.0.1:8068/qa/enter/requester?open=1): preparar rascunho e submeter. +- [Responsável do departamento](http://127.0.0.1:8068/qa/enter/approver?open=1): decidir a requisição e, mais tarde, a adjudicação, segundo as etapas originais. +- [Compras](http://127.0.0.1:8068/qa/enter/actor?open=1): fornecedores/propostas, avaliação, escolha e ordem. +- [Finanças](http://127.0.0.1:8068/qa/enter/issuer?open=1): revisão distinta de fornecedores e avaliação individual de propostas. +- [Armazém](http://127.0.0.1:8068/qa/enter/validator?open=1): recepção e movimento físico. + +O contexto principal começa **sem requisições, reservas ou compromissos**, propostas, decisões, ordens ou recepções. Tem orçamento QA aprovado de1000MZN, centro autorizado e três fornecedores preparados na fixture. Um tenant estrangeiro contém dados negativos próprios e não está ligado a este contexto. As entradas automáticas de perfil existem apenas no launcher privado em loopback; demos anteriores preservadas. + +Ensaio comprovado: solicitante prepara1UN/100MZN sem imposto, confere a prévia, confirma o rascunho e submete. O núcleo original reserva100MZN uma vez e exige aprovação distinta. A requisição aprovada aparece em propostas sem editar listas de IDs. Seguem-se três propostas100/120/140, seis avaliações, adjudicação aprovada, uma ordem/compromisso100 e uma recepção/movimento1UN. Uma segunda necessidade de50MZN foi rejeitada, libertando apenas a própria reserva. Uma tentativa de1001MZN foi recusada por insuficiência de orçamento. + +O formulário suporta até50 linhas de consumíveis, serviços ou outros, com centro, data, fundamento e montantes explícitos. Nenhum preço, imposto, prioridade ou escolha é pressuposto. Equipamentos/peças e respectivos percursos técnicos não são expostos neste recorte. + +## Responsabilidade única + +O adaptador reutiliza `RequisitionWorkflow`, `InternalRequisitionPort`, o ciclo comum `InternalRequisitions`, as regras originais de `StoreRequisitionRequest` e o orçamento nativo. Os três ficheiros do ciclo comum são fixados por manifesto e verificados antes do carregamento. As alterações do host limitam-se à configuração das novas fixtures; os movimentos do orçamento do host ficam inalterados durante o percurso. + +Uma requisição nova fica admitida pelo contexto de empresa/unidade registado em `sgf.request.command`; as consultas seguintes a propostas, ordens e recepções verificam essa origem. Não se estabelece equivalência automática entre empresas/unidades. A API mantém funções nativas e direitos do host, com separação solicitante, aprovação, Compras, Finanças e Armazém. + +Prévia executa o comando original em savepoint com rollback. Pode avançar sequências, mas não persiste requisições, reservas, avisos internos ou decisões; omite IDs temporários na criação. Confirmação revalida direitos, contexto, manifesto, validade e revisão, executa o comando e grava a origem SGF na mesma transacção. Falhar o recibo desfaz também o recibo nativo, linhas e auditoria. Repetição exacta recupera o resultado; outra carga com a mesma chave é recusada. Versões antigas exigem nova conferência. O histórico nativo é preservado e a interface mostra os25 eventos mais recentes por requisição. + +Novos direitos de unidade, apresentados antes da preparação: `purchasing_requests.view/prepare/submit/approve`, exclusivamente QA. Não se alterou o catálogo público nem se concederam acessos reais. Novas identidades distintas permitem que a revisão de fornecedores por Finanças e a aprovação de requisições/adjudicações pelo departamento coexistam na mesma composição. + +## Provas e limitações + +[Prova consolidada](proofs/request-to-receipt-composition-20261103.json): **103 verificações** —30 da nova entrada,47 da integração até à recepção, três das guardas, seis da navegação,11 da demo, três do build/assets e três da fixação do pacote. Inclui dois workers201/200, recuperação após falha, permissões revogadas, versões antigas, acesso estrangeiro, reserva/libertação únicas e orçamento do host inalterado. + +Entre a preparação QA e a demo surgiram alterações simultâneas no repositório de Compras, incluindo os workflows de ordens/recepções. Não foram alteradas ou desfeitas. A cópia inicialmente observada pela demo foi preservada em separado no directório privado; a demo passou a usar exactamente o pacote nativo testado em QA, mantendo as bibliotecas económicas e do ciclo comum fixadas. Uma prova adicional confirmou a integridade e a leitura do contexto vazio após a fixação. Esta identidade de código não valida implantação ou equivalência de todos os esquemas da base. + +O primeiro teste encontrou um nome de tabela incorrecto no próprio verificador, antes dos comandos. Corrigiu-se para `cb_budget_entries`. O runner passou a exigir a prova da requisição concluída antes de iniciar a prova dependente. Na integração, o teste de repetição usava a identidade de Finanças para uma prévia do departamento; a aplicação recusou correctamente. Preservaram-se as37 verificações válidas e retomaram-se as10 restantes com a identidade correcta. A consulta de repetição usou um envelope QA reconstruído do recibo exacto; não se repetiu a decisão de negócio. Suites anteriores de fornecedores e módulos financeiros foram reutilizadas. + +**Requisições antigas `ir_requests` não foram convertidas.** Já têm autoridade/reserva no host; a sua passagem exige um protocolo próprio de responsabilidade financeira e recuperação entre bases. Este incremento resolve o percurso de requisições novas, sem simular essa migração ou libertar saldos antigos. + +Permanecem separados anexos, catálogos/equipamentos técnicos completos, regimes formais, correcções posteriores e instalação geral. Revisão visual, carga sustentada e capacidade de implantação continuam pendentes. Não houve ligação ao destino, alteração dos seis registos protegidos/cache/demos anteriores, migração/concessão real, activação de Compras, publicação, aceitação ou checkpoint. diff --git a/docs/SGF_REQUISITION_COMPOSITION_DELIVERY.md b/docs/SGF_REQUISITION_COMPOSITION_DELIVERY.md new file mode 100644 index 0000000..6ccf467 --- /dev/null +++ b/docs/SGF_REQUISITION_COMPOSITION_DELIVERY.md @@ -0,0 +1,38 @@ +# Requisições ligadas à composição QA do SGF — 03/11/2026 + +`SGF-REQUISITION-COMPOSITION-QA-v1`: código funcional de integração, sem instalar ou activar Compras no destino. A árvore principal SGF passa a saber montar o adaptador/interface existente num pacote QA com manifesto fixado. Não há segundo motor de requisições ou orçamento. + +## O que ficou ligado + +- `InternalRequisitionQa` confere o ambiente `budget-testing`, host/porta, nome e role exclusivos, identidade física do cluster e ausência de privilégios elevados. Confere também a localização privada e os dez ficheiros do pacote pelo manifesto SHA-256 antes de carregar o adaptador. +- A configuração fica desactivada por defeito. Presença de um ficheiro ou pacote, por si só, não activa a integração. O arranque monta rotas; não instala schema, cria dados ou concede direitos. +- As rotas existentes conservam sessão, CSRF, contexto e permissões. A navegação reconhece a pertença a Compras; leituras com token antigo e módulo incorrecto são recusadas. +- A página de Compras recebe uma capacidade explícita do servidor e só apresenta a ligação se o utilizador tiver consulta na unidade actual. O ecrã reutilizado tem retorno à navegação SGF. +- Requisição de 100 MZN → submissão → reserva única no orçamento comum → aprovação distinta → consulta/histórico. Repetições recuperam o mesmo efeito; não há consumo, factura, pagamento ou lançamento por arrasto. + +Os dez ficheiros distribuídos são idênticos aos da fonte de Compras e aos ficheiros actualmente presentes no pacote da8039, conferidos por leitura. A versão instalada `packages/purchasing/current.json` continua0.1.1, com o manifesto anterior. Não se copiavam alterações de identidade/administração da candidata para a instalação principal; o catálogo público de direitos e as concessões existentes não foram alargados. + +## Provas dirigidas + +[Manifesto público com hashes e resultados](proofs/requisition-composition-20261103.json): **50 verificações**, contando apenas as versões finais de cada prova, sem somar resultados sobrepostos. + +| Prova | Verificações | Resultado | +| --- | ---: | --- | +| Novo percurso HTTP da composição |17| Uma requisição, uma reserva100 MZN, revisão distinta, repetição sem duplicação, versão/contexto antigos e direito revogado recusados | +| Fronteiras de configuração/pacote |16| Desligado não monta rotas; produção, host/porta/role/schema/URL incompatíveis, manifesto alterado, ficheiro alterado, contrato incompleto e travessia de caminho recusados; zero SQL nestas recusas | +| Navegação/snapshot HTTP |11| Capacidade coincide com configuração, ecrã200/404 conforme composição, retorno SGF, leitura autorizada, CSRF419 e anónimo401; fingerprint de negócio/direitos inalterado | +| Renderização React dirigida |6| Ligação depende de capacidade booleana, direito e unidade; sem navegador/revisão visual | + +Base nova `budget_core_sgf_63b7b6590748`, role restrita `ir_composition_63b7b6590748`, cluster QA55439 já autorizado. A role é proprietária desta base nova; **a prova não valida separação owner/runtime de uma implantação**. Os direitos funcionais usados já pertencem ao recorte de requisições/orçamento e foram escritos apenas na fixture nova. Nenhuma ligação ou migração nas bases das demonstrações ou da Tempo. + +A primeira preparação encontrou falta de `composer.json` na cópia QA; corrigiu-se o auxiliar. A tentativa seguinte encontrou um nome errado da tabela no auxiliar de asserção, depois da submissão. Conservou-se essa execução parcial (`0fbff4f9f5db`), sem reset; a prova corrigida correu na base nova acima. A regressão de negócio passou uma vez; os complementos de segurança/navegação foram ampliados separadamente, preservando também os resultados anteriores. Não se repetiram suites gerais, ensaios de carga ou provas aceites da8039. + +Os provisionadores e saídas privadas não exportam credenciais. O launcher recusa outro cluster físico e não aceita retomar/recriar uma base existente. Os ficheiros de resultados concluídos são preservados. + +## Estado e limites + +A lacuna anterior de composição na árvore principal foi tratada **para QA**. A instalação principal permanece desactivada. A8039 conserva a sua configuração/dados e âmbito próprios; este ensaio não a substitui nem lhe atribui os resultados de outra base. + +A interface SGF de recepção continua pendente: deve reutilizar a autoridade de recepção de Compras e o writer comum, incluindo ordem, recebedor, qualidade, quantidades cumulativas, artigo/armazém e auditoria. Esta entrega não a simula com um movimento directo nem declara todo o procurement integrado. + +As provas anteriores de isolamento/concorrência/recuperação do núcleo mantêm o seu âmbito; estas50 verificações não são uma repetição integral da regressão multiempresa. Revisão visual, carga sustentada, separação SQL de implantação, instalação e capacidade de implantação permanecem separadas. Seis registos, cache bloqueada, demos, trabalho alheio e direitos reais preservados. Sem publicação, activação de candidata no destino, aceitação ou checkpoint presumidos. diff --git a/docs/SGF_SETTLEMENT_PAGED_READ_DELIVERY.md b/docs/SGF_SETTLEMENT_PAGED_READ_DELIVERY.md new file mode 100644 index 0000000..d226def --- /dev/null +++ b/docs/SGF_SETTLEMENT_PAGED_READ_DELIVERY.md @@ -0,0 +1,52 @@ +# Pagamentos e afectações SGF — histórico paginado + +Continuação posterior: [consulta SGF separada dos bloqueios de escrita](SGF_SETTLEMENT_READ_ISOLATION_DELIVERY.md). O limite de autorização com bloqueios descrito no final corresponde ao estado desta entrega inicial; a continuação preserva os seus dados e provas, sem repetir as medições. + +02/11/2026 — `SGF-SETTLEMENT-PAGED-READ-SIM-v1`. Implementação local sintética, continuação da [ligação entre origem e selecção financeira](SGF_PAYABLE_EVIDENCE_FOCUS_DELIVERY.md). Fecha a leitura integral do livro de pagamentos na composição SGF de ensaio; não activa operações reais nem altera o cálculo ou os comandos financeiros. + +## Comportamento entregue + +`SupplierSettlements::listingPage()` fornece quatro janelas independentes, ordenadas por ID decrescente: pagamentos, propostas de afectação, afectações confirmadas e eventos. Páginas de 25/100, contagens e filtros na base. Os parâmetros são `payments_page`, `allocation_proposals_page`, `allocations_page`, `payment_events_page`, `payment_per_page`, `payment_q` (referência literal), `payment_state` (`all/proposed/confirmed/rejected`) e `payment` (ID exacto no contexto). + +A selecção de pagamentos por estado/referência/ID é aplicada antes da paginação e, por subconsulta, também às propostas, afectações e eventos desses pagamentos. Não se carregam todos os IDs correspondentes para a memória PHP. `%` e `_` são caracteres literais na pesquisa. Página fora dos limites do resultado devolve janela vazia, sem regressar à leitura integral. Parâmetros desconhecidos, contexto injectado, IDs/estados/páginas inválidos recusam 422; pagamento indisponível no contexto recusa 403. + +As decisões são lidas em conjunto para os pagamentos/propostas da página. **Por afectar** usa a soma de todas as afectações e reversões dos pagamentos apresentados, e não apenas das afectações que aparecem na janela. Propostas/decisões de reversão são carregadas para as afectações da página, com a origem correspondente lida conjuntamente no mesmo âmbito. O histórico preserva as afectações originais revertidas; não as omite nem as abate duas vezes. + +A interface tem filtros e paginação para cada lista. Propostas, afectações e eventos permitem abrir o pagamento de origem mesmo quando este está fora da primeira página. Afectações ligam à evidência documental e ao reconhecimento. Os controlos conservam os filtros independentes de documentos e pagamentos; sair do foco de uma origem preserva o filtro de pagamentos. Seguir um link não concede autoridade de confirmação. + +O SGF selecciona expressamente o novo leitor no controlador comum. A composição nativa conserva `listing()` e o contrato anterior, sem substituir o pacote instalado, activar candidatas ou acrescentar configurações reais. A disponibilidade continua limitada às guardas de ambiente/schema do ensaio. Nenhum direito novo foi criado: reutilizam-se `supplier_payables.view`, `pa_access` e a autoridade financeira existente. + +## Ensaio comparável + +Base/role novas no cluster isolado 55439, distintas de todas as provas/demonstrações anteriores.61 obrigações de origens sintéticas explícitas reconhecidas com preparação/validação distintas. Um pagamento de 1,00 MZN,60 afectações de 0,01 MZN e uma reversão integral de 0,01 MZN foram registados pelos comandos existentes. Montante por afectar: **0,41 MZN**, incluindo a reversão antiga que não está na primeira página de afectações. + +Para volume,999 pagamentos são cópias sintéticas declaradas, com referências distintas e estados proposto/confirmado/rejeitado. Não equivalem a 999 workflows completos de compra/pagamento. Total: 1.000 pagamentos, 336 propostas, 393 afectações e 1.008 eventos. O recibo histórico copiado do ensaio anterior permanece íntegro e separado das novas origens sintéticas não históricas. + +| Estratégia | Tempo ms | Consultas | Pico heap PHP MiB | Pagamentos / propostas / afectações / eventos | +|---|---:|---:|---:|---:| +| Integral anterior | 2.236,559 | 3.038 | 30 | 1.000 / 336 / 393 / 1.008 | +| Janelas de 25 | 36,520 | 35 | 24 | 25 / 25 / 25 / 25 | +| Janelas de 100 | 42,644 | 35 | 24 | 100 / 100 / 100 / 100 | +| Pagamento original em foco | 28,562 | 36 | 24 | 1 / 3 / 25 / 9 | + +Os SHA-256 das quatro janelas de 25/100 são iguais aos recortes correspondentes do leitor anterior, normalizando a ordenação e excluindo apenas a nova referência navegável `local_source_id`. A posição completa do pagamento original também é igual;0,41 MZN não é calculado pelas 25 afectações visíveis. A terceira página mostra as 10 afectações antigas restantes e a reversão original, sem mudar esse valor. + +Condições: PHP 8.4.27, 512M, processo independente por estratégia, aquecimento igual pela consulta do pagamento original, mesma base e sequência integral → 25 → 100 → foco. Uma amostra por estratégia; outros processos locais não controlados. Memória é heap alocado, não RSS; o framework já tinha 24 MiB alocados. Zero pico adicional numa página não significa memória zero. **Nenhum índice foi criado ou experimentado**; o ganho observado combina janelas limitadas e leitura conjunta. Não se isolou o contributo de cada técnica. + +Este ensaio mede 1.000 pagamentos de liquidação. Não substitui nem repete as medições anteriores de 1.000/5.000/10.000 documentos de origem SGF ou nativos; os universos e as dependências são diferentes. + +## Verificações e preservação + +- Seis cenários novos, 53 asserções: janelas independentes/disjuntas, ordenação, totais, filtros nos pais/filhos, pesquisa literal, soma integral com reversão fora da página, origem recuperável e janelas vazias. +- Isolamento exercitado com pagamento e filhos de outra unidade, incluindo uma afectação estrangeira que referencia o pagamento local: não entra na soma, contagem ou resposta. Direito de consulta revogado recusa acesso apesar do direito documental geral. +- Uma leitura anterior não permite confirmar proposta antiga: uma nova reversão actualiza o ciclo; a confirmação antiga recusa e não grava decisão. Falha injectada durante a leitura desfaz a transacção do leitor e a consulta seguinte recupera sem reparação. +- 29 verificações HTTP pelo kernel real: quatro janelas, filtros, foco antigo, 100 registos, 422/403/409, CSRF 419, decisão recusada ao leitor, links/formulários, escape HTML e `no-store`. Um complemento dirigido verificou que sair da origem preserva o filtro e a página de pagamentos. Servidor temporário loopback 8047 encerrado; nenhum navegador usado. +- Pós-ensaio só de leitura confirmou o fingerprint financeiro integral igual ao baseline após a preparação do volume. Todos os comandos de alteração nos testes foram revertidos; os dados sintéticos preparados ficam conservados na base própria. As provas anteriores foram reutilizadas e conferidas por hash, sem repetir suites alheias, benchmarks ou resets. Sintaxe PHP/JavaScript e diferenças verificadas. + +Manifesto: [resultados, condições e hashes](proofs/sgf-settlement-paged-read-20261102.json). Preparação explícita: `scripts/settlement-page-run.mjs` cria nova base/role e cenário; fases nomeadas não sobrescrevem provas concluídas. Medição: `scripts/settlement-page-bench.mjs ` reutiliza medições existentes. HTTP: `scripts/settlement-page-http.mjs `. Consolidação sem repetir trabalho: `scripts/summarize-settlement-page.mjs `. Settings, credenciais, cookies e logs permanecem privados. + +## Limites separados + +A consulta de liquidação conserva os bloqueios de autorização existentes no tenant/empresa e actor. Não se demonstrou melhoria de contenção, concorrência sustentada ou capacidade de implantação. Contagens e filtros ainda fazem trabalho na base sobre os registos correspondentes; uma dependência documental individual pode ser grande. A fotografia é por pedido, sem instantâneo congelado entre páginas visitadas por uma pessoa. Comandos continuam a revalidar saldos, versão/ciclo, independência, permissões e contexto actuais. + +Não se acrescentou fornecedor histórico SGF vivo, cutover operacional, execução bancária, reconciliação ou contabilidade. Seis registos protegidos, cache bloqueada, direitos/dados reais, demonstrações e trabalho alheio preservados. Sem migração no destino, activação de Compras, publicação, aceitação ou checkpoint presumidos. Revisão visual, carga sustentada e implantação permanecem pendências distintas. diff --git a/docs/SGF_SETTLEMENT_READ_ISOLATION_DELIVERY.md b/docs/SGF_SETTLEMENT_READ_ISOLATION_DELIVERY.md new file mode 100644 index 0000000..d01f2dc --- /dev/null +++ b/docs/SGF_SETTLEMENT_READ_ISOLATION_DELIVERY.md @@ -0,0 +1,51 @@ +# Consulta de liquidação SGF separada dos bloqueios de escrita + +02/11/2026 — `SGF-SETTLEMENT-READ-ISOLATION-SIM-v1`. Continuação local sintética do [histórico paginado](SGF_SETTLEMENT_PAGED_READ_DELIVERY.md). Remove da consulta paginada SGF os bloqueios de escrita da empresa/utilizador; preserva a autoridade, os bloqueios e a conferência actual dos comandos. + +## Implementação e contrato + +O núcleo aceita uma autorização opcional e específica para a leitura paginada de pagamentos. O adaptador SGF fornece a mesma verificação existente de actor autenticado, contexto exacto, pessoa e direitos `view/payments_view`, usando o ramo sem bloqueio. Não se criou uma concessão paralela nem se concederam direitos novos. + +`SupplierSettlements::listingPage()` usa esse callback apenas na consulta. `command()` conserva o callback original de escrita; `listing()` e construtores sem o argumento novo conservam também a autorização anterior. O callback de leitura nunca autoriza uma decisão. O pacote instalado da composição nativa não foi substituído ou activado, e essa composição não optou automaticamente pelo novo contrato. + +Quando é dona da transacção, a consulta paginada inicia `REPEATABLE READ READ ONLY`. O controlador SGF inicia igualmente uma única transacção desse tipo para a leitura completa de pagamentos, posições documentais, propostas exactas e referências. Todas essas listas partilham o mesmo instantâneo do pedido. Uma leitura dentro de uma transacção já existente participa nela; não tenta mudar o isolamento depois de já haver consultas. O percurso HTTP efectivo foi verificado como transacção própria só de leitura. + +Não se alteraram os cálculos de principal, afectações, reversões ou saldo. As confirmações continuam a obter os bloqueios e a conferir os factos/versões/ciclo actuais. A identidade capturada na construção do motor é comparada novamente na consulta; direitos revogados, pessoa alterada ou actor trocado não são herdados da construção anterior. + +## Concorrência efectivamente observada + +Reutilizada a base sintética própria da entrega anterior, com 1.000 pagamentos, sem reset ou novas operações persistentes. Uma transacção principal bloqueou a linha de `companies` e preparou/confirmou, sem commit, uma reversão adicional pelos comandos comuns. Dentro dessa transacção, o montante por afectar passaria de 0,41 para 0,42 MZN. + +Três processos PHP/ligação independentes exercitaram os percursos: + +| Percurso | Enquanto o escritor mantém o bloqueio | Depois da libertação | +|---|---|---| +| Consulta paginada pelo controlador SGF | Termina em **357,581 ms**, sem `FOR UPDATE`, com `repeatable read/read_only=on`; vê 0,41 MZN e os nove eventos confirmados | Nenhuma alteração de dados | +| Consulta integral anterior, pela mesma autorização de escrita | Aguarda em `companies FOR UPDATE` | Conclui com 0,41 MZN; conserva os dois bloqueios de escrita anteriores | +| Confirmação de proposta sintética de afectação | Aguarda em `companies FOR UPDATE` | Revalida e conclui; a repetição da mesma chave recupera a mesma decisão, com exactamente uma decisão e uma afectação para o destino | + +`pg_blocking_pids` e `pg_stat_activity` identificaram a cadeia até à transacção principal. Um processo esperava no `transactionid`; o outro podia esperar no `tuple`, atrás do primeiro concorrente. A ordem variou com a chegada dos processos. O diagnóstico inicial exigia incorrectamente que ambos tivessem o pai como bloqueador directo; a prova final segue também a ligação indirecta da fila, sem confundir essa espera com outro recurso ou outra autorização. + +A consulta nova terminou enquanto **ambos os outros processos ainda estavam bloqueados**. Não observou a reversão por confirmar. O pai libertou o bloqueio por rollback; a confirmação posterior decorreu dentro de outra transacção externa, igualmente revertida depois de conferir o resultado e a repetição. Assim, a proposta sintética de afectação original mantém-se pendente e não foi efectuada qualquer decisão de pagamento histórico importado. + +Os tempos totais dos processos antigos incluem a espera, e a consulta integral lê um universo diferente do foco paginado. **Não são um comparativo controlado de velocidade por página**, throughput ou capacidade. O resultado demonstrado é a independência da consulta perante esse bloqueio de linha, com escrita ainda serializada e revalidada. + +## Provas dirigidas e recuperação + +- Quatro cenários novos, **23 asserções**: transacção própria coerente/só de leitura; ausência de `FOR UPDATE`; modo de leitura não persiste na ligação; contrato antigo mantém os dois bloqueios; callback de leitura não autoriza comandos; direitos/pessoa/actor alterados recusados. +- Reutilizados os SHA-256 das quatro janelas de 25/100 e da posição original da entrega anterior. Igualdade confirmada; os benchmarks anteriores não foram repetidos. Não se acrescentam novas medições de memória, índices ou volumes nesta entrega. +- Tentativa injectada de inserir um evento dentro da consulta: PostgreSQL recusa com `25006`, a transacção é desfeita e a leitura seguinte recupera normalmente. Nenhum evento foi gravado. +- **11 verificações HTTP reais**, dirigidas à mudança: ausência de autenticação401, JSON e HTML com isolamento/só-leitura e zero `FOR UPDATE`, posição original, contexto obsoleto409, foco indevido403, confirmação recusada ao leitor403, CSRF419 e `no-store`. A instrumentação é exclusivamente do router QA privado. Servidor loopback8047 encerrado; não houve navegador. +- Pós-ensaio só de leitura confirmou o fingerprint financeiro integral anterior: fontes, propostas, obrigações, pagamentos, decisões, afectações, reversões, eventos, comandos e direitos iguais. A decisão da proposta pendente continua ausente. Sequências podem avançar pelas inserções revertidas; não foram repostas para ocultar o ensaio. + +Manifesto: [resultados, condições e hashes](proofs/sgf-settlement-read-isolation-20261102.json). Inclui conferência dos hashes de **todos os artefactos privados registados na prova anterior**, sem a sobrescrever. Execuções diagnósticas não são contadas como aprovadas. A comparação inicial entre posições foi corrigida para comparar os valores serializados, em vez da identidade de objectos PHP distintos; o cálculo não mudou. + +Reprodução dirigida com PHP fixado: `scripts/payable-history-sgf-proof.php settlement-read-race`, `settlement-read-cases` ou `settlement-read-post`. Cada prova concluída é preservada, sem sobrescrita automática. HTTP: `scripts/settlement-read-http.mjs `. Consolidação sem repetir testes: `scripts/summarize-settlement-read.mjs `. Guardas exigem a base/role próprias do cluster55439; credenciais, sessões, entradas e logs permanecem privados. + +## Limites preservados + +Os direitos e os factos são conferidos no instantâneo de cada pedido. Uma revogação que ocorra depois desse instantâneo será observada pelos pedidos seguintes; não há fotografia congelada entre páginas visitadas por uma pessoa. As decisões continuam a conferir o estado actual no seu percurso de escrita. + +Leitura normal continua sujeita aos recursos e bloqueios gerais da base, incluindo DDL; não se garante ausência absoluta de espera. Não foi medida carga sustentada, contenção entre muitas empresas ou capacidade de implantação. A prova não altera o conjunto de medições anteriores de documentos ou pagamentos nem autoriza instalar índices. + +Sem novas rotas operacionais, direitos, migrações no destino, activação de Compras, pagamentos reais, fornecedor histórico SGF vivo, cutover financeiro, reconciliação, contabilidade, publicação ou checkpoint. Seis registos protegidos, cache bloqueada, demonstrações e trabalho alheio intactos. Revisão visual e implantação permanecem pendências separadas. diff --git a/docs/SGF_SOURCING_TO_RECEIPT_DELIVERY.md b/docs/SGF_SOURCING_TO_RECEIPT_DELIVERY.md new file mode 100644 index 0000000..763fe67 --- /dev/null +++ b/docs/SGF_SOURCING_TO_RECEIPT_DELIVERY.md @@ -0,0 +1,56 @@ +# Propostas até à recepção no SGF — bloco funcional QA + +03/11/2026. Entregue a interface de **propostas → avaliações individuais → comparação → escolha fundamentada → aprovação distinta da adjudicação → ordem → recepção → movimento e histórico**, reutilizando os controladores e serviços originais de Compras. Não há selecção ou pontuação inventadas pelo adaptador. + +## Demonstração disponível + +Nova composição8066. Começa com uma requisição sintética aprovada de1UN/100MZN, reserva100MZN e três fornecedores fictícios de origem. **Não começa com propostas, avaliações, adjudicação, ordem, recepção ou movimento.** São decisões que a equipa pode experimentar. + +- [Compras](http://127.0.0.1:8066/qa/enter/actor?open=1): registar propostas, avaliar individualmente, escolher e submeter adjudicação; emitir depois da aprovação. +- [Avaliador/conferente](http://127.0.0.1:8066/qa/enter/issuer?open=1): avaliar propostas e decidir a adjudicação por identidade distinta. +- [Armazém](http://127.0.0.1:8066/qa/enter/validator?open=1): receber apenas depois de existir ordem emitida; sem consulta económica ou adjudicação. + +Percurso sugerido para reproduzir o ensaio: Compras regista as três propostas, com preços100/120/140MZN e sem desconto, e faz as suas avaliações. O conferente avalia cada uma individualmente. As notas8/5/8 usadas nos testes são apenas valores de ensaio, não estão preenchidas automaticamente. Compras volta a conferir a comparação, escolhe expressamente uma proposta elegível do topo e fundamenta a adjudicação. O conferente aprova ou recusa. Depois Compras emite a ordem e Armazém recebe a mercadoria. + +Os formulários também permitem os tipos de desconto já suportados pelo motor original. Quantidades e linhas vêm da requisição; não são redigitadas. Campos de avaliação, fornecedor, escolha e decisão começam por preencher. A comparação incompleta permanece visível, sem tratar avaliações ausentes como zero. O histórico completo tem paginação de25 registos no servidor e consulta da evidência anterior/posterior. + +Entradas automáticas de perfil existem somente no launcher privado em loopback.8064/8065 e demonstrações anteriores são preservadas. Cookie, armazenamento e bases desta entrega são próprios. + +## Reutilização e confirmação + +`SourcingController` chama os métodos originais de `QuotationController` para registo/avaliação e `PurchaseWorkflow` para selecção/decisão. Preço, desconto, imposto documental de ensaio, elegibilidade, pontuação, conflitos, aprovações e orçamento continuam sob as regras originais. As bibliotecas económicas e o pacote de namespace permanecem fixados por manifesto. Não foi criada outra autoridade para orçamento ou stock. + +Cada operação exige prévia e confirmação individual. A prévia chama o comando original num **savepoint de rollback obrigatório**: a validação e os montantes apresentados são os mesmos do circuito nativo, sem duplicar fórmulas. Todos os registos temporários, auditoria e alterações de reserva são desfeitos antes de devolver a prévia. **Sequências PostgreSQL podem avançar**, gerando lacunas de IDs; não se promete ausência de SQL de escrita ou numeração contínua. Não se atribui identificação documental temporária na interface. Esta técnica está limitada às bases QA guardadas e aos comandos seleccionados sem envio externo. + +A confirmação revalida direitos/contexto, prazo e revisão, executa novamente o comando original e grava o resultado idempotente em auditoria append-only, na mesma transacção. O recibo inclui operador/contexto SGF, versões de origem, chave, hash do conteúdo e resultado. Falhar esse recibo desfaz também a proposta e a auditoria nativa. Repetir a mesma chave/conteúdo recupera o resultado; outro conteúdo é recusado. Uma prévia adulterada, outra origem ou uma revisão desactualizada não confirma. + +Os direitos `purchasing_sourcing.view/prepare/evaluate/select/approve` são de unidade e foram concedidos apenas nas novas fixtures. As funções nativas também são verificadas. O preparador não aprova a própria adjudicação; a janela de propostas/avaliações fecha quando a adjudicação existe. Repetir um comando já confirmado continua a consultar o resultado original, sem reabrir essa janela. Após dez minutos, consultar o histórico quando a prévia tiver expirado. + +A adjudicação nova fica disponível para ordens através da ligação explícita à requisição de origem; não se edita uma lista de IDs depois da criação. A emissão e a recepção usam os percursos já entregues. Não há associação automática de registos antigos a módulos. + +## Provas e correcção do arranque + +[Manifesto com resultados e hashes](proofs/sourcing-composition-20261103.json):74 verificações de auxiliares, não74 percursos de negócio distintos. + +| Grupo | Verificações | Evidência | +| --- | ---: | --- | +| Percurso integrado HTTP |47| Três propostas, seis avaliações, comparação nativa, escolha, aprovação, ordem, recepção e histórico; acesso, revisão, falha, repetição e dois workers | +| Guardas de activação |3| Contrato do adaptador desligado/produção recusado antes de SQL | +| Integridade do carregador |6| Código conhecido executa; alterado, ausente e travessia recusados antes de execução; outros namespaces preservados | +| Demonstração sem consumir decisões |9| Capacidades exactas, páginas/scripts e fingerprint canónico inalterado | +| Navegação React |6| Capacidade, direito, unidade e preservação de ordens/recepções | +| Build servido |3| Página inicial e JS/CSS correspondem ao build privado | + +A regressão produziu exactamente3 propostas,6 avaliações,1 adjudicação/decisão aprovada,1 ordem,1 compromisso100MZN,1 recepção e1 movimento físico. A regra de três propostas/dois avaliadores não pôde ser contornada. A escolha não ocorreu automaticamente. Confirmar duas vezes ou em dois workers deixou um único resultado. Uma falha injectada no recibo SGF desfez proposta, linhas e auditorias; retirada a causa, a mesma intenção concluiu correctamente. + +A primeira leitura da demonstração atingiu30s no verificador que relia todos os ficheiros do pacote, antes do workflow. A tentativa e o timeout do auxiliar foram preservados. O manifesto continua fixado; cada classe é agora verificada por caminho e SHA256 **antes de ser carregada**, incluindo dependências ainda não utilizadas. A conferência integral do artefacto também consta do manifesto de entrega. Não se aumentou o limite para converter a falha em sucesso. As seis provas do carregador e a consulta final da demonstração passaram; o percurso de negócio47 já válido não foi repetido por esta correcção. + +As provas anteriores dos motores, ordens e recepções foram reutilizadas. Sem suites gerais, repetição da fila administrativa ou novos ensaios de carga nesta entrega. + +## Fronteiras que permanecem + +A entrada ainda é uma **requisição nativa sintética aprovada** com cadastro de fornecedores preparado. A passagem das requisições internas SGF para essa origem, sem reserva/orçamento duplicados, tem de conservar o seu contrato próprio. A preparação/validação do cadastro de fornecedores na interface SGF, regimes formais de concurso e revisões/cancelamentos posteriores não são declarados entregues aqui. + +O orçamento canónico da origem é o único que recebe reserva/compromisso deste percurso; não se copia o efeito para o orçamento do host. O selector mostra até100 fornecedores explicitamente configurados. O cenário financeiro é de ensaio, com imposto zero, sem validação de fiscalidade ou critérios reais de cliente. + +Revisão visual, carga sustentada, implantação, separação owner/runtime e workers persistentes continuam pendentes. As roles novas são proprietárias apenas das suas bases QA. Sem factura, pagamento, contabilização ou integração stock–custos por arrasto, publicação, activação de Compras no destino, aceitação presumida ou checkpoint. Seis registos protegidos, cache bloqueada, provas válidas, dados/acessos reais e trabalho alheio preservados. diff --git a/docs/SGF_STOCK_COMPOSED_SOURCE.md b/docs/SGF_STOCK_COMPOSED_SOURCE.md new file mode 100644 index 0000000..d5e44c0 --- /dev/null +++ b/docs/SGF_STOCK_COMPOSED_SOURCE.md @@ -0,0 +1,37 @@ +# Compras → consulta de Stock na composição QA — 03/11/2026 + +`SGF-STOCK-COMPOSED-SOURCE-QA-v1` liga a consulta de Stock ao livro físico da demonstração integrada de Compras. Uma recepção confirmada pelo workflow original passa a ser observada no Stock do mesmo host, sem copiar movimentos, saldos ou criar outro escritor. + +## Entrega + +O adaptador `CompositionStockRead` reutiliza `InventoryReader` e `InventoryReadSession`. O controlador antigo mantém o percurso anterior quando a nova opção, desactivada por omissão, não está ligada. A interface React de Stock, os menus e a navegação aceite permanecem inalterados. + +O novo perfil de armazém QA recebe apenas o direito existente `stock.view`, na sua empresa/unidade. A concessão foi apresentada antes de ser aplicada à fixture. Uma conta técnica distinta possui SELECT apenas sobre artigos, armazéns e movimentos; não recebe acesso a recepções, auditoria ou obrigações. Nenhum direito real foi alterado. + +O adaptador verifica ambiente, bases, utilizadores técnicos, cluster físico, perfil privado e correspondência pessoa/empresa/unidade/armazéns. Mantém bloqueios partilhados sobre a autoridade do host durante a leitura; contenção tem limites SQL de dois segundos para bloqueios e três para instruções. A consulta física usa uma transacção própria REPEATABLE READ/READ ONLY, sem adquirir o mutex de escrita nativo. + +Os tokens de consulta incluem pessoa, contexto de sessão, filtros, origem física e mapeamento. Mudanças exigem actualização. O livro físico tem um trigger append-only criado exclusivamente nas duas bases QA novas, para tornar efectiva a premissa usada pela revisão count/max do leitor. Catálogo e armazéns continuam a ter impressões próprias. Não se instalou este trigger no destino nem nas demonstrações anteriores. + +## Provas + +[Prova consolidada](proofs/stock-composed-source-20261103.json): 41 verificações novas, 31 da integração HTTP/SQL e dez da demonstração/guardas. Duas guardas chamam directamente o adaptador; não são provas de middleware. + +A preparação mínima percorreu requisição/propostas/adjudicação/ordem pelos workflows efectivos. A fronteira alterada confirmou uma recepção de 1 UN, recuperou a mesma confirmação sem duplicação e observou o mesmo ID de movimento e quantidade exacta `1000` no Stock. Não criou factura, obrigação ou pagamento. + +Foram verificados páginas de 25/100, catálogo além de 100, pesquisa literal, projecção sem fotografia financeira, isolamento de módulo/unidade/armazém, revogação de permissão, contexto antigo, revisão após novo movimento, conta SQL sem escrita/acesso financeiro, falha de autenticação da origem e recuperação. A leitura terminou mesmo com o mutex de escrita nativo retido. Uma retenção do direito no host devolveu 503 limitado e recuperou após libertação. + +A primeira tentativa parou numa asserção demasiado restrita de recusa: o contexto Compras devolveu 409 antes da conferência de Stock, em vez de 403. A preparação já concluída foi recuperada sem emitir outra ordem. O resultado final contém as 31 verificações aprovadas. Não se repetiram suites anteriores nem se somaram as suas contagens. + +## Demonstração + +Nova composição isolada em **8083**, inicialmente sem requisições principais, recepções ou movimentos. Entrada: ; no menu Stock, abrir **Existências**. O mesmo perfil pode entrar explicitamente em Compras para recepcionar e regressar ao Stock. A consulta não troca de módulo automaticamente. + +As provas HTTP confirmaram a página inicial, o bundle servido, a sessão e a origem vazia autorizada. As consultas preservaram artigos/armazéns/movimentos/auditoria/concessões. A base de regressão contém o percurso de prova; a demonstração permanece vazia para a equipa trabalhar. + +## Limites + +O catálogo é do tenant de origem; armazéns e movimentos são apenas dos armazéns mapeados. Não foram acrescentadas reservas, bloqueios, disponibilidade calculada, valorização, custos, ligações de oficina ou efeitos financeiros. A evidência documental completa continua no percurso autorizado de Compras. + +Revisão visual, acessibilidade, carga sustentada, compatibilidade de instalação e capacidade de implantação continuam pendentes. O bundle servido não constitui prova visual. As guardas mantêm esta composição exclusivamente sintética; não há ligação operacional instalada. + +Preservados os seis registos sem associação, a cache bloqueada, provas, checkpoints, demonstrações anteriores e trabalho alheio. Sem publicação, activação de Compras, migração no destino, concessão real, aceitação ou checkpoint presumido. diff --git a/docs/SGF_STOCK_PERIOD_REPORT.md b/docs/SGF_STOCK_PERIOD_REPORT.md new file mode 100644 index 0000000..3deab23 --- /dev/null +++ b/docs/SGF_STOCK_PERIOD_REPORT.md @@ -0,0 +1,39 @@ +# Relatório físico de Stock por período — 03/11/2026 + +`SGF-STOCK-PERIOD-REPORT-QA-v1` disponibiliza um resumo físico no submenu **Stock → Relatórios → Movimentos de stock**. Para cada artigo/armazém apresenta abertura, entradas, saídas, fecho e número de movimentos no período. Reutiliza o livro e a conta SELECT-only já ligados à composição QA, sem outra tabela de saldos ou escritor. + +## Regra do relatório + +O período é escolhido explicitamente. As datas correspondem ao **registo em UTC** (`moved_at`), convenção da aplicação de origem QA, não à data efectiva da guia. Abertura considera registos anteriores à meia-noite do primeiro dia; o período inclui esse instante e todo o último dia; o fecho exclui a meia-noite do dia seguinte. + +Por linha: **fecho = abertura + entradas − saídas**. Entradas são quantidades positivas; saídas são o valor absoluto das negativas. Transferências/devoluções só contam se tiverem movimentos efectivamente presentes na origem, sem serem inventadas a partir de documentos. Não se somam unidades ou artigos diferentes num total geral. As designações são actuais, não uma fotografia histórica do cadastro. + +Um par com saldo de abertura mantém-se visível mesmo sem movimentos no período. Um artigo sem história até ao fecho não é apresentado como existência zero. Disponibilidade, reservas, bloqueios e valorização permanecem indeterminados e fora deste relatório. + +## Acesso, consulta e paginação + +Usa `stock.view`, empresa/unidade/pessoa/armazéns explicitamente mapeados, identidade física da origem e os bloqueios partilhados de autoridade do adaptador existente. A nova opção QA está desligada por omissão; não há direito novo ou alargamento da conta de leitura. O percurso de consulta anterior mantém-se disponível. + +`view=period` em `/api/stock-read` exige duas datas válidas e ordenadas. Pesquisa literal por código/nome, armazém e páginas25/100 aplicam-se à mesma projecção de abertura/entradas/saídas/fecho. Os campos de data são recusados nas consultas anteriores. Referências cifradas incluem período, filtros, tamanho, pessoa/contexto e livro observado; alterações ou validade de600s exigem actualização. + +O relatório usa REPEATABLE READ/READ ONLY e limite SQL de três segundos, aproveitando a revisão existente do livro/catálogo/armazéns. Agrupamento, contagem e limites são executados no servidor; o PHP recebe apenas a página pedida. A interface descarta respostas de períodos/contextos anteriores e conserva os filtros ao pedir nova referência. + +## Provas + +[Consolidação](proofs/stock-period-report-20261103.json): **52 verificações** — 28 API/SQL,12 de interface, duas da forma da consulta, três guardas directas e sete da demonstração. Build Vite e verificações de sintaxe concluídos. Os testes anteriores de recepção/ligação física/rastreabilidade foram reutilizados, sem repetir comandos ou suites. + +A nova base de regressão contém105 pares elegíveis e114 movimentos iniciais, exclusivamente fixtures SQL de relatório. Não são recepções ou operações de negócio alegadamente executadas pelo workflow. Incluem dois armazéns autorizados, outro excluído, tenant estrangeiro, entradas/saídas nos limites do período, abertura sem movimentos, artigo apenas futuro, unidades UN/KG e quantidades superiores ao limite exacto do JavaScript. Um append adicional explícito verifica invalidação e recuperação da consulta. + +Exemplo conferido: abertura10UN + entradas2,5UN − saídas3UN = fecho9,5UN. A entrada de700UN à meia-noite seguinte fica fora. Outra linha mantém exacto o fecho `9007199254740993` milésimos; SQL numeric/texto e BigInt evitam arredondamento. + +Páginas25/100 percorrem o mesmo universo sem duplicações. Passaram pesquisa literal, filtros, datas impossíveis/invertidas, isolamento de módulo/unidade/armazém/permissão, contexto antigo, referência alterada/expirada/futura, alteração da origem e desactivação. Leituras preservaram artigos/armazéns/movimentos/auditoria/concessões antes do append de revisão intencional. Uma falha inicial de bootstrap duplicado no harness das guardas foi corrigida carregando uma única cópia do leitor; não exigiu alterar o pacote ou repetir a API aprovada. + +A observação directa da projecção contou **cinco SELECTs para25 linhas e cinco para100**. O âmbito exclui autenticação, middleware e verificações físicas do host. Não é uma avaliação de carga sustentada ou memória. Os agregados ainda examinam a história elegível no SQL e podem atingir o limite em volumes maiores; não se instalaram índices. + +## Demonstração e limites + +Nova demonstração **8085**, inicialmente sem requisições principais ou movimentos: . Abrir Relatórios, escolher Movimentos de stock e indicar o período UTC. As provas HTTP confirmam sessão/capacidade, relatório vazio autorizado, consulta anterior, página/bundle servido e preservação. A demonstração não recebe as fixtures de volume da regressão. + +A interface foi verificada por simulação de respostas e renderização React; revisão visual e acessibilidade permanecem separadas. Exportação/impressão documental, nomes históricos, restantes relatórios, carga sustentada e implantação continuam pendentes. As unidades pressupõem um cadastro coerente no livro QA; não se inferem conversões ou histórico de alterações de unidade. Antes de implantação terá de se validar a convenção temporal da origem. Estes ensaios não declaram capacidade operacional ou de implantação. + +Preservados os seis registos, cache bloqueada, demonstrações, provas/checkpoints e trabalho alheio. Sem publicação, activação de Compras, migração/índice no destino, concessões reais ou aceitação/checkpoint presumidos. diff --git a/docs/SGF_STOCK_RECEIPT_TRACE.md b/docs/SGF_STOCK_RECEIPT_TRACE.md new file mode 100644 index 0000000..76fe4f9 --- /dev/null +++ b/docs/SGF_STOCK_RECEIPT_TRACE.md @@ -0,0 +1,31 @@ +# Movimento de Stock → recepção de origem — 03/11/2026 + +`SGF-STOCK-RECEIPT-TRACE-QA-v1` acrescenta a conferência documental a partir do movimento físico. Em **Stock → Existências → Movimentos**, uma entrada por recepção pode apresentar **Conferir recepção em Compras**. O clique pede explicitamente a mudança de módulo pelo mecanismo de contexto existente, preservando empresa/unidade e a protecção de formulários por guardar. + +A indicação só aparece quando a composição a disponibiliza e a pessoa tem os direitos existentes `stock.view` e `purchasing_receipts.view`. Não há nomes de direitos ou concessões reais novos. A nova opção QA está desactivada por omissão. + +## Conferência no destino + +O browser transmite apenas o ID do movimento. Depois de mudar para Compras, um GET autorizado resolve a recepção e a ordem reais. O controlador confere novamente ambos os direitos, contexto, perfil pessoa/empresa/unidade, livro físico, tenant, armazéns explicitamente mapeados e políticas nativas de consulta. Confere ainda linha de recepção, quantidade aceite, artigo, armazém e ID da fotografia original. Pais enviados por query string são recusados. + +O resultado contém apenas IDs exactos e um endereço local de consulta. A interface abre o histórico da recepção pelos mecanismos existentes, mesmo quando não está na primeira página. Origem recusada, resposta atrasada, parâmetros ambíguos ou pai incompatível não seleccionam outro documento nem preparam uma operação. + +O leitor de Stock continua com SELECT somente nas suas três tabelas. A resolução documental usa o `ReceiptRuntime` existente de Compras e as suas políticas/bloqueios; não alarga a conta técnica de Stock. O writer, a confirmação de recepções, os leitores comuns, a função de navegação aceite e o mecanismo de alteração de contexto permanecem preservados. + +## Provas e demonstração + +[Prova consolidada](proofs/stock-receipt-trace-20261103.json): **46 verificações incrementais** — 16 da consulta/preservação, 20 de interface e dez da demonstração. Uma guarda de desactivação é chamada directamente; não é prova de middleware. As 41 verificações da ligação física anterior foram reutilizadas, não repetidas nem somadas. + +O ensaio positivo reutilizou uma aplicação/sessões novas sobre o livro QA já concluído: mesmo movimento, recepção e ordem, sem criar outra origem. Conferiu recusa de módulo/unidade/permissão/contexto antigo, IDs desconhecidos e substituição de pais. Um erro no teste comparava instâncias de objectos de sequência pela identidade; foi corrigido para comparar valores serializados. As 14 verificações já aprovadas foram conservadas; o sufixo observou novamente ambas as APIs e comprovou **31 tabelas do host, 111 nativas e respectivas sequências intactas**. + +Os testes de interface verificaram a selecção explícita de módulo antes da navegação, âmbito exacto, recusas, respostas atrasadas, botão React efectivo e arranque do workspace com DOM simulado. Não constituem revisão visual. O build Vite passou. + +Nova demonstração **8084**: . Começa sem operações principais, recepções ou movimentos. A prova HTTP verificou o POST real de escolha de módulo, renovação do token, recusa do token antigo e de uma origem inexistente, assets servidos e preservação física/direitos. A única entrada de auditoria acrescentada é a selecção de contexto já prevista. Um erro de nome da tabela de auditoria no harness foi corrigido antes dessa alteração de contexto. A correlação positiva usa o livro concluído; não se apresenta a demonstração vazia como um percurso de negócio já executado. + +## Limites + +A passagem abrange entradas `receipt_in` do writer actual com fotografia coerente. Não infere origens históricas, saídas, devoluções ou transferências. Esses movimentos continuam consultáveis, sem atalho documental inventado. + +A consulta documental reutiliza os bloqueios do runtime de Compras; este incremento não prova redução de contenção ou capacidade de carga. Revisão visual, acessibilidade, carga sustentada, instalação operacional e capacidade de implantação continuam pendentes. Não houve movimento novo, valorização, pagamento, lançamento, activação de Compras ou publicação. + +Preservados os seis registos, a cache bloqueada, demonstrações anteriores, provas, checkpoints e trabalho alheio. Sem aceitação ou checkpoint presumidos. diff --git a/docs/SGF_SUPPLIER_DOCUMENTS_DELIVERY.md b/docs/SGF_SUPPLIER_DOCUMENTS_DELIVERY.md new file mode 100644 index 0000000..ad3b348 --- /dev/null +++ b/docs/SGF_SUPPLIER_DOCUMENTS_DELIVERY.md @@ -0,0 +1,50 @@ +# Anexos privados do fornecedor e ligação à revisão/propostas + +03/11/2026. `SGF-SUPPLIER-DOCUMENTS-QA-v1`. Upload, conferência, consulta e descarga dos anexos pelo controlador nativo existente. Anexar conserva o documento e volta a colocar o fornecedor em revisão pendente; uma revisão distinta da versão actual permite a participação nas propostas. Não acrescenta outra autoridade documental ou financeira. + +## Experimentar em8076 + +[Compras](http://127.0.0.1:8076/qa/enter/actor?open=1) abre um fornecedor e encontra **Anexos documentais privados**. Escolhe tipo e ficheiro de teste, fundamenta, confere o impacto e confirma com o mesmo ficheiro. O impacto mostra nome sanitizado, MIME detectado, tamanho, SHA-256 e a nova versão pendente. + +[Finanças](http://127.0.0.1:8076/qa/enter/issuer?open=1) consulta os anexos, descarrega uma cópia conferida e revê a versão actual na decisão independente já existente. Só depois o fornecedor volta a aparecer como admissível no selector de propostas. A equipa pode iniciar uma requisição pelo [solicitante](http://127.0.0.1:8076/qa/enter/requester?open=1) e continuar no mesmo percurso integrado. + +A demonstração é nova, com os fornecedores/orçamento QA preparados e sem anexos ou operações principais. As16peças documentais usadas no ensaio existem apenas na regressão separada.8075 e anteriores, os seus catálogos ampliados e os seis registos protegidos não foram alterados. O dossiê, a pesquisa de fornecedores e a recepção paginada continuam disponíveis nesta composição; ela não copia decisões ou volumes de teste das demos anteriores. + +## Implementação + +- Reutiliza `SupplierDocumentController.store/download`, `SupplierPolicy`, a participação/revisão e a tabela nativas. Sem novo escritor de anexos, migração de destino ou nomes de direitos. Upload exige `purchasing_suppliers.prepare` e preparação nativa; consulta/descarga exigem `purchasing_suppliers.view` e a política nativa de acesso a documentos, além da origem exacta de empresa/unidade. +- PDF/PNG/JPEG, tipos documentais e limites1KB–2MB seguem a validação do controlador original. O ficheiro é validado pelo conteúdo/MIME e extensão admitidos, sem confiar no MIME declarado pelo navegador. Não se certifica autenticidade, conteúdo fiscal ou suficiência legal do documento. +- Prévia executa o upload nativo num savepoint com armazenamento temporário **novo e privado**, reverte os registos/auditoria e elimina apenas o ficheiro dessa prévia. Sequências podem avançar; pastas temporárias vazias podem permanecer. Não é uma limpeza da cache ou de ficheiros anteriores. +- O corte cifrado prende ficheiro/SHA/tamanho/MIME/nome, tipo, fundamento, actor, origem, contexto de sessão, versão da ficha e validade10minutos. Confirmação revalida tudo e usa o controlador original para invalidar a revisão anterior. Um ficheiro ou contexto diferente exige nova conferência. +- Comando, fornecedor, documento e auditorias ficam na mesma transacção nativa. A proveniência SGF inclui fundamento e estado anterior/posterior. Mesma chave/conteúdo recupera o resultado, sem novo ficheiro ou alteração de uma revisão posterior; outra chave representa nova intenção de anexação, conforme o comportamento nativo, não deduplicação global por conteúdo. +- O armazenamento permanente fica fora de `public`, confinado à composição QA verificada, com caminhos gerados pelo mecanismo nativo. A projecção paginada15 não devolve o caminho nem o tenant nativo. Não há substituição/apagamento de anexos pela interface. +- A descarga revalida origem e política, confirma tamanho/SHA contra o registo e usa a descarga auditada original, como `attachment`, `nosniff`, sem cache partilhada e com CSP de sandbox. Não serve bytes alterados como se fossem a evidência original. +- O histórico existente do fornecedor inclui upload, comandos e descarga. A candidatura do fornecedor nas propostas usa o estado/revisão originais; não se cria proposta, pagamento ou reconhecimento financeiro por anexar. + +## Falhas e recuperação + +Ficheiro e base são recursos diferentes. Se a transacção falhar depois da escrita, o adaptador apaga **apenas o ficheiro recém-criado** depois de verificar que a respectiva linha não foi confirmada. Se essa verificação não for possível ou o resultado do commit for incerto, conserva o ficheiro para recuperação; não apaga evidência potencialmente confirmada. A repetição pode recuperar um comando efectivamente confirmado. + +O ensaio forçou falha na auditoria: fornecedor/documento/auditorias voltaram ao estado anterior e o ficheiro não confirmado foi compensado. A repetição concorrente seguinte recuperou201/200, com um documento e um ficheiro. Crashes abruptos ou falhas que impeçam verificar o resultado podem deixar ficheiros privados sem linha correspondente; não se declara limpeza/reconciliação automática desses casos nem se executa manutenção sobre demos anteriores. + +## Provas + +[Consolidação](proofs/supplier-documents-composition-20261103.json):52verificações — anexos28, ligação/contexto9, guardas4, demonstração8 e build/assets3. Os primeiros17critérios passaram; corrigiu-se o adaptador de download que construía um campo de ficheiro nulo num pedido sem upload, retomando os11critérios restantes sem repetir os uploads confirmados. + +Os testes incluem formato disfarçado/extensão executável, substituição do ficheiro, revogação do direito, erro de auditoria, concorrência, repetição depois de revisão, versão de revisão desactualizada, nome hostil sanitizado, bytes alterados no armazenamento, documento de outro fornecedor/tenant, unidade/módulo indevidos e geração de contexto/ligação alteradas. A descarga devolveu exactamente os bytes originais e registou a auditoria. + +O volume de16anexos inclui duas confirmações pela API e14ficheiros de ensaio adicionados directamente pelo **mesmo controlador nativo** para testar páginas15/1. Não se apresentam como16provas independentes de interface. Ficheiros temporários de prévia ficaram a zero; documentos/ficheiros permanentes corresponderam ao volume previsto. + +A prova de ligação preparou uma requisição sintética de1MZN pelos workflows existentes, apenas como pré-condição do selector: a reserva pertence a esse circuito, não ao anexo. Fornecedor pendente foi excluído e a tentativa de o forjar na proposta recusou; revisão distinta tornou-o disponível e permitiu a prévia original de proposta. Nenhuma proposta foi confirmada por arrasto e não foram criadas ordens, facturas, obrigações, pagamentos, lançamentos ou localizações. + +As suites anteriores de fornecedores, propostas, recepção, obrigação e contabilidade foram preservadas e reutilizadas. A nova demo começa vazia; as verificações de consulta não mudaram versões, anexos ou auditoria. + +A [matriz actualizada](proofs/supplier-documents-matrix-20261103.json) conserva seis módulos,13estágios e116critérios documentados. A [inspecção estática](proofs/supplier-documents-flow-20261103.json) encontra79fontes e nenhum ciclo obrigatório, sem ligações a bases. Passaram14verificações de sintaxe PHP,7de JavaScript e `git diff --check`; não são provas adicionais de utilização real ou de implantação. + +## Limitações e preservação + +O ensaio positivo de ficheiro usa PNG sintético; os formatos permitidos continuam os do controlador nativo, sem declarar uma nova regressão completa de todos os leitores de PDF/JPEG. Requisitos de documentos por fornecedor, autenticidade, validade fiscal e qualificação documental automática não são acrescentados por inferência. A integridade é conferida ao anexar/descarregar; a revisão mantém as decisões humanas e regras existentes. + +Revisão visual continua separada, sem repetir o navegador bloqueado. Volume16 e limite2MB não validam carga sustentada, retenção, capacidade de armazenamento, instalação geral ou separação de proprietário/runtime. O schema sintético é preparado pelo projecto nativo actual e o runtime mantém o pacote fixado anteriormente. + +Configuração desligada por omissão. Sem acessos/dados reais, migrações/concessões no destino, alterações dos seis registos, limpeza da cache bloqueada, activação de Compras, publicação, aceitação ou checkpoint. diff --git a/docs/SGF_SUPPLIER_INVOICE_MATCHING_DELIVERY.md b/docs/SGF_SUPPLIER_INVOICE_MATCHING_DELIVERY.md new file mode 100644 index 0000000..e7a27f4 --- /dev/null +++ b/docs/SGF_SUPPLIER_INVOICE_MATCHING_DELIVERY.md @@ -0,0 +1,47 @@ +# Conferência de facturas de fornecedor na interface SGF + +03/11/2026. `SGF-SUPPLIER-INVOICE-MATCHING-QA-v1`: registo de dados do documento recebido, conferência exacta com ordem/recepção e validação financeira por identidade distinta, no mesmo livro nativo. Reutiliza `InvoiceController`, `InvoiceWorkflow` e `CommonBudget` originais, fixados pelo manifesto já testado; não acrescenta outro cálculo de conferência ou escritor orçamental. + +## Demonstração8070 + +- [Compras](http://127.0.0.1:8070/qa/enter/actor?open=1): emitir a ordem da adjudicação QA já aprovada. +- [Armazém](http://127.0.0.1:8070/qa/enter/validator?open=1): conferir/receber1UN da ordem efectivamente emitida. +- [Finanças — preparação](http://127.0.0.1:8070/qa/enter/issuer?open=1): registar documento recebido pendente. +- [Finanças — revisão distinta](http://127.0.0.1:8070/qa/enter/reviewer?open=1): conferir e validar a factura. +- [Outro validador QA](http://127.0.0.1:8070/qa/enter/auditor?open=1): identidade distinta para ensaios de concorrência. + +O contexto principal começa com adjudicação preparada de1UN/100MZN, reserva100MZN e **nenhuma ordem emitida, recepção, factura ou consumo inicial**. Um tenant estrangeiro tem uma ordem preparada exclusivamente para recusa de acesso; não aparece nas consultas do contexto principal. Os perfis automáticos são exclusivos do launcher privado em loopback.8070 não substitui ou reconfigura8069/anteriores. + +Percurso de ensaio: emitir a ordem, aceitar a mercadoria, registar a primeira factura de0,400UN/base40MZN/imposto0/total40 e validá-la com outra identidade. Depois registar0,600UN/base60/imposto0/total60 e validar. O número e a data vêm do documento recebido; os campos começam vazios. A data tem de respeitar as regras do workflow original, incluindo a emissão da ordem e o exercício corrente. Os preços/unidades/impostos de origem são mostrados e reutilizados pela conferência, sem redigitação obrigatória. Não há aplicação da política de IVA de vendas SGF. + +## Registo e validação + +Registar preserva um documento pendente; não consome orçamento. A conferência verifica fornecedor/ordem, linhas distintas, quantidade aceite ainda não facturada, unidade, preço, taxa e totais, sem tolerância configurada. Uma validação distinta volta a conferir os dados e chama o consumo original do compromisso. Facturas parciais usam o arredondamento cumulativo original. Não há outra reserva, compromisso ou movimento de stock. + +Cada comando tem prévia com impacto e fundamento individual. A prévia executa o controlador/workflow original num savepoint de rollback obrigatório; não persiste factura, linhas, auditoria ou consumo. Sequências podem avançar; os IDs temporários de registo não são apresentados como definitivos. A validação mostra explicitamente o montante a consumir no orçamento antes da confirmação. + +Confirmação revalida permissão, função nativa, origem, empresa/unidade, geração do contexto, revisão das dependências e validade de dez minutos. A revisão inclui ordem/linhas, requisição/aprovações, fornecedor, conflitos declarados, recepções, correcções físicas efectivas, facturas e movimentos/consumos orçamentais relevantes. Mudanças exigem nova conferência; as regras originais são sempre reaplicadas na execução. + +Factura/linhas/decisão/consumo e recibo `sgf.invoice.command` ficam na mesma transacção nativa. O recibo inclui contexto SGF, versão do pacote, autor, fundamento, chave, hash e fotografia do documento/resultados. Falhar esse recibo desfaz também os dados e a auditoria nativa. A mesma chave/conteúdo recupera o resultado histórico, sem novo consumo; outro conteúdo é recusado. Dois validadores com a mesma base produzem uma confirmação e uma recusa409. Uma prévia antiga de outra factura fica inválida quando muda a quantidade já validada. + +Os direitos `purchasing_invoices.view/prepare/validate` foram apresentados antes da preparação e concedidos apenas nas fixtures novas. Ter direito de validação não permite aprovar a própria factura. Compras/Armazém não recebem consulta económica das facturas. O acesso usa a mesma requisição/ordem de origem e as permissões nativas; não se editam listas de IDs depois da emissão/recepção. A lista de ordens tem páginas25 e o histórico de conferência tem páginas15, com estados e autores preservados. + +## Provas + +[Consolidação técnica](proofs/supplier-invoice-composition-20261103.json): **77 verificações** —45 do percurso, quatro de fronteiras, seis das guardas/módulo, seis da navegação React,13 da demonstração e três de build/assets. + +As45 incluem ordem emitida na interface SGF → recepção efectiva → duas facturas parciais validadas, registo antes da recepção recusado, divergência de total/preço/linha/quantidade, número normalizado repetido, auto-validação, âmbito estrangeiro, direito revogado, prévia adulterada, falha injectada e recuperação no registo/validação. Duas sessões de preparação com a mesma chave recuperaram um documento com201/200; dois validadores distintos obtiveram201/409. Consumos finais4000+6000=10000 em unidades monetárias menores, um compromisso original, duas facturas validadas, nenhum stock adicional, obrigação automática ou pagamento. + +Uma factura concorrente de0,700UN/70MZN foi registada quando ainda havia1UN disponível e permaneceu pendente. Após validar a primeira parcial de0,400UN, a sua prévia anterior recebeu409 e uma nova conferência recebeu422 por exceder a quantidade restante. O original não foi apagado, reescrito ou considerado validado por conveniência. + +As45 provas válidas não foram repetidas. Quatro sondas adicionais, sem novas decisões persistentes, comprovaram recusa após nova geração do contexto, versão do fornecedor e ligação de origem, mantendo facturas/consumos/auditoria intactos. Suites de associações, geografia, pagamentos e lançamentos anteriores foram reutilizadas, não reexecutadas. + +[Manifesto complementar do escritor orçamental](proofs/invoice-budget-writer-manifest-20261103.json): os três ficheiros do núcleo coincidem entre a árvore de trabalho e as cópias QA/demonstração. Uma sonda autónoma de reflexão em runtime atingiu o limite de30s; os diagnósticos privados foram preservados e não se declara essa identificação em runtime verificada. A comparação complementar é de ficheiros, sem repetir comandos financeiros ou alterar as77 provas. Não constitui medição do tempo das operações, validação de implantação ou prova de um bloqueio transaccional. + +## Fronteiras preservadas + +Este bloco **não reconhece automaticamente uma obrigação**, não paga, não contabiliza e não emite um documento fiscal. O consumo é exclusivamente o efeito orçamental já existente no workflow original. O anterior cenário comum de obrigação11600MZN mantém a sua prova própria; não se declara que estas facturas100MZN já foram ligadas a essa composição ou a uma fonte histórica SGF viva. + +Correcção/rejeição de facturas registadas, notas de crédito, anexos binários originais e políticas fiscais reais continuam separados. A factura pendente incompatível permanece com evidência e motivo de recusa; não se criou um mecanismo correctivo por edição directa. Datas entre exercícios, outras moedas e tolerâncias adicionais não foram introduzidas. + +As dependências da ordem seleccionada são materializadas para a revisão; grandes históricos de facturas por ordem não tiveram carga validada. Revisão visual, carga sustentada, instalação geral e capacidade de implantação permanecem pendentes. Nenhuma migração/concessão foi aplicada no destino, nenhum direito público alterado e nenhuma versão de Compras activada/publicada. Os pacotes anteriores e o trabalho simultâneo em Compras foram preservados. Sem alterações aos seis registos protegidos, à cache bloqueada, às demonstrações anteriores, aceitação presumida ou checkpoint. diff --git a/docs/SGF_SUPPLIER_REGISTRY_DELIVERY.md b/docs/SGF_SUPPLIER_REGISTRY_DELIVERY.md new file mode 100644 index 0000000..079e5e1 --- /dev/null +++ b/docs/SGF_SUPPLIER_REGISTRY_DELIVERY.md @@ -0,0 +1,37 @@ +# Fornecedores no SGF — bloco funcional QA + +03/11/2026. Implementados cadastro, alteração, revisão independente, activação/suspensão, pesquisa e histórico de fornecedores, ligados às propostas existentes. Reutilizam os métodos originais de `SupplierController`, `SaveSupplierRequest`, `SupplierParticipation` e `SupplierPolicy` de Compras, no pacote privado fixado por manifesto. Não há outro motor de fornecedores. + +## Experimentar + +- [Preparação — Compras](http://127.0.0.1:8067/qa/enter/actor?open=1). +- [Revisão — Finanças](http://127.0.0.1:8067/qa/enter/issuer?open=1). +- [Armazém](http://127.0.0.1:8067/qa/enter/validator?open=1), sem acesso ao cadastro económico. + +A demonstração nova8067 começa com três fornecedores sintéticos preparados na fixture e uma requisição nativa aprovada de100MZN, com reserva única de100MZN. Não há fornecedores novos criados pela interface, propostas, avaliações, adjudicação, ordens, recepções ou movimentos iniciais. As entradas de perfil são exclusivas do launcher privado em loopback.8064/8065/8066 e anteriores permanecem preservadas. + +Compras prepara uma nova ficha, com NUIT sintético de nove algarismos e contactos fictícios. A prévia apresenta os estados anterior e posterior; a confirmação deixa a ficha pendente. Finanças confere a versão exacta e fundamenta uma activação ou suspensão. O fornecedor activo, não impedido e com revisão vigente passa a estar disponível nas propostas do mesmo contexto. Os links permitem continuar até à adjudicação, ordem e recepção já entregues. As avaliações e escolhas permanecem individuais. + +Uma alteração material da ficha incrementa a versão, retira o estado activo e limpa a revisão anterior, segundo as regras originais. A revisão é distinta de quem criou ou alterou por último. NUIT repetido, fornecedor impedido e diligência vencida são recusados pelo circuito original. Referências documentais são texto declarado; este bloco não implementa anexos ou certifica evidência externa. + +## Confirmação e isolamento + +Prévia através do controlador original num savepoint de rollback obrigatório: não persiste ficha, auditoria ou decisão. Sequências podem avançar. A prévia de criação não mostra um identificador temporário como definitivo. A confirmação volta a verificar direitos, função nativa, empresa/unidade, ligação explícita, revisão e validade da prévia de dez minutos. Revalida os dados no controlador original. + +O recibo `sgf.supplier.command` é append-only, na mesma transacção da ficha e da auditoria nativa. Inclui autor, data, contexto, manifesto, estado anterior, operação, hash do conteúdo e resultado/versionamento; o evento nativo preserva o estado posterior completo. Repetição da mesma chave/conteúdo recupera o resultado; conteúdo diferente é recusado. A falha desse recibo reverte toda a operação. A exclusão concorrente reutiliza o mutex de empresa nativo e os bloqueios de autoridade do host. + +Fornecedores preparados na interface pertencem ao contexto empresa/unidade registado no recibo, visível a outras identidades autorizadas nesse contexto. As três fichas de origem continuam ligadas explicitamente à fixture. A API de propostas verifica a mesma admissibilidade, além da elegibilidade nativa: conhecer o ID de um fornecedor do mesmo tenant mas fora da ligação não permite utilizá-lo. Não se atribuem associações antigas ou partilha entre unidades por inferência. + +Pesquisa por nome/NUIT, filtro de estado e paginação estável de15 fichas são executados no servidor. O histórico por fornecedor também é paginado em15 e não agrega eventos de outros fornecedores. O selector das propostas mantém o limite anterior de100 fornecedores; a pesquisa integral desse selector continua pendente. + +Direitos novos apresentados antes da preparação das fixtures: `purchasing_suppliers.view`, `.prepare`, `.review`, de unidade. Apenas a nova fixture concede consulta/preparação a Compras e consulta/revisão a Finanças. Não se alterou o catálogo público nem contas/concessões reais. O módulo está desactivado por omissão e recusa execução fora do ambiente/bases/roles/cluster QA guardados. + +## Provas e limites + +[Consolidação das provas](proofs/supplier-composition-20261103.json): **64 verificações** —34 do percurso funcional, seis de fronteiras, três das guardas, seis da navegação,12 da demonstração e três do build/assets. Incluem criação/alteração/revisão/suspensão, prévia sem persistência, idempotência, chave com outro conteúdo, dois workers com respostas201/200 e uma ficha, falha injectada e recuperação, permissões revogadas, contexto/unidade/tenant, auto-revisão, diligência vencida, versão desactualizada, mudança de ligação e elegibilidade do fornecedor na proposta efectiva. Pesquisa/paginação produzem16 resultados em páginas15+1 sem sobreposição. + +As34 provas válidas foram preservadas. Depois do reforço da admissibilidade na API e dos ajustes de apresentação, executaram-se apenas as seis fronteiras e as12 provas da demonstração. O percurso anterior de propostas até à recepção, com74 verificações, foi reutilizado, não repetido. O build privado passou; o verificador de assets foi corrigido para o caminho Laravel `build/manifest.json`, reutilizando esse build sem o repetir. Provas de integridade verificam o pacote original e as fontes realmente entregues. + +São bases novas no cluster isolado55439, com funções QA próprias; as credenciais ficam apenas no directório privado de execução. Não houve ligação à base do destino, alteração dos seis registos protegidos, limpeza da cache bloqueada, alteração de demonstrações existentes ou operações reais. Nenhum push, publicação, activação de Compras, aceitação presumida ou checkpoint. + +Este bloco fecha o cadastro/revisão de fornecedores nesta composição sintética. Permanecem separados: passagem de requisições internas SGF para a origem de Compras com responsabilidade orçamental única; regimes formais e correcções posteriores; anexos/pesquisa integral do selector; instalação geral e política operacional de partilha de cadastro. Revisão visual e capacidade de implantação continuam pendentes. Os ensaios não validam carga sustentada, configuração fiscal real ou separação proprietário/runtime para implantação. diff --git a/docs/SGF_SUPPLIER_SEARCH_DELIVERY.md b/docs/SGF_SUPPLIER_SEARCH_DELIVERY.md new file mode 100644 index 0000000..fe55c31 --- /dev/null +++ b/docs/SGF_SUPPLIER_SEARCH_DELIVERY.md @@ -0,0 +1,36 @@ +# Pesquisa integral de fornecedores para propostas + +03/11/2026. `SGF-SOURCING-SUPPLIER-SEARCH-QA-v1`. Resolve a limitação funcional dos100primeiros fornecedores no formulário de propostas: pesquisa por nome/NUIT e páginas no servidor, com escolha individual e versão do fornecedor conferida na confirmação. Reutiliza os direitos, isolamento e workflow originais; sem novo motor de propostas ou financeiro. + +## Demonstração8073 + +[Solicitante](http://127.0.0.1:8073/qa/enter/requester?open=1) prepara/submete uma requisição1UN/100MZN; [chefia](http://127.0.0.1:8073/qa/enter/approver?open=1) aprova distintamente. [Compras](http://127.0.0.1:8073/qa/enter/actor?open=1) abre o processo em Propostas, pesquisa nome ou NUIT, percorre páginas e escolhe expressamente. Pesquisar `900000110` encontra o exemplo além do antigo limite. Mudar de página/pesquisa limpa a escolha e a prévia; nenhum resultado é seleccionado automaticamente. + +Esta nova composição conserva o percurso integrado de8072. Começa sem requisições/operações principais; fornecedores e orçamento QA são preparação explícita. Acrescenta127linhas artificiais de directório e marcadores de origem apenas na fixture nova, incluindo casos negativos. São125fornecedores admissíveis neste contexto, contando os três originais. Não são novos cadastros reais ou130revisões comerciais executadas.8072 e demonstrações anteriores ficam intactas. + +## Implementação + +- `GET /api/purchasing-sourcing/requests/{id}/suppliers`: direito existente `purchasing_sourcing.prepare`, função nativa elegível e acesso à requisição actual. Não basta poder consultar avaliações. Valida parâmetros, usa pesquisa literal por nome/NUIT, ordenação por nome/ID e páginas25ou100 no SQL; não carrega todo o directório para o navegador. +- Preserva `SupplierAccess`: fornecedores explicitamente ligados ou com origem auditada da empresa/unidade actual. Filtra activos, não bloqueados e com revisão não vencida. As regras nativas continuam a recusar IDs forjados na proposta, mesmo que alguém contorne o selector. +- A resposta contém apenas ID, nome, NUIT, versão e impressão da selecção; não devolve contactos, dados bancários ou diligências. A interface pede a página actual, mantém escolha explícita e protege contra respostas fora de ordem, falha de rede e saída do processo. +- A prévia captura a impressão actual do fornecedor. A interface envia também a impressão que o utilizador escolheu; alteração desde a pesquisa exige nova selecção. Antes de criar uma proposta, a confirmação volta a conferir o fornecedor, permissões, origem e versão do processo. O novo metadado é retirado antes de chamar o controlador original de propostas, preservando validação/preços. +- A impressão efectivamente conferida entra na proveniência do comando SGF, na mesma transacção. Recibo de uma confirmação já registada continua recuperação histórica sem nova execução; não é uma segunda proposta baseada em cadastro actualizado. +- Compatibilidade: clientes directos anteriores podem omitir a impressão ao pedir prévia, mas a prévia nova captura-a sempre e a confirmação exige correspondência. O resumo `suppliers` da consulta antiga fica limitado a25; não representa o directório completo. O formulário actual usa o endpoint paginado. + +## Verificação + +[Prova consolidada](proofs/supplier-search-composition-20261103.json): **51 verificações** — API31, guardas3, comportamento assíncrono da escolha8, demonstração6 e build/assets3. Cinco páginas25 e duas páginas100/25 cobriram os mesmos125fornecedores, sem sobreposição. Pesquisa por NUIT atingiu o exemplo além100; `%` e `_` foram tratados literalmente. + +Fornecedores bloqueados, suspensos, com revisão vencida, sem origem autorizada, de outra unidade ou tenant foram excluídos/recusados. Direitos revogados, módulo incorrecto, contexto indevido, versão de selecção adulterada e alteração do fornecedor após prévia foram recusados. Alterações de versão/bloqueio nestas sondas são injecções QA delimitadas e restauradas, sem alterar uma decisão comercial real. + +O fornecedor escolhido gerou uma única proposta pelo controlador original. Duas confirmações simultâneas devolveram201/200, com uma proposta/linha e recuperação idempotente. Pesquisa/prévia não criaram proposta persistente; não foram criadas ordens, facturas, obrigações, pagamentos ou localizações por consequência da escolha. + +As provas individuais e do percurso integrado anterior foram preservadas, sem repetir as suites posteriores de adjudicação, recepção ou contabilidade. Sem ligações à base de destino, alteração dos seis registos, limpeza da cache bloqueada, concessões públicas/reais, activação de Compras, publicação, aceitação ou checkpoint. + +A [matriz conferida](proofs/supplier-search-matrix-verified-20261103.json) conserva seis módulos,13estágios e106critérios documentados. A [inspecção estática actualizada](proofs/supplier-search-flow-verified-20261103.json) inclui os módulos JavaScript públicos do selector; presença de fontes não equivale a prova operacional. Passaram8verificações de sintaxe PHP,9de JavaScript e `git diff --check`. + +## Limitações + +Este incremento resolve alcance e escolha do directório, não é medição de carga sustentada. Não cria índices no destino. Os ensaios usam apenas bases sintéticas novas e o pacote nativo fixado anteriormente; instalação geral e separação de proprietário/runtime não estão validadas. + +Revisão visual permanece separada, sem repetir o navegador bloqueado. Pagamentos/contabilidade da nova origem, migração dos antigos `ir_requests`, regimes/correcções posteriores e anexos mantêm os seus âmbitos próprios. O produto completo e a capacidade de implantação não são declarados concluídos. diff --git a/docs/STOCK_PERIOD_BATCH_DELIVERY.md b/docs/STOCK_PERIOD_BATCH_DELIVERY.md new file mode 100644 index 0000000..d322b9a --- /dev/null +++ b/docs/STOCK_PERIOD_BATCH_DELIVERY.md @@ -0,0 +1,43 @@ +# Conferência do período de stock em lotes + +03/11/2026. Continuação técnica da valorização sintética autorizada e da [leitura das dependências anteriores](STOCK_PREFIX_STREAM_DELIVERY.md). Código funcional na fonte; não altera o pacote congelado das demonstrações nem introduz efeitos financeiros. + +## Implementação + +`StockValuation::period()` passa a percorrer livros, taxas e revisões por chave crescente, com lotes de até 100 linhas. Os movimentos do período também são lidos por chave, sem materializar todo o período no PDO através de `cursor()`. + +Cada lote de movimentos recebe uma leitura conjunta dos identificadores e revisões contabilísticas. A consulta transfere apenas estes dois campos, com uma referência por movimento; não traz os snapshots completos dos lançamentos. As condições de tenant, empresa e unidade mantêm-se. A unicidade do writer de stock permanece responsável por impedir duplicações; a projecção é adicionalmente limitada a uma referência por movimento, ordenada pelo identificador contabilístico. + +A ordem de construção do hash, os factos abrangidos, as pendências e a revalidação individual de cada origem permanecem no mesmo serviço. A confirmação contabilística não passa a confiar numa prévia ou num resultado guardado. Não se criou uma cache persistente. + +Uma consulta autónoma ao período usa uma única transacção `REPEATABLE READ READ ONLY`. Se o chamador já tem uma transacção, conserva a sua propriedade e nível de isolamento: o serviço não a confirma nem a reconfigura. + +## Provas dirigidas + +[Manifesto e resultados](proofs/stock-period-batches-20261103.json): 33 verificações, sendo 27 de equivalência/lotes/recusas/contexto e seis de leitura concorrente entre lotes. A baseline é uma cópia privada da fonte imediatamente anterior, com hash fixado, sem substituir provas existentes. + +| Movimentos na fixture | Antes: leituras do snapshot contabilístico completo para estado final | Depois: consultas conjuntas de estado | Depois: snapshots completos para esse estado | +| ---: | ---: | ---: | ---: | +| 0 | 0 | 0 | 0 | +| 1 | 1 | 1 | 0 | +| 100 | 100 | 1 | 0 | +| 101 | 101 | 2 | 0 | +| 205 | 205 | 3 | 0 | + +São contagens do passo de conferência do estado final, não de todo o SQL. O contador auxiliar `queries` regista chamadas `Connection.select`; não mede todos os comandos/cursos SQL e não serve como total comparável. Não se mediram tempos, memória ou capacidade nesta passagem. + +Os ensaios usam IDs físicos espaçados, fronteiras de lote, ausência de lançamento, revisão nula, taxa recusada, outro tenant/empresa/unidade e recusa de consulta. Os resultados completos, incluindo hash e pendências, são comparados com a baseline. A fixture de metadados é exclusiva da regressão: não contém linhas contabilísticas, saldos ou lançamentos de negócio. Nenhum índice foi criado. + +O período nativo já encerrado, com os três movimentos efectivos, foi consultado apenas em transacção de leitura: hash, três factos e zero pendências permanecem exactamente equivalentes. As provas de negócio anteriores não foram repetidas. + +Na prova concorrente, uma segunda ligação confirma uma alteração à revisão do último registo de metadados depois da leitura do primeiro lote. A consulta em curso mantém o resultado original; a consulta seguinte identifica uma pendência. A alteração é restaurada no fim e ambas as ligações terminam sem transacção ou cursor aberto. Não é um ensaio de concorrência sustentada nem uma nova confirmação financeira. + +Três tentativas incompletas do auxiliar ficaram preservadas: classificação indevida de um EXISTS pelo contador; mistura do controlo transaccional de dois wrappers do mesmo PDO; e ausência do dispatcher de eventos na ligação instrumentada. Foram corrigidas no auxiliar antes da execução final. Não se contam essas tentativas como provas aprovadas. + +## Limites e preservação + +A conferência de cada origem ainda volta a ler o seu prefixo de dependências. Esta alteração elimina a leitura repetida dos snapshots de estado final e limita a enumeração do período; **não elimina todo o trabalho repetido entre origens**. A leitura conjunta de prefixos por página/período continua pendente, assim como carga sustentada, revisão visual e capacidade de implantação. + +As medições anteriores de 1.000/5.000/10.000 referências conservam o âmbito próprio do leitor de prefixos; não são apresentadas como medições do período completo nesta versão. O método de prefixos não foi alterado nesta passagem. + +Demonstrações, seis registos protegidos, cache bloqueada, provas válidas e trabalho alheio preservados. Sem operações/direitos reais, migração no destino, activação de Compras, publicação, aceitação ou checkpoint presumidos. diff --git a/docs/STOCK_PREFIX_STREAM_DELIVERY.md b/docs/STOCK_PREFIX_STREAM_DELIVERY.md new file mode 100644 index 0000000..710cf1d --- /dev/null +++ b/docs/STOCK_PREFIX_STREAM_DELIVERY.md @@ -0,0 +1,45 @@ +# Conferência de stock — dependências anteriores em lotes + +Continuação: [enumeração do período e revisões contabilísticas em lotes](STOCK_PERIOD_BATCH_DELIVERY.md). Trata a leitura de estado final do período; o trabalho repetido de conferência de prefixos entre origens continua pendente. As medições abaixo conservam o âmbito do leitor de prefixos. + +03/11/2026. Continuação técnica da [valorização sintética autorizada](GENERAL_LEDGER_STOCK_VALUATION_DELIVERY.md), sem novo efeito financeiro. **A árvore principal deixa de carregar todos os IDs e snapshots dos lançamentos anteriores para conferir uma origem.** Os pacotes congelados das demonstrações não foram actualizados. + +## Alteração + +`StockValuation::priorJournals()` confere a cobertura por SQL, projecta apenas identificadores, revisões e taxa e executa a consulta de metadados uma vez através de cursor PostgreSQL. Cada FETCH recebe até500 linhas. O cursor fecha no sucesso e na recusa; não existe cache entre pedidos. + +Até25 referências conserva-se a representação anterior. Acima desse limite, a evidência usa `STOCK-PRIOR-STREAM-v1`: contagem, SHA256 de **todas** as referências ordenadas, primeiras25 referências e quantidade omitida da prévia. As referências posteriores à prévia continuam a afectar o resumo e a validação. Mudanças de taxa, cobertura, contexto ou evidência incompleta recusam a conferência; não se adopta um prefixo parcial. + +A projecção mantém os tipos JSON dos identificadores. Uma taxa textual ou fraccionária continua recusada como na versão anterior. A confirmação continua a calcular o estado actual pelo mesmo serviço; não confia no resumo enviado pelo cliente. Quando há transacção do chamador, preserva-a. Fora dela, a leitura do prefixo abre e termina uma transacção REPEATABLE READ READ ONLY. + +## Antes/depois comparáveis + +[Resultados, condições e hashes](proofs/stock-prefix-stream-20261103.json). Fixture **apenas de metadados**, numa base QA nova55439, sem criar movimentos físicos ou lançamentos financeiros através destas linhas de ensaio. Não são1.000/5.000/10.000 operações de stock validadas pelos workflows. + +Mesmos dados e chaves primárias, snapshots com8KiB de conteúdo adicional sintético, três amostras quentes por variante, ordem alternada e mesma transacção de leitura. Tempo mediano do auxiliar de leitura/construção das referências; máximo de memória PHP usada incremental. PostgreSQL, RSS, kernel HTTP completo e conferência do período não estão incluídos. A validação independente dos resumos fica fora da janela medida. + +| Referências anteriores | Tempo ms antes/depois | Consultas antes/depois | Pico incremental PHP KiB antes/depois | Máximo de linhas por resultado antes/depois | +| ---: | ---: | ---: | ---: | ---: | +|1.000|160,25 /46,00|2 /6|13.055,16 /363,70|1.000 /500| +|5.000|1.212,30 /207,83|2 /14|65.346,91 /363,70|5.000 /500| +|10.000|2.836,69 /565,06|2 /24|130.663,60 /363,70|10.000 /500| + +O número de consultas aumenta por incluir DECLARE, FETCH e CLOSE. O custo transferido para PHP e a memória diminuem; não se declara redução simultânea de todas as dimensões. Em10.000, a representação das dependências passa de2.067.789 para5.228 bytes. São o ganho conjunto de projecção/leitura em lotes/resumo, não ganhos isolados de cada componente. **Nenhum índice experimental foi criado e nenhum índice foi aplicado no destino.** + +## Diagnósticos e segurança da alteração + +A primeira leitura em lotes ainda criava uma função recursiva de serialização por referência. Os ciclos só eram libertados pelo GC e faziam a memória crescer com o volume. O resumo passou a codificar directamente quatro campos escalares em ordem canónica, conservando o mesmo SHA256; não se alterou a função canónica financeira comum. + +Uma variante intermédia que convertia a chave física para texto regrediu fortemente e a consulta foi cancelada **apenas no backend do banco de metadados QA identificado**. O EXPLAIN controlado do cursor mostrou Nested Loop com Materialize/Seq Scan de10.000 linhas físicas. A comparação numérica validada passou a usar a chave primária física com estimativa de uma linha por procura. Os planos são estimativas sem ANALYZE, não medições de capacidade. A consulta valida a representação numérica antes da conversão; a evidência conserva o tipo JSON original. + +As tentativas intermédias e a tentativa incompleta de instrumentação foram preservadas. Só a execução final é usada na tabela. O ensaio final impõe30s por SQL e15s por chamada medida para ambas as variantes; nenhuma amostra seleccionada atingiu esses limites. A variante cancelada não foi convertida numa mediana ou ganho fictício. + +## Provas e preservação + +**48 verificações dirigidas:**43 de equivalência, cobertura, tipos, isolamento, resumos, lotes e medições;5 de contexto transaccional/cursor. Incluem fronteiras0/1/25/26/501, mudança fora da prévia, predecessor ausente, outra taxa na última parte, referência incompleta, tenant/empresa/unidade distintos, limite real de500 linhas por resultado e ausência de cursores abertos após recusa. + +Os três movimentos do livro de regressão já encerrado foram consultados **em transacção somente de leitura**: o resultado completo da origem, incluindo revisões e evidência publicada, permanece byte a byte equivalente à baseline e aos três snapshots contabilizados. Assim se reutilizam as146 verificações e23 de regressão anteriores no seu âmbito, sem repetir o ciclo de stock, a suite geral ou as medições da fila administrativa. + +O pacote congelado de8062/8063 mantém o manifesto `8b3ad1c600b84c8526b2d9f453a1c5c4e174a69d6acc78ace2af4f52a25dd762`. A optimização está na fonte para composições futuras; não foi instalada silenciosamente nessa demonstração nem no destino. Nenhum snapshot, direito ou registo operacional existente foi reescrito. Seis registos, cache bloqueada, provas anteriores e trabalho alheio preservados. + +**Limites:** o trabalho e as consultas ainda crescem com o prefixo; uma página ou período pode voltar a conferir vários prefixos. A leitura conjunta entre origens de uma página/período e a carga sustentada permanecem por avaliar. Este ensaio não valida implantação, memória do servidor, concorrência sustentada, método de valorização real ou revisão visual. Sem publicação, activação de Compras, aceitação ou checkpoint presumidos. diff --git a/docs/integration/sgf-flow-plan.json b/docs/integration/sgf-flow-plan.json index 3877511..08a9e1e 100644 --- a/docs/integration/sgf-flow-plan.json +++ b/docs/integration/sgf-flow-plan.json @@ -15,50 +15,545 @@ "new_global_event_bus": false }, "stages": [ - {"id": "requisition_order", "owner": "purchasing", "effect": "approved_procurement_origin", "state": "partial_synthetic", "source_ids": ["requisitions_delivery"], "requires": [], "exit_evidence": ["approved_origin_version", "budget_receipt_when_applicable"], "gap": "Only basic requisitions demonstrated in 8039; full procurement composition not transferred."}, - {"id": "accepted_receipt", "owner": "purchasing", "effect": "accepted_physical_receipt", "state": "source_not_integrated", "source_ids": ["receipt_workflow"], "requires": ["requisition_order"], "exit_evidence": ["receipt_id_version", "accepted_quantities", "quality_decision", "warehouse_mapping"], "gap": "No common SGF receipt/stock adapter demonstrated."}, - {"id": "physical_stock", "owner": "stock", "effect": "physical_movement_once", "state": "source_not_integrated", "source_ids": ["stock_workflow", "stock_controller", "inventory_lots", "inventory_counts", "inventory_dispositions", "inventory_reversals", "warehouse_reservations", "stock_menu"], "requires": ["accepted_receipt"], "exit_evidence": ["movement_origin", "quantity_unit", "ledger_revision", "receipt_or_compensation"], "gap": "Common scoped reader, authoritative writer and SGF warehouse mapping pending."}, - {"id": "supplier_invoice", "owner": "purchasing", "effect": "verified_supplier_document", "state": "partial_synthetic", "source_ids": ["invoice_workflow", "supplier_adapter"], "requires": ["requisition_order"], "exit_evidence": ["invoice_snapshot", "independent_review", "accepted_receipt_references_when_required"], "gap": "Does not assume every purchase is stock; existing eligibility/partial receipt rules must be preserved."}, - {"id": "supplier_payable", "owner": "finance", "effect": "supplier_obligation_once", "state": "partial_synthetic", "source_ids": ["payables", "supplier_adapter"], "requires": ["supplier_invoice"], "exit_evidence": ["obligation_receipt", "principal_currency", "history_responsibility", "due_date_or_pending_reason"], "gap": "Synthetic core exists; common operational composition and historical source mapping remain delimited."}, - {"id": "supplier_settlement", "owner": "finance", "effect": "confirmed_allocation_once", "state": "partial_synthetic", "source_ids": ["settlements", "settlement_delivery"], "requires": ["supplier_payable"], "exit_evidence": ["confirmed_payment_evidence", "distinct_confirmation", "allocation_receipt", "remaining_balance"], "gap": "Synthetic payments/allocations exist; no bank execution or complete bank reconciliation delivered."}, - {"id": "workshop_execution", "owner": "workshop", "effect": "verified_work_record", "state": "partial_synthetic", "source_ids": ["workshop_workflow"], "requires": [], "exit_evidence": ["authorised_order", "verified_time_material_versions", "ownership_of_material"], "gap": "Verified observations exist; no automatic physical stock movement."}, - {"id": "workshop_stock_consumption", "owner": "stock", "effect": "company_material_consumption_once", "state": "planned", "source_ids": ["stock_workflow", "workshop_workflow"], "requires": ["physical_stock", "workshop_execution"], "exit_evidence": ["explicit_item_warehouse_mapping", "movement_receipt", "consumption_origin_version"], "gap": "Linking observed material to a physical movement is not implemented; do not replay old observations."}, - {"id": "verified_cost", "owner": "finance", "effect": "validated_cost_version", "state": "partial_synthetic", "source_ids": ["direct_costs", "industrial_costs"], "requires": ["workshop_execution"], "exit_evidence": ["verified_source_versions", "approved_rate_versions", "complete_or_explicitly_incomplete"], "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible."}, - {"id": "sales_draft", "owner": "commercial", "effect": "commercial_draft_from_unique_origins", "state": "partial_synthetic", "source_ids": ["workshop_billing"], "requires": ["workshop_execution"], "exit_evidence": ["billable_source_versions", "commercial_price_version", "distinct_commercial_review"], "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock."}, - {"id": "sales_invoice", "owner": "commercial", "effect": "issued_sales_document", "state": "partial_synthetic", "source_ids": ["service_invoicing"], "requires": ["sales_draft"], "exit_evidence": ["document_snapshot", "series_rule_version", "applicable_fiscal_decisions"], "gap": "Test issuance exists; real fiscal issuance remains guarded. Direct service origins remain valid."}, - {"id": "customer_receivable", "owner": "finance", "effect": "customer_receipt_allocation_once", "state": "partial_synthetic", "source_ids": ["service_receivables"], "requires": ["sales_invoice"], "exit_evidence": ["receivable_origin", "payment_evidence", "distinct_confirmation", "allocation_history"], "gap": "Synthetic receipts exist; fiscal receipt/bank reconciliation not presumed."}, - {"id": "general_ledger", "owner": "accounting", "effect": "balanced_journal_once", "state": "planned", "source_ids": ["catalogue_accounting", "accounting_menu"], "requires": [], "exit_evidence": ["approved_source_effect", "dated_account_mapping", "balanced_debit_credit", "open_accounting_period", "posting_receipt"], "gap": "Classification/menu exist; journal, ledger, accounting periods, close and reporting engine absent."} + {"id":"requisition_order","owner":"purchasing","effect":"approved_procurement_origin","state":"partial_synthetic","source_ids":["requisitions_delivery","requisition_core","requisition_qa_composition","sgf_order_controller","native_order_workflow","sgf_order_screen","sgf_sourcing_controller","sgf_sourcing_screen","native_quotation_controller","native_proposal_comparison","sgf_supplier_controller","sgf_supplier_access","sgf_supplier_screen","sgf_request_controller","sgf_request_access","sgf_request_screen","sgf_purchasing_workspace","sgf_purchasing_navigation","sgf_supplier_picker","sgf_supplier_search_ui","sgf_dossier_controller","sgf_dossier_screen","sgf_dossier_ui","sgf_supplier_documents","sgf_supplier_document_storage","sgf_supplier_document_ui","sgf_process_navigation","sgf_purchasing_focus","sgf_stage_history","sgf_request_history_ui","sgf_request_workspace_ui","sgf_purchasing_entry","sgf_purchasing_board","sgf_purchasing_presenter","sgf_purchasing_exit_guard"],"requires":[],"exit_evidence":["approved_origin_version","budget_receipt_when_applicable"],"gap":"New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. A subsequent scope fix filters request/sourcing audit events in SQL before limits/counts/pages, closing an alternate downstream financial-history exposure without changing original audit or writers. Empty initial supplier searches now survive middleware normalisation while closed-award and permission guards remain. Completed canonical history book is reused read-only with142 tables/sequences intact. Demo8080 removes the direct request-history25-event cap using bounded cursor pages25/100, own-stage SQL filtering and encrypted request/actor/context/size-bound cursors with600-second lifetime. Initial page is reused; history refresh does not reset unsaved request fields.127 original event ids traverse once despite a new head note; refresh includes128. Audit-volume fixtures are not operational request revisions. An inherited100MZN order setup was preserved and removed from future history harness runs. This is not a persistent MVCC snapshot, visual acceptance, sustained-load or deployment validation. On04/11 the agreed local acquisition-to-payable journey was completed through actual UI modules and HTTP in the existing8085 installation, including a new reviewed supplier and distinct decisions. One entry /compras, document retention, readable previews and exit protection; no new database, port, isolated demo or business-engine copy. This does not validate real deployment, payments/accounting of this origin or visual acceptance.","evidence":[{"file":"docs/proofs/internal-requisitions-sgf.json","checks":[{"pointer":"/passed","equals":true}]},{"file":"docs/proofs/requisition-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":50}]},{"file":"docs/proofs/receipt-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":68}]},{"file":"docs/proofs/order-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":49}]},{"file":"docs/proofs/sourcing-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":74}]},{"file":"docs/proofs/supplier-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":64}]},{"file":"docs/proofs/request-to-receipt-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":103}]},{"file":"docs/proofs/purchasing-integrated-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":68}]},{"file":"docs/proofs/supplier-search-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":51}]},{"file":"docs/proofs/purchasing-dossier-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":49}]},{"file":"docs/proofs/supplier-documents-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":52}]},{"file":"docs/proofs/purchasing-focus-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":77}]},{"file":"docs/proofs/purchasing-continuity-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":55}]},{"file":"docs/proofs/request-history-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":36}]},{"file":"docs/proofs/purchasing-completion-final-20261104-r2.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/criteria/C10/passed","equals":true}]}]}, + {"id":"accepted_receipt","owner":"purchasing","effect":"accepted_physical_receipt","state":"partial_synthetic","source_ids":["receipt_workflow","receipt_writer","receipt_movement_adapter","sgf_receipt_runtime","sgf_receipt_controller","sgf_receipt_screen","sgf_receipt_catalogue","sgf_receipt_workspace_ui","sgf_receipt_documents","sgf_composed_stock_read","sgf_stock_receipt_trace","sgf_stock_receipt_transition","sgf_stock_receipt_focus","sgf_purchasing_entry","sgf_purchasing_board","sgf_purchasing_presenter","sgf_purchasing_exit_guard"],"requires":["requisition_order"],"exit_evidence":["receipt_id_version","accepted_quantities","quality_decision","warehouse_mapping"],"gap":"SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Demo8079 fixes the actual form-to-picker binding and blank initial article search. DOM-to-real-HTTP proof selects an article, transmits its revision, previews, confirms1UN and recovers a deliberately lost response with201/200, one receipt/movement. This is not browser visual acceptance or a new concurrency/load trial. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. On04/11 the agreed local acquisition-to-payable journey was completed through actual UI modules and HTTP in the existing8085 installation, including a new reviewed supplier and distinct decisions. One entry /compras, document retention, readable previews and exit protection; no new database, port, isolated demo or business-engine copy. This does not validate real deployment, payments/accounting of this origin or visual acceptance.","evidence":[{"file":"docs/proofs/stock-receipt-link-20261102.json","checks":[{"pointer":"/tests/native_link/failures","equals":0},{"pointer":"/tests/native_link/errors","equals":0},{"pointer":"/same_native_movement_observed_by_sgf","equals":true}]},{"file":"docs/proofs/receipt-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":68}]},{"file":"docs/proofs/order-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":49}]},{"file":"docs/proofs/sourcing-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":74}]},{"file":"docs/proofs/receipt-workspace-completion-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":41}]},{"file":"docs/proofs/receipt-documents-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":58}]},{"file":"docs/proofs/purchasing-focus-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":77}]},{"file":"docs/proofs/purchasing-continuity-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":55}]},{"file":"docs/proofs/stock-composed-source-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":41}]},{"file":"docs/proofs/stock-receipt-trace-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":46}]},{"file":"docs/proofs/purchasing-completion-final-20261104-r2.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/criteria/C10/passed","equals":true}]}]}, + {"id":"physical_stock","owner":"stock","effect":"physical_movement_once","state":"partial_synthetic","source_ids":["stock_workflow","stock_controller","inventory_lots","inventory_counts","inventory_dispositions","inventory_reversals","warehouse_reservations","stock_menu","inventory_reader","stock_read_adapter","stock_valuation_core","stock_valuation_observer","sgf_composed_stock_read","sgf_stock_receipt_trace","sgf_stock_receipt_transition","sgf_stock_receipt_focus","sgf_stock_period_projection","sgf_stock_period_ui","sgf_stock_period_request"],"requires":["accepted_receipt"],"exit_evidence":["movement_origin","quantity_unit","ledger_revision","receipt_or_compensation"],"gap":"Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending. The integrated Purchasing QA host now observes the same physical book through a SELECT-only Stock role, explicit warehouse mapping and existing React reader (demo8083). Operational installation and real bindings remain pending; no additional valuation or availability is supplied. Demo8084 adds explicit Stock-to-Purchasing receipt evidence navigation for current receipt_in movements. The server resolves actual parent ids, current rights and scope; no inferred historical origin, business command or wider Stock reader grants. Existing Purchasing runtime locks remain; no new load/deployment claim. Demo8085 delivers a UTC-registration-period physical quantity report with opening/incoming/outgoing/closing per article/warehouse, exact numeric/text quantities, explicit dates and25/100 SQL pages. Five projection SELECTs at either page size;105 pairs are SQL fixtures, not workflow operations. No cross-unit total, valuation, availability, full export, sustained-load or deployment claim.","evidence":[{"file":"docs/proofs/stock-read-summary-20261102.json","checks":[{"pointer":"/tests/final_functional/failures","equals":0},{"pointer":"/tests/final_functional/errors","equals":0}]},{"file":"docs/proofs/stock-receipt-link-20261102.json","checks":[{"pointer":"/same_native_movement_observed_by_sgf","equals":true}]},{"file":"docs/proofs/common-ledger-stock-valuation-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/tests/workflow/result/stock_minor","equals":7500},{"pointer":"/tests/workflow/result/physical_quantity_milli","equals":1500}]},{"file":"docs/proofs/stock-prefix-stream-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":48}]},{"file":"docs/proofs/stock-period-batches-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":33}]},{"file":"docs/proofs/receipt-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":68}]},{"file":"docs/proofs/stock-composed-source-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":41}]},{"file":"docs/proofs/stock-receipt-trace-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":46}]},{"file":"docs/proofs/stock-period-report-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":52}]}]}, + {"id":"supplier_invoice","owner":"purchasing","effect":"verified_supplier_document","state":"partial_synthetic","source_ids":["invoice_workflow","supplier_adapter","sgf_supplier_invoice_controller","sgf_supplier_invoice_screen","sgf_invoice_workspace_ui","sgf_invoice_matching_progress","sgf_invoice_matching_ui","sgf_purchasing_entry","sgf_purchasing_board","sgf_purchasing_presenter","sgf_purchasing_exit_guard"],"requires":["requisition_order"],"exit_evidence":["invoice_snapshot","independent_review","accepted_receipt_references_when_required"],"gap":"SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8081 exposes per-line ordered/accepted/returned/reversed/validated/pending/remaining quantities using two aggregate fact queries and original correction values. Pending documents do not reserve quantity; overlap is a read warning, not a replacement for native validation. Two completed QA books are reused read-only with all tables/sequences unchanged. The display revision uses one original state observation before capability decoration; mutation/state definitions are unchanged. Full dependency materialisation, large invoice-history scaling, visual review, sustained load and deployment remain pending. On04/11 the agreed local acquisition-to-payable journey was completed through actual UI modules and HTTP in the existing8085 installation, including a new reviewed supplier and distinct decisions. One entry /compras, document retention, readable previews and exit protection; no new database, port, isolated demo or business-engine copy. This does not validate real deployment, payments/accounting of this origin or visual acceptance.","evidence":[{"file":"docs/proofs/payables-http.json","checks":[{"pointer":"/passed","equals":true}]},{"file":"docs/proofs/supplier-invoice-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":77}]},{"file":"docs/proofs/purchasing-integrated-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":68}]},{"file":"docs/proofs/purchasing-dossier-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":49}]},{"file":"docs/proofs/purchasing-focus-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":77}]},{"file":"docs/proofs/purchasing-continuity-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":55}]},{"file":"docs/proofs/invoice-matching-progress-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":47}]},{"file":"docs/proofs/purchasing-completion-final-20261104-r2.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/criteria/C10/passed","equals":true}]}]}, + {"id":"supplier_payable","owner":"finance","effect":"supplier_obligation_once","state":"partial_synthetic","source_ids":["payables","supplier_adapter","sgf_obligation_controller","sgf_obligation_screen","sgf_obligation_workspace_ui","sgf_obligation_evidence_ui","sgf_purchasing_entry","sgf_purchasing_board","sgf_purchasing_presenter","sgf_purchasing_exit_guard"],"requires":["supplier_invoice"],"exit_evidence":["obligation_receipt","principal_currency","history_responsibility","due_date_or_pending_reason"],"gap":"Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8082 separates evidence browsing from an explicitly selected proposal decision. Reason and preview survive pagination; changed observed source/actor/permissions invalidate old forms, and late reads/previews cannot reactivate them. Temporary read failure preserves the form; in-flight operations prevent selection changes.26 new simulated-UI/demo checks reuse72 native authority checks without repetition. Controller/runtime/kernel and legacy evidence branch are unchanged. No new real confirmation, financial writer, backend pagination protocol, visual/load or deployment validation. On04/11 the agreed local acquisition-to-payable journey was completed through actual UI modules and HTTP in the existing8085 installation, including a new reviewed supplier and distinct decisions. One entry /compras, document retention, readable previews and exit protection; no new database, port, isolated demo or business-engine copy. This does not validate real deployment, payments/accounting of this origin or visual acceptance.","evidence":[{"file":"docs/proofs/payables-http.json","checks":[{"pointer":"/passed","equals":true}]},{"file":"docs/proofs/supplier-obligation-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":72}]},{"file":"docs/proofs/purchasing-integrated-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":68}]},{"file":"docs/proofs/purchasing-dossier-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":49}]},{"file":"docs/proofs/purchasing-focus-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":77}]},{"file":"docs/proofs/purchasing-continuity-composition-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":55}]},{"file":"docs/proofs/obligation-evidence-workspace-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":26}]},{"file":"docs/proofs/purchasing-completion-final-20261104-r2.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/criteria/C10/passed","equals":true}]}]}, + {"id":"supplier_settlement","owner":"finance","effect":"confirmed_allocation_once","state":"partial_synthetic","source_ids":["settlements","settlement_delivery"],"requires":["supplier_payable"],"exit_evidence":["confirmed_payment_evidence","distinct_confirmation","allocation_receipt","remaining_balance"],"gap":"QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.","evidence":[{"file":"docs/proofs/supplier-settlements.json","checks":[{"pointer":"/hosts/0/passed","equals":true},{"pointer":"/hosts/1/passed","equals":true}]}]}, + {"id":"workshop_execution","owner":"workshop","effect":"verified_work_record","state":"partial_synthetic","source_ids":["workshop_workflow"],"requires":[],"exit_evidence":["authorised_order","verified_time_material_versions","ownership_of_material"],"gap":"Verified observations exist; no automatic physical stock movement.","evidence":[{"file":"docs/proofs/workshop-tests.json","checks":[{"pointer":"/failures","equals":0},{"pointer":"/errors","equals":0}]}]}, + {"id":"workshop_stock_consumption","owner":"stock","effect":"company_material_consumption_once","state":"partial_synthetic","source_ids":["stock_workflow","workshop_workflow","workshop_stock_bridge","workshop_stock_controller"],"requires":["physical_stock","workshop_execution"],"exit_evidence":["explicit_item_warehouse_mapping","movement_receipt","consumption_origin_version"],"gap":"QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.","evidence":[{"file":"docs/proofs/workshop-stock-closure-20261102.json","selected_junit":true}]}, + {"id":"verified_cost","owner":"finance","effect":"validated_cost_version","state":"partial_synthetic","source_ids":["direct_costs","industrial_costs"],"requires":[],"exit_evidence":["verified_source_versions","approved_rate_versions","complete_or_explicitly_incomplete"],"gap":"Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.","evidence":[{"file":"docs/proofs/direct-cost-tests.json","checks":[{"pointer":"/failures","equals":0},{"pointer":"/errors","equals":0}]},{"file":"docs/proofs/industrial-cost-tests.json","checks":[{"pointer":"/failures","equals":0},{"pointer":"/errors","equals":0}]}],"origin_paths":[{"id":"direct_workshop","requires":["workshop_execution"]},{"id":"industrial_inputs","requires":[]}]}, + {"id":"sales_draft","owner":"commercial","effect":"commercial_draft_from_unique_origins","state":"partial_synthetic","source_ids":["workshop_billing"],"requires":[],"exit_evidence":["billable_source_versions","commercial_price_version","distinct_commercial_review"],"gap":"Draft integration exists; cost is not sale price and draft does not decrement stock.","evidence":[{"file":"docs/proofs/workshop-billing-tests.json","checks":[{"pointer":"/final_targeted_after_guard/failures","equals":0},{"pointer":"/final_targeted_after_guard/errors","equals":0}]}],"origin_paths":[{"id":"workshop_billing","requires":["workshop_execution"]},{"id":"direct_service","requires":[]}]}, + {"id":"sales_invoice","owner":"commercial","effect":"issued_sales_document","state":"partial_synthetic","source_ids":["service_invoicing"],"requires":["sales_draft"],"exit_evidence":["document_snapshot","series_rule_version","applicable_fiscal_decisions"],"gap":"Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.","evidence":[{"file":"docs/proofs/invoice-test-results.json","checks":[{"pointer":"/passed","equals":true}]}]}, + {"id":"customer_receivable","owner":"finance","effect":"customer_receipt_allocation_once","state":"partial_synthetic","source_ids":["service_receivables"],"requires":["sales_invoice"],"exit_evidence":["receivable_origin","payment_evidence","distinct_confirmation","allocation_history"],"gap":"QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.","evidence":[{"file":"docs/proofs/receivables-tests.json","checks":[{"pointer":"/failures","equals":0},{"pointer":"/errors","equals":0}]}]}, + {"id":"general_ledger","owner":"accounting","effect":"balanced_journal_once","state":"partial_synthetic","source_ids":["catalogue_accounting","accounting_menu","general_ledger_core","general_ledger_adapter","general_ledger_delivery","ledger_cycle_core","ledger_native_adapter","ledger_cycle_delivery","industrial_ledger_source","industrial_ledger_workspace","industrial_ledger_delivery","industrial_correction_delivery","receipt_recovery_workspace","stock_valuation_schema","stock_valuation_composition","stock_valuation_adapter"],"requires":[],"exit_evidence":["approved_source_effect","dated_account_mapping","balanced_debit_credit","open_accounting_period","posting_receipt"],"gap":"One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.","evidence":[{"file":"docs/proofs/common-ledger-industrial-correction-20261103.json","checks":[{"pointer":"/tests/joint_final/passed","equals":true},{"pointer":"/tests/concurrency/passed","equals":true}]},{"file":"docs/proofs/financial-receipt-recovery-20261103.json","checks":[{"pointer":"/checks","equals":43}]},{"file":"docs/proofs/common-ledger-stock-valuation-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/tests/workflow/result/stock_minor","equals":7500},{"pointer":"/tests/workflow/result/physical_quantity_milli","equals":1500}]},{"file":"docs/proofs/stock-prefix-stream-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":48}]},{"file":"docs/proofs/stock-period-batches-20261103.json","checks":[{"pointer":"/passed","equals":true},{"pointer":"/checks","equals":33}]},{"file":"docs/proofs/ledger-receipt-recovery-20261103.json","checks":[{"pointer":"/checks","equals":29}]},{"file":"docs/proofs/receipt-selection-race-manifest-20261103.json","checks":[{"pointer":"/passed","equals":true}]}]} ], "event_consumers": [ - {"source": "supplier_payable", "target": "general_ledger", "status": "planned", "rule": "Accounting recognition eligibility must be delimited; never also book the same invoice through another competing writer."}, - {"source": "supplier_settlement", "target": "general_ledger", "status": "planned", "rule": "Settlement is a separate effect, not another recognition of principal."}, - {"source": "sales_invoice", "target": "general_ledger", "status": "planned", "rule": "Sales recognition and applicable tax rules require explicit scope; draft is insufficient."}, - {"source": "customer_receivable", "target": "general_ledger", "status": "planned", "rule": "Receipt/allocation is distinct from revenue recognition."}, - {"source": "physical_stock", "target": "general_ledger", "status": "planned", "rule": "Quantity alone is not valuation or an approved accounting entry."} + {"source": "supplier_payable", "target": "general_ledger", "status": "planned", "synthetic_delivery": "COMMON-LEDGER-COMPLETE-CYCLE-SIM-v1", "rule": "Authorised QA recognition is implemented once in both compositions through the canonical ledger core. Operational recognition remains planned; never book the same invoice through a competing writer."}, + {"source": "supplier_settlement", "target": "general_ledger", "status": "planned", "synthetic_delivery": "COMMON-LEDGER-COMPLETE-CYCLE-SIM-v1", "rule": "Confirmed QA allocation20 and its confirmed reversal are separate reviewed accounting effects. They never recognise principal again or deduct the financial balance twice; operational integration remains planned."}, + {"source":"sales_invoice","target":"general_ledger","status":"planned","synthetic_delivery":"COMMON-LEDGER-SALES-RECEIVABLE-SIM-v1","rule":"Sales recognition and applicable tax rules require explicit scope; draft is insufficient."}, + {"source":"customer_receivable","target":"general_ledger","status":"planned","synthetic_delivery":"COMMON-LEDGER-SALES-RECEIVABLE-SIM-v1","rule":"Receipt/allocation is distinct from revenue recognition."}, + {"source": "verified_cost", "target": "general_ledger", "status": "planned", "synthetic_delivery": "COMMON-LEDGER-INDUSTRIAL-CORRECTION-SIM-v1", "rule": "Explicit QA direct and industrial source effects use stable typed origins and distinct review. Industrial1800 and its reviewed atomic replacement1820 are selected with residual300 separate; no double origin, inventory valuation or automatic outbox posting. Operational integration remains planned."}, + {"source":"physical_stock","target":"general_ledger","status":"planned","rule":"Quantity alone is not valuation or an approved accounting entry.","synthetic_delivery":"COMMON-LEDGER-STOCK-VALUATION-SIM-v1"} ], + "shared_references": { + "geography": { + "state": "synthetic_functional_delivery", + "proof": "docs/proofs/geography-composition-20261103.json", + "checks": 83, + "source_version": "70996d9a9133785a848de90bedb4bf685e24d8f823cd153c0adc43eac642a292", + "purpose": "segmentation_only", + "financial_effects": 0, + "visual_review_pending": true, + "deployment_capacity_validated": false + } + }, "sources": [ - {"id": "requisitions_delivery", "repository": "sgf", "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md"}, - {"id": "receipt_workflow", "repository": "compras", "path": "app/Services/ReceiptWorkflow.php"}, - {"id": "stock_workflow", "repository": "compras", "path": "app/Services/StockWorkflow.php"}, - {"id": "stock_controller", "repository": "compras", "path": "app/Http/Controllers/StockController.php"}, - {"id": "inventory_lots", "repository": "compras", "path": "app/Services/InventoryLots.php"}, - {"id": "inventory_counts", "repository": "compras", "path": "app/Services/InventoryCounts.php"}, - {"id": "inventory_dispositions", "repository": "compras", "path": "app/Services/InventoryDispositions.php"}, - {"id": "inventory_reversals", "repository": "compras", "path": "app/Services/InventoryReversals.php"}, - {"id": "warehouse_reservations", "repository": "compras", "path": "app/Services/WarehouseReservations.php"}, - {"id": "stock_menu", "repository": "sgf", "path": "resources/js/stock-menu.js"}, - {"id": "invoice_workflow", "repository": "compras", "path": "app/Services/InvoiceWorkflow.php"}, - {"id": "supplier_adapter", "repository": "sgf", "path": "app/Modules/Purchasing/SupplierPayables.php"}, - {"id": "payables", "repository": "sgf", "path": "packages/payables/src/Payables.php"}, - {"id": "settlements", "repository": "sgf", "path": "packages/payables/src/SupplierSettlements.php"}, - {"id": "settlement_delivery", "repository": "sgf", "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md"}, - {"id": "workshop_workflow", "repository": "sgf", "path": "app/Modules/Workshop/WorkshopWorkflow.php"}, - {"id": "direct_costs", "repository": "sgf", "path": "app/Modules/Workshop/DirectCosts.php"}, - {"id": "industrial_costs", "repository": "sgf", "path": "app/Modules/Industry/IndustrialCosts.php"}, - {"id": "workshop_billing", "repository": "sgf", "path": "app/Modules/Workshop/WorkshopBilling.php"}, - {"id": "service_invoicing", "repository": "sgf", "path": "app/Modules/Services/ServiceInvoicing.php"}, - {"id": "service_receivables", "repository": "sgf", "path": "app/Modules/Services/ServiceReceivables.php"}, - {"id": "catalogue_accounting", "repository": "sgf", "path": "app/Modules/Services/CatalogueAccounting.php"}, - {"id": "accounting_menu", "repository": "sgf", "path": "docs/ACCOUNTING_MENU_DELIVERY.md"} + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php" + }, + { + "id": "sgf_supplier_invoice_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceController.php" + }, + { + "id": "sgf_supplier_invoice_screen", + "repository": "sgf", + "path": "resources/views/supplier-invoice-workspace.blade.php" + }, + { + "id": "sgf_obligation_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ObligationController.php" + }, + { + "id": "sgf_obligation_screen", + "repository": "sgf", + "path": "resources/views/supplier-obligation-workspace.blade.php" + }, + { + "id": "sgf_purchasing_workspace", + "repository": "sgf", + "path": "app/Modules/Purchasing/WorkspaceNavigation.php" + }, + { + "id": "sgf_purchasing_navigation", + "repository": "sgf", + "path": "resources/views/partials/purchasing-navigation.blade.php" + }, + { + "id": "sgf_supplier_picker", + "repository": "sgf", + "path": "public/supplier-picker-model.mjs" + }, + { + "id": "sgf_supplier_search_ui", + "repository": "sgf", + "path": "public/sourcing-workspace.mjs" + }, + { + "id": "sgf_dossier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/DossierController.php" + }, + { + "id": "sgf_dossier_screen", + "repository": "sgf", + "path": "resources/views/purchasing-dossier.blade.php" + }, + { + "id": "sgf_dossier_ui", + "repository": "sgf", + "path": "public/purchasing-dossier.mjs" + }, + { + "id": "sgf_receipt_catalogue", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptCatalogue.php" + }, + { + "id": "sgf_receipt_workspace_ui", + "repository": "sgf", + "path": "public/receipt-workspace.mjs" + }, + { + "id": "sgf_supplier_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentsController.php" + }, + { + "id": "sgf_supplier_document_storage", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentFiles.php" + }, + { + "id": "sgf_supplier_document_ui", + "repository": "sgf", + "path": "public/supplier-documents.mjs" + }, + { + "id": "sgf_receipt_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptDocumentsController.php" + }, + { + "id": "sgf_process_navigation", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessNavigation.php" + }, + { + "id": "sgf_purchasing_focus", + "repository": "sgf", + "path": "public/purchasing-focus.mjs" + }, + { + "id": "sgf_stage_history", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessHistory.php" + }, + { + "id": "sgf_invoice_workspace_ui", + "repository": "sgf", + "path": "public/supplier-invoice-workspace.mjs" + }, + { + "id": "sgf_obligation_workspace_ui", + "repository": "sgf", + "path": "public/supplier-obligation-workspace.mjs" + }, + { + "id": "sgf_request_history_ui", + "repository": "sgf", + "path": "public/request-history.mjs" + }, + { + "id": "sgf_request_workspace_ui", + "repository": "sgf", + "path": "public/request-workspace.mjs" + }, + { + "id": "sgf_invoice_matching_progress", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceMatchingProgress.php" + }, + { + "id": "sgf_invoice_matching_ui", + "repository": "sgf", + "path": "public/invoice-matching.mjs" + }, + { + "id": "sgf_obligation_evidence_ui", + "repository": "sgf", + "path": "public/obligation-evidence.mjs" + }, + { + "id": "sgf_composed_stock_read", + "repository": "sgf", + "path": "app/Modules/Inventory/CompositionStockRead.php" + }, + { + "id": "sgf_stock_receipt_trace", + "repository": "sgf", + "path": "app/Modules/Purchasing/StockReceiptTraceController.php" + }, + { + "id": "sgf_stock_receipt_transition", + "repository": "sgf", + "path": "resources/js/stock-receipt-trace.js" + }, + { + "id": "sgf_stock_receipt_focus", + "repository": "sgf", + "path": "public/stock-receipt-focus.mjs" + }, + { + "id": "sgf_stock_period_projection", + "repository": "sgf", + "path": "app/Modules/Inventory/StockPeriodReport.php" + }, + { + "id": "sgf_stock_period_ui", + "repository": "sgf", + "path": "resources/js/StockPeriodReportWorkspace.jsx" + }, + { + "id": "sgf_stock_period_request", + "repository": "sgf", + "path": "resources/js/stock-period-request.js" + }, + { + "id": "sgf_purchasing_entry", + "repository": "sgf", + "path": "app/Modules/Purchasing/PurchasingEntry.php" + }, + { + "id": "sgf_purchasing_board", + "repository": "sgf", + "path": "public/purchasing-board.mjs" + }, + { + "id": "sgf_purchasing_presenter", + "repository": "sgf", + "path": "public/purchasing-presenter.mjs" + }, + { + "id": "sgf_purchasing_exit_guard", + "repository": "sgf", + "path": "public/purchasing-exit.mjs" + } ] } diff --git a/docs/proofs/cartography-preparation-20261103.json b/docs/proofs/cartography-preparation-20261103.json new file mode 100644 index 0000000..e5097bc --- /dev/null +++ b/docs/proofs/cartography-preparation-20261103.json @@ -0,0 +1,57 @@ +{ + "passed": true, + "checks": 16, + "names": [ + "all20407 source records are preserved", + "source levels reconcile to the full record count", + "leading zero preserved as text", + "source-version plus source-ID uniquely identifies each record", + "duplicate code paths are retained and signalled", + "conflicting duplicate designations are exposed", + "nine absent designations remain absent", + "missing immediate parent rows are reported without invented labels", + "alphanumeric source codes survive unchanged", + "explicit selection permits a province without imposing deeper precision", + "CARTOGRAPHY_VERSION_CHANGED", + "CARTOGRAPHY_TERRITORY_UNKNOWN", + "CARTOGRAPHY_REVIEW_REQUIRED", + "preparation is deterministic without source mutation", + "unexpected workbook schema is refused", + "duplicate source IDs are refused" + ], + "source": { + "name": "cartografia_moz.xlsx", + "sha256": "70996d9a9133785a848de90bedb4bf685e24d8f823cd153c0adc43eac642a292", + "sheet": "Sheet1", + "range": "A1:H20408", + "authority_declared_by_user": "INE", + "authority_independently_verified": false + }, + "total": 20407, + "levels": { + "1": 11, + "2": 148, + "3": 437, + "4": 1334, + "5": 1870, + "6": 16607 + }, + "diagnostics": { + "duplicate_path_groups": 48, + "duplicate_extra_rows": 48, + "conflicting_designation_groups": 39, + "missing_designations": 9, + "missing_parent_records": 8610, + "ambiguous_parent_records": 377, + "incomplete_ancestry_records": 10675, + "selectable_records": 9678 + }, + "prepared_sha256": "5ed851666f417afb53a7e804a32d703f5432bc6a2d4532e333ebedef5910c98a", + "implementation_sha256": "1153c13031ba827ec177c74b624dbeb555e06f731409d5baea6b7b702616c042", + "original_workbook_modified": false, + "database_connections": 0, + "business_records_assigned": 0, + "catalogue_activated": false, + "authority_independently_verified": false, + "public_data_payload_committed": false +} \ No newline at end of file diff --git a/docs/proofs/common-finance-bundle-20261103.json b/docs/proofs/common-finance-bundle-20261103.json new file mode 100644 index 0000000..438d934 --- /dev/null +++ b/docs/proofs/common-finance-bundle-20261103.json @@ -0,0 +1,184 @@ +{ + "increment": "COMMON-FINANCE-BUNDLE-QA-v1", + "consolidated_at_utc": "2026-11-02T21:53:17.036Z", + "functional_packaging_code": true, + "artifact": { + "files": 25, + "manifest_sha256": "6a507ea7d708a12a8e526e4c610696d8db84079d18aede470237b65505630e7e", + "source_packages": [ + "payables", + "general-ledger" + ], + "no_credentials_or_fixture_data": true + }, + "tests": { + "runtime": { + "passed": true, + "checks": 9, + "runtime_classes_from_artifact": 5, + "one_journal_two_lines": true, + "source_stock_budget_preserved": true, + "manifest_sha256": "6a507ea7d708a12a8e526e4c610696d8db84079d18aede470237b65505630e7e", + "no_sgf_core_source_loaded": true, + "no_remote_sgf": true + }, + "integrity": { + "root": "C:\\laragon\\data\\sgf-tempo\\run\\modular-regression-2576427d1939\\private\\finance-bundle-check-466b086ab03e", + "passed": true, + "checks": 6, + "artifact_files": 25, + "manifest_sha256": "6a507ea7d708a12a8e526e4c610696d8db84079d18aede470237b65505630e7e", + "refused": [ + "modified", + "missing", + "extra", + "traversal", + "wrong_pin" + ], + "private_diagnostics_preserved": true + }, + "host_boot": { + "root": "C:\\laragon\\data\\sgf-tempo\\run\\modular-regression-2576427d1939\\private\\ledger-native-55e7c1ae0543\\bundle-boot-4972957ade5f", + "passed": true, + "checks": 4, + "refused_before_business_boot": [ + "modified", + "extra", + "wrong_pin", + "modified_loader" + ], + "loader_marker_never_executed": true, + "no_fallback": true, + "original_proof_preserved": true + }, + "team_readiness": { + "passed": true, + "checks": 28, + "composition": "native", + "url": "http://127.0.0.1:8052/qa/ledger-demo", + "tag": "6873db67a6a7", + "three_roles": true, + "no_business_commands": true, + "initial_principal_minor": 6000, + "initial_balance_minor": 6000, + "initial_journals": 0, + "initial_payment_effects": 0, + "financial_return_link": true, + "own_cookie": true, + "visual_review": false + }, + "syntax": { + "php": 6, + "js": 5 + }, + "native_phpstan": { + "level": 7, + "files": 2, + "errors": 0 + }, + "pint": true + }, + "evidence": [ + { + "file": "private/ledger-native-55e7c1ae0543/finance-bundle-proof.json", + "sha256": "f43ab4802f016671092e438012691cf2cd575484bf46ae9f108f290109bbc541" + }, + { + "file": "private/finance-bundle-check-466b086ab03e/proof.json", + "sha256": "e3ceaa7d36443a47a9a0fa257fa855efe7ffedf8bf95d985cd84d9e129674f37" + }, + { + "file": "private/ledger-native-55e7c1ae0543/bundle-boot-4972957ade5f/proof.json", + "sha256": "ff2112a23cca6373a95bd58d339d53bc19b065e4577f676a45feca91a245ff34" + }, + { + "file": "private/ledger-native-6873db67a6a7/ledger-cycle-demo-http.json", + "sha256": "084f19be64a906dd07f12da21cb6b378bf0f222143208f9bba1414d480bb5a6c" + } + ], + "previous_proof": { + "file": "docs/proofs/common-ledger-complete-cycle-20261102.json", + "sha256": "23657d594b84e6aeeb0d16d45790d54feca04b12e2260cfffa4f8e4a37eaa0ce", + "private_artifacts_verified": 15 + }, + "sources": [ + { + "file": "packages/finance-bundle/Bundle.php", + "sha256": "621f4ab4899b9595f15492fe6981d23b280bf623db127e95c434da7bfc821f06" + }, + { + "file": "scripts/finance-bundle-build.mjs", + "sha256": "98aadd464b9f6d1f345d799d549567ca63aebf8369a8f38e0a3cc2fbc501d384" + }, + { + "file": "scripts/finance-bundle-check.mjs", + "sha256": "1380b37e7dbe57ef4c2d83f40e59f9b68a43a583a73a9085d7506b42da11431c" + }, + { + "file": "scripts/finance-bundle-boot-check.mjs", + "sha256": "7debd011f8fa77d190a5c8cad721d8b2195f50e2f6f1f6aee66d2c45b5a42a92" + }, + { + "file": "scripts/summarize-finance-bundle.mjs", + "sha256": "2130c9ef4a677da6c1ea9fae8ba0345978e3497524190f549ccbc2ca27e5a563" + }, + { + "file": "scripts/payable-history-sgf-proof.php", + "sha256": "57e94e9e1b7ee4496e4888977a5484f6a154799c0d4b7ac2d7941c9bdf40b8b3" + }, + { + "file": "scripts/ledger-cycle-native-proof.php", + "sha256": "8d12d2df6a7222cec9dc8d6fbd19d33bef18a8e603010f2577dd22a27f7c4ec1" + }, + { + "file": "scripts/ledger-cycle-native-run.mjs", + "sha256": "bfd66c1832e170c93270bf07fafb31c0b646bea2acb1fb3266e748e660f1e6a6" + }, + { + "file": "../compras/app/Services/FinanceBundle.php", + "sha256": "5a0a9d7f650b494789e66d83981a67d0d9636885d8282732b3c9270a9f6e441d" + }, + { + "file": "../compras/app/Providers/AppServiceProvider.php", + "sha256": "366f392b947da2daa210a2158fc480855e1ea1da90bab36bd156d78c1781a7f0" + }, + { + "file": "../compras/config/common-finance-bundle.php", + "sha256": "4eed8df4e519d2940feefc0522bdfb4964ee11d21847e825cb240f1a7ed29330" + }, + { + "file": "docs/COMMON_FINANCE_BUNDLE_DELIVERY.md", + "sha256": "41c8bef633e91f536767a43845334f9700109c19448d0c7da6c2ac79dfc645ce" + }, + { + "file": "docs/GENERAL_LEDGER_SALES_RECEIVABLE_SCOPE.md", + "sha256": "b689ed1624eba2f9346427d41f5d68be2168c7b482cad8030522876b302df1a3" + } + ], + "demo": { + "tag": "6873db67a6a7", + "pid": 25996, + "url": "http://127.0.0.1:8052/qa/ledger-demo", + "loopback_only": true, + "cookie": "sgc_ledger_6873db67a6a7", + "new_isolated_team_fixture": true, + "independent_financial_book": true, + "existing_demos_untouched": true + }, + "limits": { + "full_application_distribution": false, + "operational_installation": false, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "publishing": false, + "purchasing_activation": false, + "real_access_changes": false, + "checkpoint": false + }, + "preserved": { + "six_pending_associations": true, + "blocked_cache": true, + "existing_demos": true, + "previous_valid_proofs": true + } +} diff --git a/docs/proofs/common-ledger-complete-cycle-20261102.json b/docs/proofs/common-ledger-complete-cycle-20261102.json new file mode 100644 index 0000000..71c6642 --- /dev/null +++ b/docs/proofs/common-ledger-complete-cycle-20261102.json @@ -0,0 +1,671 @@ +{ + "increment": "COMMON-LEDGER-COMPLETE-CYCLE-SIM-v1", + "authorization_date": "2026-11-02", + "consolidated_at_utc": "2026-11-02T21:43:36.845Z", + "authorization": { + "answer": "Autorizar o ciclo sintético proposto", + "approved_scope_sha256": "e4c96d815cb4c923f7e86d74d8ea20297ec129f64adbf4d1c927647cfe2f98b4", + "archive_matches_prior_presented_proposal": true, + "real_access": false, + "reopening": false + }, + "functional_code": true, + "synthetic_only": true, + "status": "implemented_and_tested_with_explicit_limits", + "tests": { + "sgf_cases": { + "passed": true, + "checks": 23, + "rollback_only": true, + "principal_minor": 6000, + "allocated_balance_minor": 4000, + "final_balance_minor": 6000, + "debit_minor": 22000, + "credit_minor": 22000, + "journals": 5, + "lines": 10, + "correction_pairs": 1, + "period_closed": true, + "obligation_id": 1, + "recognition_journal_id": 1, + "allocation_id": 1, + "reversal_id": 1, + "correction_id": 1, + "period_check_id": 1 + }, + "native_cases": { + "passed": true, + "checks": 23, + "rollback_only": true, + "principal_minor": 6000, + "allocated_balance_minor": 4000, + "final_balance_minor": 6000, + "debit_minor": 22000, + "credit_minor": 22000, + "journals": 5, + "lines": 10, + "correction_pairs": 1, + "period_closed": true, + "obligation_id": 1, + "recognition_journal_id": 1, + "allocation_id": 1, + "reversal_id": 1, + "correction_id": 1, + "period_check_id": 1 + }, + "native_persisted_workflow": { + "passed": true, + "checks": 16, + "rollback_only": false, + "principal_minor": 6000, + "allocated_balance_minor": 4000, + "final_balance_minor": 6000, + "debit_minor": 22000, + "credit_minor": 22000, + "journals": 5, + "lines": 10, + "correction_pairs": 1, + "period_closed": true, + "obligation_id": 1, + "recognition_journal_id": 7, + "allocation_id": 2, + "reversal_id": 2, + "correction_id": 2, + "period_check_id": 2 + }, + "security": { + "passed": true, + "checks": 18, + "self_and_same_person_refused": true, + "revoked_corrective_and_close_rights_refused": true, + "individual_route_cannot_bypass_rights": true, + "orphan_pair_refused_by_database": true, + "post_receipt_failure_recovered": true, + "five_new_tables_append_only": true, + "rollback_only": true + }, + "concurrency": { + "passed": true, + "corrective_pair": { + "blocked": { + "a": { + "chain_reaches_parent": true, + "event": "transactionid" + }, + "b": { + "chain_reaches_parent": true, + "event": "tuple" + } + }, + "results": { + "a": { + "status": 200, + "result": { + "state": "corrected", + "correction_id": 2, + "result_id": 2, + "reverse_journal_id": 10, + "replacement_journal_id": 11, + "replayed": false + } + }, + "b": { + "status": 200, + "result": { + "state": "corrected", + "correction_id": 2, + "result_id": 2, + "reverse_journal_id": 10, + "replacement_journal_id": 11, + "replayed": false + } + } + } + }, + "stale_after_committed_change": { + "blocked": { + "a": { + "chain_reaches_parent": true, + "event": "transactionid" + } + }, + "results": { + "a": { + "status": 409, + "message": "Factos, regras ou período mudaram; prepare nova conferência." + } + } + }, + "period_close": { + "blocked": { + "a": { + "chain_reaches_parent": true, + "event": "tuple" + }, + "b": { + "chain_reaches_parent": true, + "event": "transactionid" + } + }, + "results": { + "a": { + "status": 200, + "result": { + "state": "closed", + "closure_id": 2, + "period_version": 2, + "replayed": false + } + }, + "b": { + "status": 200, + "result": { + "state": "closed", + "closure_id": 2, + "period_version": 2, + "replayed": false + } + } + } + }, + "journals": 5, + "lines": 10, + "correction_results": 1, + "closures": 1, + "period_versions": 2, + "old_check_id": 409, + "final_check_id": 3, + "final_revision": "3e96baa881bad301f15035e7a2507dbdcd3b6bd98e97549711ae921fe1a928ce" + }, + "sgf_http": { + "passed": true, + "checks": 70, + "composition": "sgf", + "tag": "6811563df7af", + "actual_http": true, + "financial_commands": true, + "all_ledger_actions": true, + "principal_minor": 6000, + "partial_balance_minor": 4000, + "final_balance_minor": 6000, + "journals": 5, + "lines": 10, + "debit_minor": 22000, + "credit_minor": 22000, + "correction_pairs": 1, + "period_closures": 1, + "real_csrf": true, + "no_browser": true, + "visual_review": false + }, + "native_http": { + "passed": true, + "checks": 61, + "composition": "native", + "tag": "717011443eb8", + "actual_http": true, + "financial_commands": true, + "all_ledger_actions": true, + "principal_minor": 6000, + "partial_balance_minor": 4000, + "final_balance_minor": 6000, + "journals": 5, + "lines": 10, + "debit_minor": 22000, + "credit_minor": 22000, + "correction_pairs": 1, + "period_closures": 1, + "real_csrf": true, + "no_browser": true, + "visual_review": false + }, + "sgf_final": { + "passed": true, + "checks": 10, + "composition": "sgf", + "coherent_read": { + "isolation": "repeatable read", + "read_only": "on" + }, + "writer_locks": 0, + "financial_sha256": "2df31512f7ea339b1ccd2467e8a7e27cbea7b22241b8e389c40ae981c44035f2", + "financial_unchanged": true, + "bounded_evidence_navigation": true, + "individual_corrective_route_409": true, + "native_originals_preserved": null, + "default_cycle_enabled": false + }, + "native_final": { + "passed": true, + "checks": 10, + "composition": "native", + "coherent_read": { + "isolation": "repeatable read", + "read_only": "on" + }, + "writer_locks": 0, + "financial_sha256": "3da6c77f36fed1bd5339a9b7b2e2ac7e9d1f38afe183a4b2e493a2ce83593229", + "financial_unchanged": true, + "bounded_evidence_navigation": true, + "individual_corrective_route_409": true, + "native_originals_preserved": true, + "default_cycle_enabled": false + }, + "native_actor": { + "passed": true, + "checks": 5, + "candidate_account_refused": true, + "typed_internal_user_read": true, + "financial_unchanged": true + }, + "first_effect_compatibility": { + "passed": true, + "cases": [ + { + "name": "prepare-independent-review-post-and-source-reconciliation", + "assertions": 9, + "passed": true + }, + { + "name": "repetition-conflicting-key-and-recovery-after-period-version", + "assertions": 6, + "passed": true + }, + { + "name": "rights-revoked-actor-person-and-no-inheritance", + "assertions": 4, + "passed": true + }, + { + "name": "independence-rejection-and-preparer-ownership", + "assertions": 6, + "passed": true + }, + { + "name": "source-rule-period-latest-capture-and-revision-changes", + "assertions": 10, + "passed": true + }, + { + "name": "invalid-period-accounts-currency-foreign-scopes-and-extra-fields", + "assertions": 10, + "passed": true + }, + { + "name": "failure-at-every-posting-boundary-and-idempotent-recovery", + "assertions": 12, + "passed": true + }, + { + "name": "database-balance-guards-and-append-only-history", + "assertions": 16, + "passed": true + } + ], + "assertions": 74, + "financial_fingerprint_equal": true, + "all_test_journals_rolled_back": true + }, + "sgf_demo": { + "passed": true, + "checks": 28, + "composition": "sgf", + "url": "http://127.0.0.1:8050/qa/ledger-demo", + "tag": "f729b545c0b6", + "three_roles": true, + "no_business_commands": true, + "initial_principal_minor": 6000, + "initial_balance_minor": 6000, + "initial_journals": 0, + "initial_payment_effects": 0, + "financial_return_link": true, + "own_cookie": true, + "visual_review": false + }, + "native_demo": { + "passed": true, + "checks": 28, + "composition": "native", + "url": "http://127.0.0.1:8051/qa/ledger-demo", + "tag": "18278bfce5c2", + "three_roles": true, + "no_business_commands": true, + "initial_principal_minor": 6000, + "initial_balance_minor": 6000, + "initial_journals": 0, + "initial_payment_effects": 0, + "financial_return_link": true, + "own_cookie": true, + "visual_review": false + } + }, + "quality": { + "phpstan": { + "passed": true, + "errors": 0, + "level": 7, + "files": [ + "app/Services/GeneralLedger.php", + "app/Http/Controllers/GeneralLedgerController.php", + "app/Http/Controllers/SupplierPaymentsController.php", + "config/general-ledger.php" + ], + "canonical_package_autoload": true, + "private_cache": true + }, + "pint": { + "passed": true, + "mode": "--test", + "same_four_native_files": true + }, + "general_composer_suite_not_run": true, + "shared_cache_not_cleared": true, + "syntax": { + "php_files": 29, + "javascript_files": 6 + } + }, + "private_evidence": [ + { + "file": "private/ledger-92c3465d242c/ledger-cycle-cases.json", + "sha256": "e79f0c9c4423abbe8fac86ee5fe38ced1a3ced3491fd8db4229aaf5e461a2344" + }, + { + "file": "private/ledger-native-4731dad525b5/native-cycle-cases.json", + "sha256": "e79f0c9c4423abbe8fac86ee5fe38ced1a3ced3491fd8db4229aaf5e461a2344" + }, + { + "file": "private/ledger-native-4731dad525b5/native-cycle-workflow.json", + "sha256": "7f0790b36a6f9c44e1f52a53e651db103bb19dfb97036ee8b7a8bb7e1c2589f5" + }, + { + "file": "private/ledger-ff7852ea4305/ledger-cycle-security.json", + "sha256": "bd00a66bc52374019f557808e49af0b76d68b7bb379759bce6d1dd8c4c8f7136" + }, + { + "file": "private/ledger-92c3465d242c/ledger-cycle-race.json", + "sha256": "c720f38b36fabf88a66eced57cd34afc4104e9692a4fb39f1efa7a7c4961c2b1" + }, + { + "file": "private/ledger-6811563df7af/ledger-cycle-http.json", + "sha256": "983b3b43591aeb2eeb766d87629eeaa20cfee3804c8f18fae23fe1c09d84395e" + }, + { + "file": "private/ledger-native-717011443eb8/ledger-cycle-http.json", + "sha256": "230cfcfd8da2e42d76aa8341d4ce467c6a2db552b3a56cb1e5380fad28592ac6" + }, + { + "file": "private/ledger-6811563df7af/ledger-cycle-final.json", + "sha256": "82a63a153fca05f4db298eb42c6a0cf38e4e3cb05c057cd07453850675373cdd" + }, + { + "file": "private/ledger-native-717011443eb8/ledger-cycle-final.json", + "sha256": "87f1af04c884e00d3b297de40d6c780dc4b32393092fab7239dfabf0d8548ac4" + }, + { + "file": "private/ledger-native-717011443eb8/ledger-cycle-actor-check.json", + "sha256": "198f00d0c5cc7797f11416d8dc3314585de50c1cb9e51e78531428cc06ea63b3" + }, + { + "file": "private/ledger-e1272b65ff5d/ledger-cases.json", + "sha256": "8197a2fa96f3dee1e85b411c94b5f72f4a45ac3eac14241bc0062faffb7a0ff8" + }, + { + "file": "private/ledger-f729b545c0b6/ledger-cycle-demo-http.json", + "sha256": "2d6ce530066d1b834d06cfcf04808f8a0442adf61c39c1e0ee50b9d914a96e54" + }, + { + "file": "private/ledger-native-18278bfce5c2/ledger-cycle-demo-http.json", + "sha256": "11b3d293d1a63408127ff1d77a7191f0c5c6aeeb645ffbb0fd5baf7c6e656bf4" + }, + { + "file": "private/ledger-cycle-approved-scope.md", + "sha256": "e4c96d815cb4c923f7e86d74d8ea20297ec129f64adbf4d1c927647cfe2f98b4" + }, + { + "file": "private/ledger-cycle-quality.json", + "sha256": "d45a5e986827a80b514e1526405c011e47d9f56747bf6be65f9b9c056f98ab9a" + } + ], + "previous_private_artifacts_verified": 14, + "previous_proofs": [ + { + "file": "docs/proofs/sgf-financial-ledger-flow-20261102.json", + "sha256": "5d384fd07b26cc38ad3946a6ec27341c7e177152a32d53ed1d5d56743c165836" + }, + { + "file": "docs/proofs/common-ledger-payable-20261102.json", + "sha256": "330b4b15ad952d014a828d17ec810a65c4a724d64cf91fd04807e7f37f4ab44b" + }, + { + "file": "docs/proofs/sgf-payable-paged-read-20261102.json", + "sha256": "98ddb85c4819ad6e071ab69df3a19244c04e71c0d2e17539eac3c41a2d155b0b" + }, + { + "file": "docs/proofs/sgf-settlement-read-isolation-20261102.json", + "sha256": "c83e1857931558aed6249d3acf75f08fa819fb9e35e88080abe7bddbfb3af248" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "implementation_sources": [ + { + "file": "packages/general-ledger/bootstrap.php", + "sha256": "13c28f93f1846558a9058546213e044b67731d99334773c19421c613404dc17d" + }, + { + "file": "packages/general-ledger/README.md", + "sha256": "60d351eb2d9ba82193cb860b31afb43bebb5a02dab6bf6413806b81680597571" + }, + { + "file": "packages/general-ledger/src/LedgerSchema.php", + "sha256": "1fb2490fe8d4d206d2f8157803307cdd4e2f733150d0fec4993a7e229fce58cb" + }, + { + "file": "packages/general-ledger/src/PayableJournal.php", + "sha256": "ad688290605153e55ef64871b87b5501b7c22102e2a5d051324c04737f439825" + }, + { + "file": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "0096c76526c4c67c49b7a1746c2351027ed478c23eb0454f4d4aa7274f256826" + }, + { + "file": "packages/general-ledger/src/CycleSchema.php", + "sha256": "25407f9ea4321ee3acb0c310b5d981b8fdaf89c5464d32878ecc57c29e60972d" + }, + { + "file": "packages/general-ledger/src/CycleWorkspace.php", + "sha256": "a76bf1b4c18c3a0585de744d58e38e736777831a019200150deb1615b6fe5010" + }, + { + "file": "packages/general-ledger/ui/cycle.php", + "sha256": "ab1529f9ea79a635d0559729639f08c2a007c98675e0bde2526ec750cf659231" + }, + { + "file": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "f3c0994e75820919f0e008b3e532d00082ec18c531e5e10a77da565b08a0f667" + }, + { + "file": "app/Modules/Accounting/GeneralLedgerController.php", + "sha256": "9e50af7221cdfd29c69c1287d2d2049c2aa3f93babea8ca32d0ec9d0f97550ec" + }, + { + "file": "app/Modules/Purchasing/SupplierPaymentsController.php", + "sha256": "99d3ba60b4e9e01bfcc496d6def949c7aa1c804562ec24eb0a23cf3087c16640" + }, + { + "file": "packages/payables/src/SettlementHttp.php", + "sha256": "1749df4956bce7beaf50a7c48e443f0bfba0f82c5216257c50b046edfd3a3b4f" + }, + { + "file": "packages/payables/ui/settlements.php", + "sha256": "829c1e0a17d732b41207976671d8a67f1c3bf51e020a922653d03c7f19408bea" + }, + { + "file": "resources/views/accounting/general-ledger.blade.php", + "sha256": "a1203ccf7d62b5b2f6d6f2f84363a6e58c082fe1cddb41be445e3e5b659e3cb4" + }, + { + "file": "resources/views/accounting/ledger-cycle-entry.blade.php", + "sha256": "3303264b334d1516284b31cd3c03da5676760221582180236fa64c507272e4c1" + }, + { + "file": "config/general_ledger.php", + "sha256": "2b0794ca0f3337acd3fc7793f209b5f649d0a5cc3c94b6bdc2a547faaced64f4" + }, + { + "file": "routes/web.php", + "sha256": "659ddc77f9f5536a093ee4084608bd314aa2173e92a6c14ca2310846e9d3823a" + }, + { + "file": "../compras/app/Services/GeneralLedger.php", + "sha256": "e86a54f359b428afe9f3352e80c69342bb24a2e389d3c6286323fbce226e0ffe" + }, + { + "file": "../compras/app/Http/Controllers/GeneralLedgerController.php", + "sha256": "e188379b51aeef06ff8ab37233252849eca7aed34001c5135bbd93512bb81c9b" + }, + { + "file": "../compras/app/Http/Controllers/SupplierPaymentsController.php", + "sha256": "b9c299bf889875bf595728ef7e625a6c9751217b00c1584bfa5010dd8d36ab23" + }, + { + "file": "../compras/config/general-ledger.php", + "sha256": "11cbc29f4df9ef6dbf224f0dc39aff390e8da61caad7ca44c91058ed4678e270" + }, + { + "file": "../compras/routes/web.php", + "sha256": "c045d26c7617b66a94eb5ff7cfabe99e4a347976048f52a2dfbbb463c26661ce" + }, + { + "file": "scripts/ledger-proof.php", + "sha256": "f8a1bd2cce762ac1e8f4f0bba54629ae2dfa59ebfecd310c884e8cb778cfee0a" + }, + { + "file": "scripts/ledger-run.mjs", + "sha256": "9280fb2d4720dde88280816aca6dd81e7eee771af57d1e5743e681f30cd477c7" + }, + { + "file": "scripts/ledger-cycle-setup.php", + "sha256": "bb7d475c86267cec6e4ea9612fe5e68bd416ef572a2872b87eaa5ea135586b3d" + }, + { + "file": "scripts/ledger-cycle-cases.php", + "sha256": "8b8814188c4a9083437376a5ccf853981a23c3093586b042f539ed3a82a49c13" + }, + { + "file": "scripts/ledger-cycle-security.php", + "sha256": "492c09947e9bd05c254f7ca1ed9ec44eb80d0e7550efb3f1bbc0698b906dd8d6" + }, + { + "file": "scripts/ledger-cycle-race.php", + "sha256": "7767eae356faceb540394020ae1e659708644955078b9b1ea83269151313fa0e" + }, + { + "file": "scripts/ledger-cycle-final.php", + "sha256": "9fe66b2464f32c64f06c6b358806de26613a95b34e7a52db77f26d3ef9d1a4aa" + }, + { + "file": "scripts/ledger-http-entry.php", + "sha256": "0afc132563999f9a50f9379bacbc4f22e71dc792bd5742f1bf65497dab480b5c" + }, + { + "file": "scripts/payable-history-sgf-proof.php", + "sha256": "36eaefcb5971869bf8f8cf097ddb0fee8676f430edb462b7832bdad753d988f6" + }, + { + "file": "scripts/ledger-cycle-native-run.mjs", + "sha256": "661da838b9203c35308f452edfcee34567f86bbb7ed8f55bbe1f39319ed63c58" + }, + { + "file": "scripts/ledger-cycle-native-proof.php", + "sha256": "24adbda508c6c433abf8f4833fbcb3d7adf8f4702fb6121870197693dc93038f" + }, + { + "file": "scripts/ledger-cycle-native-http-router.php", + "sha256": "7b0368fb311e01d821bf337678dedf930ea2c39e958609095eaca65ac1344392" + }, + { + "file": "scripts/ledger-cycle-http.mjs", + "sha256": "1c77bf427a5bae06a480002c09d2361fe237fe4f799dd047fe825312d25f6977" + }, + { + "file": "scripts/ledger-cycle-native-demo.mjs", + "sha256": "e037c772f567a1b81b4c3a09239c6e7db02c2815dee6d766caf697240b41f8aa" + }, + { + "file": "scripts/ledger-cycle-demo-check.mjs", + "sha256": "818663a991eecb2af30bbb1ccbfae4b4f2ddc5b7564e7bfcf86a573d9857ae9e" + }, + { + "file": "scripts/summarize-ledger-cycle.mjs", + "sha256": "6b8419cbd063d731ea491234b755a2aa1c56b34a2d4c4acdf3f8b8f14e080ec2" + }, + { + "file": "docs/GENERAL_LEDGER_COMPLETE_SYNTHETIC_SCOPE.md", + "sha256": "5d7fed6d7ba6a0c44a95465d1ce3c76e0a788f44630ac35dafec2b5c3d58cf65" + }, + { + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d" + }, + { + "file": "../compras/docs/contabilidade-ciclo-sintetico.md", + "sha256": "5930a20ea13b3b7d1cb433de9eae05c12a1abd867093cd1787dc24f8e48882f1" + } + ], + "team_demos": [ + { + "tag": "f729b545c0b6", + "pid": 19488, + "url": "http://127.0.0.1:8050/qa/ledger-demo", + "loopback_only": true, + "cookie": "sgf_ledger_f729b545c0b6", + "new_isolated_team_fixture": true, + "existing_demos_untouched": true + }, + { + "tag": "18278bfce5c2", + "pid": 4012, + "url": "http://127.0.0.1:8051/qa/ledger-demo", + "loopback_only": true, + "cookie": "sgc_ledger_18278bfce5c2", + "new_isolated_team_fixture": true, + "independent_financial_book": true, + "existing_demos_untouched": true + } + ], + "core_source_single": true, + "native_adapter_implemented": true, + "installed_native_package_replaced": false, + "destination_flags_enabled": false, + "rights": { + "distinct_ledger": 10, + "ledger_grants_per_new_fixture": 12, + "financial_rights_existing_and_qa_only": true, + "real_grants": 0 + }, + "preservation": { + "six_pending_associations_untouched": true, + "blocked_cache_not_cleared": true, + "old_demos_not_reset": true, + "unrelated_work_preserved": true + }, + "limits": { + "visual_review_pending": true, + "deployment_capacity_validated": false, + "live_sgf_purchasing_source": false, + "real_chart_or_tax_policy": false, + "reopening": false, + "bank_execution": false, + "monetary_operations": false, + "new_benchmarks": false, + "new_indexes": false, + "publication": false, + "purchasing_activation": false, + "checkpoint": false, + "acceptance_presumed": false + } +} diff --git a/docs/proofs/common-ledger-composition-20261103.json b/docs/proofs/common-ledger-composition-20261103.json new file mode 100644 index 0000000..610a757 --- /dev/null +++ b/docs/proofs/common-ledger-composition-20261103.json @@ -0,0 +1,364 @@ +{ + "increment": "COMMON-LEDGER-COMPOSITION-SIM-v1", + "consolidated_at_utc": "2026-11-03T05:37:37.042Z", + "functional_code": true, + "synthetic_only": true, + "status": "implemented_and_tested_with_limits", + "authorization": "Existing approved Sales, Supplier and Direct Cost Correction effects composed; no new effect type or real grant.", + "tests": { + "regression": { + "passed": true, + "checks": 37, + "cases": [ + { + "name": "bounded-recorded-source-panels", + "checks": 8, + "passed": true + }, + { + "name": "each-live-source-right-and-whole-book-right", + "checks": 17, + "passed": true + }, + { + "name": "eligible-foreign-contexts", + "checks": 3, + "passed": true + }, + { + "name": "independent-pagination-no-per-row-source-queries", + "checks": 4, + "passed": true + }, + { + "name": "unavailable-provider-not-zero", + "checks": 1, + "passed": true + }, + { + "name": "feature-default-off-and-complete-period-blocker", + "checks": 2, + "passed": true + }, + { + "name": "sql-three-lines-only-for-invoice", + "checks": 1, + "passed": true + } + ], + "rollback_only": true, + "private_synthetic_database_only": true, + "preservation_verified": true + }, + "combined_workflow": { + "passed": true, + "checks": 16, + "invoice_id": 1, + "obligation_id": 1, + "receipts": [ + 2, + 3 + ], + "allocations": [ + 3, + 5 + ], + "reversal_effect_id": 6, + "invoice_journal_id": 3, + "journals": 8, + "lines": 17, + "gross_debit_minor": 330500, + "gross_credit_minor": 330500, + "client_balance_minor": 40000, + "financial_balance_minor": 40000, + "period_closed": true, + "origin_unchanged": true, + "combined_checks": 31, + "source_outbox_rights_preserved": true, + "supplier_balance_minor": 6000, + "cost_balance_minor": 29500, + "typed_source_filters_separate": true, + "joint_period_closed": true + }, + "open_http": { + "passed": true, + "checks": 36, + "actual_http": true, + "actual_csrf": true, + "period_closed": false, + "read_only_repeatable_read": true, + "writer_locks": 0, + "independent_pagination": true, + "visual_review": false + }, + "closed_http": { + "passed": true, + "checks": 35, + "actual_http": true, + "actual_csrf": true, + "period_closed": true, + "read_only_repeatable_read": true, + "writer_locks": 0, + "independent_pagination": true, + "visual_review": false + }, + "team_http_forms": { + "passed": true, + "checks": 34, + "roles": 3, + "no_business_commands": true, + "forms_mock_checks": 4, + "actual_browser": false, + "visual_review": false, + "initial_journals": 1, + "initial_groups": 0, + "initial_customer_openings": 0, + "initial_closures": 0 + }, + "team_preservation": { + "passed": true, + "all_business_source_outbox_rights_book_hashes_unchanged": true, + "initial_journals": 1, + "initial_corrections": 0, + "initial_customer_effects": 0, + "initial_closures": 0, + "real_or_public_grants": 0, + "new_effect_types": 0, + "no_reset": true + } + }, + "targeted_checks": 173, + "private_evidence": [ + { + "file": "private/ledger-2d5c71abf625/composition-cases.json", + "sha256": "60a673e638b13d1cc857caf1f55df91bc0f9167c2d8033167967d9c2f8730d14" + }, + { + "file": "private/ledger-2d5c71abf625/composition-workflow.json", + "sha256": "3f0e666f167f968b93111bd4babe8a97c9e63f577088bcb3bbb2df4462ac9d83" + }, + { + "file": "private/ledger-2d5c71abf625/composition-http.json", + "sha256": "3ae0f4655159c2a7dbeeda444961766cbc137b6b3dfb7d0be602fd57a2404354" + }, + { + "file": "private/ledger-01aab3ebad2d/composition-http.json", + "sha256": "5dda618a2105424afeeb62bb4337d3e5769593c7b7ff307edf2a119d47cae718" + }, + { + "file": "private/ledger-fe42e1169ce6/composition-demo-http.json", + "sha256": "f0c530c0da7828aa947a925260feb1a9bfbcb47a5be3127f9debd4a516d54c36" + }, + { + "file": "private/ledger-fe42e1169ce6/composition-demo-preservation.json", + "sha256": "f026956ec057e0f1c58246e4e57bddbef7782be4549238dcf724cb6d40beb3ff" + } + ], + "reused_manifests": [ + { + "file": "docs/proofs/common-ledger-direct-cost-correction-20261103.json", + "sha256": "2111a30006d24f4325c6f4292e9ffb567adf28950ffbfa76fbb9e8143a2fedb7", + "valid_private_artifacts_reused": true + }, + { + "file": "docs/proofs/common-ledger-direct-cost-20261103.json", + "sha256": "5354ac34eb27dd9c05564d8eb9694a90c3e8eceaf018e2873aa299aa54b6cf6e", + "valid_private_artifacts_reused": true + }, + { + "file": "docs/proofs/common-ledger-sales-receivable-20261103.json", + "sha256": "b5572466111fb85d89a604fbaa423976ed17c61afc5e2e45ba392fb23aa82e8c", + "valid_private_artifacts_reused": true + }, + { + "file": "docs/proofs/common-ledger-reports-20261103.json", + "sha256": "83b81a3401e4cfe8ea4c9d13339385f9241d0eefee5495da3e767812f0c863f1", + "valid_private_artifacts_reused": true + }, + { + "file": "docs/proofs/common-ledger-complete-cycle-20261102.json", + "sha256": "23657d594b84e6aeeb0d16d45790d54feca04b12e2260cfffa4f8e4a37eaa0ce", + "valid_private_artifacts_reused": true + }, + { + "file": "docs/proofs/common-finance-bundle-20261103.json", + "sha256": "086c1556e7cefcf64a7064995a4aa6bd0e3aa9dd62cba66285b7801715f9f22c", + "valid_private_artifacts_reused": true + } + ], + "prior_private_artifacts_verified": 83, + "frozen_bundles": [ + { + "files": 25, + "manifest_sha256": "6a507ea7d708a12a8e526e4c610696d8db84079d18aede470237b65505630e7e", + "all_bytes_preserved": true + }, + { + "files": 30, + "manifest_sha256": "cbc4ddbea15f5e396c92bc2e664b973138551928980f334bcf3eb0cf097cacb1", + "all_bytes_preserved": true + } + ], + "quality": { + "syntax": { + "php": 13, + "js": 5 + }, + "diff_check_both_repositories": true, + "business_suites_unrelated_not_repeated": true + }, + "source_files": [ + { + "file": "app/Modules/Accounting/LedgerComposition.php", + "sha256": "f763ef25a76072938f9c42d38df83546fa4d8b875af916f86eb88ed74c9d9790" + }, + { + "file": "app/Modules/Accounting/LedgerCompositionController.php", + "sha256": "f41796bd97cdbfab637353122c16383895b1754c1e2f0839cb743783718fca63" + }, + { + "file": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "6cb67269c1df67448c1f9c4510c2df468f133c8e7e6e8b49a4d49b50b53e5528" + }, + { + "file": "packages/general-ledger/src/PayableJournal.php", + "sha256": "10858e5eccc698936575a48aee4aa189a4f49d0430e498c9299460c36b577740" + }, + { + "file": "packages/general-ledger/src/SalesSchema.php", + "sha256": "2b641ca2aca5b750b981cf1c1cbc63709b7acc941bbe6c777c9c176ef0f71dae" + }, + { + "file": "config/general_ledger.php", + "sha256": "4e825f937acd41c3493b1f10ccabd0b1b35ee69aa732c4b04ae422391f3a5918" + }, + { + "file": "routes/web.php", + "sha256": "6bc90b2d3b5f77f6f48d4a42889ed11b51b76abbad3bc347d4a05339ee04f5b7" + }, + { + "file": "scripts/payable-history-sgf-proof.php", + "sha256": "84afd2163b025171cbb3dfd55b019a326caaf90376a90cee21174d44c63cd2cc" + }, + { + "file": "scripts/ledger-cost-proof.php", + "sha256": "6cc1e1f7b80125d0d6f7ac85591cd71129edb98c9f4d7eb0d02f5e44e0705eb7" + }, + { + "file": "scripts/ledger-cost-http-entry.php", + "sha256": "3dd702389eabe2e813eb46cb25db6c747b4bc54a02cc30377422070853428784" + }, + { + "file": "scripts/ledger-cost-demo.mjs", + "sha256": "59e86f3d067c8002c5ddd9729fbb8c02bfb2bdcc3bef39b5caf1df19fd7c1afc" + }, + { + "file": "scripts/ledger-run.mjs", + "sha256": "50111e68cc51811b476fe5761189197fb30aa3c6253db489639cdb8b18087f7a" + }, + { + "file": "scripts/ledger-composition-cases.php", + "sha256": "294864a6da5f462a6020f0c54e18d8a092c076b313c54eb71ed6ef1175f8d40d" + }, + { + "file": "scripts/ledger-composition-demo-check.mjs", + "sha256": "3b7061cb3465a4c8efa5b431c20c9fd7dab1e321c3cdb5a1f63cd550a49f2bf4" + }, + { + "file": "scripts/ledger-composition-http.mjs", + "sha256": "e51fa6afb8a836b64dcd774cf0a11d9fb0e2016d902778f50c734e915ac69e7c" + }, + { + "file": "scripts/ledger-composition-proof.php", + "sha256": "c05b6120db56bc3e8982495d4b60d63f7f5b3241eb45430b6e921302aba12f06" + }, + { + "file": "scripts/ledger-composition-workflow.php", + "sha256": "01ee8f53997b78a81c911414f003eb641d02a3ed6ecaef44261edd2a75b71107" + }, + { + "file": "scripts/summarize-ledger-composition.mjs", + "sha256": "c6101073abcdb7b42607f7c2b996a69f2d389a5562d65562ab26523675b6d2c2" + }, + { + "file": "resources/views/accounting/ledger-composition.blade.php", + "sha256": "fa214ad9a180f944648149e4e8c8f0652addef6a866c397b9c91de995c65746f" + }, + { + "file": "resources/views/accounting/ledger-composition-demo-entry.blade.php", + "sha256": "1266df5a8b9c8b96ee6b29d9b1085af73fa260d88c23c7dcf78459a36963570a" + }, + { + "file": "resources/views/accounting/general-ledger.blade.php", + "sha256": "b756726ae2d5b3d17e490cd33067e85d9f842673ce579ba1f4cd14105bc893d7" + }, + { + "file": "docs/GENERAL_LEDGER_COMPOSITION_DELIVERY.md", + "sha256": "cecec59b64adff6eb9cb32d183b809f187170b818155d6d8adead382ec460dc5" + }, + { + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_SCOPE.md", + "sha256": "6044a9471b741db010f6d0509aacb56609624b05e83489311f8f5340cced108d" + }, + { + "file": "README.md", + "sha256": "c3082f0f4c2b73346feac6b689b36ff8260bc8d566f3872e2e5a2c55088ceae2" + }, + { + "file": "docs/PRODUCT_DEMO.md", + "sha256": "84d7870c345cb3367f151152082329bd93dfd62ef4c85c839fec386b1c6adace" + }, + { + "file": "docs/SGF_MODULE_FLOW_PREPARATION.md", + "sha256": "d3b5d011e2c50db71806d6c90a43559ee3d77089060ff29c94fd23cb3dcb30be" + } + ], + "team_demo": { + "tag": "fe42e1169ce6", + "pid": 17896, + "url": "http://127.0.0.1:8057/qa/cost-demo", + "cookie": "sgf_cost_fe42e1169ce6", + "loopback_only": true, + "separate_team_database": true, + "old_demos_not_reset": true + }, + "observed_result": { + "journals": 8, + "lines": 17, + "debit_minor": 330500, + "credit_minor": 330500, + "client_balance_minor": 40000, + "cost_balance_minor": 29500, + "supplier_balance_minor": 6000, + "closed_periods": 1 + }, + "preservation": { + "six_pending_records_untouched": true, + "blocked_cache_untouched": true, + "old_demonstrations_not_reset": true, + "source_outbox_rights_preserved": true, + "private_credentials_not_versioned": true, + "unrelated_work_preserved": true, + "destination_unchanged": true + }, + "limits": { + "visual_review_pending": true, + "actual_browser": false, + "new_large_volume_measurements": false, + "deployment_capacity_validated": false, + "all_six_modules_operationally_complete": false, + "purchasing_activation": false, + "stock_valuation": false, + "payroll_or_industrial_posting": false, + "real_or_public_grants": false, + "published": false, + "checkpoint": false, + "acceptance_presumed": false + }, + "next_proposed_scope": { + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_SCOPE.md", + "sha256": "6044a9471b741db010f6d0509aacb56609624b05e83489311f8f5340cced108d", + "authorization_required": true, + "not_implemented": true + } +} diff --git a/docs/proofs/common-ledger-direct-cost-20261103.json b/docs/proofs/common-ledger-direct-cost-20261103.json new file mode 100644 index 0000000..e950383 --- /dev/null +++ b/docs/proofs/common-ledger-direct-cost-20261103.json @@ -0,0 +1,686 @@ +{ + "increment": "COMMON-LEDGER-DIRECT-COST-SIM-v1", + "consolidated_at_utc": "2026-11-02T23:23:09.131Z", + "authorization": { + "answer": "Autorizar o ciclo sintético proposto", + "scope_archive_matches_presented_proposal": true, + "approved_scope_sha256": "fda42b728512b5fc554db4dcd67a5b652aa1bdfd1e44b1de93b32a7d694aaf92" + }, + "status": "implemented_and_tested_with_explicit_limits", + "functional_code": true, + "synthetic_only": true, + "tests": { + "actual_workflow": { + "passed": true, + "journal_id": 1, + "journals": 1, + "lines": 2, + "debit_minor": 27500, + "credit_minor": 27500, + "source_outbox_rights_fingerprint_unchanged": true, + "same_and_other_key_no_duplication": true, + "period_closed": true, + "trial_balance_and_account_ledger_reconciled": true + }, + "defaults": { + "passed": true, + "default_without_environment": false, + "owned_cost_only_qa_runtime": true, + "sales_not_enabled": true, + "real_environment_not_changed": true + }, + "regression": { + "passed": true, + "checks": 27, + "cases": [ + { + "name": "complete-source-rights-and-explicit-impact", + "checks": 7, + "passed": true + }, + { + "name": "partial175-and-non-cent-representable-cost", + "checks": 3, + "passed": true + }, + { + "name": "exact-rational-no-rounding", + "checks": 2, + "passed": true + }, + { + "name": "revoked-source-rights-and-old-capture", + "checks": 1, + "passed": true + }, + { + "name": "revoked-rights-before-recovery", + "checks": 1, + "passed": true + }, + { + "name": "source-access-and-person-independence", + "checks": 2, + "passed": true + }, + { + "name": "fault-boundaries-atomic-recovery", + "checks": 5, + "passed": true + }, + { + "name": "stable-perimeter-no-second-recognition-and-close-refusal", + "checks": 3, + "passed": true + }, + { + "name": "guards-and-perimeter-immutability", + "checks": 2, + "passed": true + } + ], + "rollback_only": true, + "source_outbox_rights_unchanged": true, + "no_rounding_or_duplicate_recognition": true + }, + "security": { + "passed": true, + "checks": 10, + "eligible_foreign_unit_company_tenant_refused": true, + "three_live_view_rights_rechecked": true, + "actual_unverified_successor_refused": true, + "no_inherited_verification": true, + "rollback_only": true, + "source_outbox_rights_unchanged": true + }, + "actual_http": { + "passed": true, + "checks": 51, + "actual_http": true, + "actual_csrf": true, + "principal_minor": 27500, + "journals": 1, + "lines": 2, + "source_events": 3, + "report_reconciled": true, + "typed_cost_origin_link": true, + "one_reviewed_qa_close": true, + "repeated_keys_and_source_no_duplicates": true, + "read_only_workspace": true, + "writer_locks": 0, + "visual_review": false + }, + "http_final": { + "passed": true, + "source_outbox_rights_fingerprint_unchanged": true, + "journals": 1, + "lines": 2, + "closures": 1, + "closed_ui_has_no_commands": true, + "debit_minor": 27500, + "credit_minor": 27500 + }, + "ui_postcheck": { + "passed": true, + "cost_order_not_mislabelled_as_debt": true, + "typed_filter_journals": 1, + "typed_filter_events": 3, + "generic_diary_and_account_report_source_links": true, + "read_only_postcheck": true + }, + "concurrency": { + "passed": true, + "workers": 6, + "stale_post_after_committed_rate_version": { + "waiting": { + "a": { + "chain_reaches_parent": true, + "wait_event": "transactionid" + } + }, + "read_before_release": { + "status": 200, + "amount_minor": 27500, + "journals": 0 + }, + "results": { + "a": { + "status": 409, + "message": "Cálculo actual completo e validado distintamente obrigatório; custo conhecido parcial não é total." + } + }, + "changed_effect_id": 3 + }, + "fresh_posting": { + "waiting": { + "b": { + "chain_reaches_parent": true, + "wait_event": "transactionid" + }, + "a": { + "chain_reaches_parent": true, + "wait_event": "tuple" + } + }, + "read_before_release": null, + "results": { + "a": { + "status": 200, + "result": { + "state": "posted", + "proposal_id": 2, + "journal_id": 1, + "replayed": false + } + }, + "b": { + "status": 200, + "result": { + "state": "posted", + "proposal_id": 2, + "journal_id": 1, + "replayed": false + } + } + }, + "changed_effect_id": null + }, + "fresh_period_close": { + "waiting": { + "b": { + "chain_reaches_parent": true, + "wait_event": "transactionid" + }, + "a": { + "chain_reaches_parent": true, + "wait_event": "tuple" + } + }, + "read_before_release": null, + "results": { + "a": { + "status": 200, + "result": { + "state": "closed", + "closure_id": 1, + "period_version": 2, + "replayed": false + } + }, + "b": { + "status": 200, + "result": { + "state": "closed", + "closure_id": 1, + "period_version": 2, + "replayed": false + } + } + }, + "changed_effect_id": null + }, + "read_finished_before_writer_release": true, + "same_cost_amount_minor": 27500, + "new_calculation_version": 2, + "journals": 1, + "lines": 2, + "closures": 1, + "technical_original_calculation_and_original_outbox_unchanged": true, + "all_outbox_still_captured_no_accounting": true + }, + "team_http_and_forms": { + "passed": true, + "checks": 22, + "three_declared_accounting_roles": true, + "actual_validated_cost_minor": 27500, + "initial_proposals": 0, + "initial_journals": 0, + "initial_closures": 0, + "no_business_commands": true, + "private_existing_build": true, + "rendered_forms_mock_checks": 4, + "actual_browser": false, + "visual_review": false + }, + "team_preservation": { + "passed": true, + "new_team_fixture": true, + "declared_synthetic_actors": 5, + "unlisted_users_with_grants": 0, + "actual_validated_cost_minor": 27500, + "no_accounting_decisions_or_effects": true, + "outbox_captured_no_accounting": true, + "source_fingerprint": "fbdfd4e86488a2f68fb41803992ba7f556952523a217178685c8dd98714f7bd9" + }, + "supplier_writer_compatibility": { + "passed": true, + "cases": [ + { + "name": "prepare-independent-review-post-and-source-reconciliation", + "assertions": 9, + "passed": true + }, + { + "name": "repetition-conflicting-key-and-recovery-after-period-version", + "assertions": 6, + "passed": true + }, + { + "name": "rights-revoked-actor-person-and-no-inheritance", + "assertions": 4, + "passed": true + }, + { + "name": "independence-rejection-and-preparer-ownership", + "assertions": 6, + "passed": true + }, + { + "name": "source-rule-period-latest-capture-and-revision-changes", + "assertions": 10, + "passed": true + }, + { + "name": "invalid-period-accounts-currency-foreign-scopes-and-extra-fields", + "assertions": 10, + "passed": true + }, + { + "name": "failure-at-every-posting-boundary-and-idempotent-recovery", + "assertions": 12, + "passed": true + }, + { + "name": "database-balance-guards-and-append-only-history", + "assertions": 16, + "passed": true + } + ], + "assertions": 74, + "financial_fingerprint_equal": true, + "all_test_journals_rolled_back": true + }, + "sales_compatibility": { + "passed": true, + "actual_sales_source_matches_original_posted_snapshot": true, + "single_sales_provider_hash_unchanged": true, + "existing_trial_balance_debit_minor": 240000, + "cost_default_off": true, + "no_business_commands": true + }, + "native_uncomposed_refusal": { + "passed": true, + "uncomposed_cost_refused": true, + "cost_schema_not_required": true, + "no_proposal_or_effect_created": true + }, + "cost_supplier_coexistence": { + "passed": true, + "coinciding_order_supplier_obligation_ids": true, + "one_writer": true, + "cost_filter_journals": 1, + "cost_filter_events": 3, + "supplier_filter_journals": 1, + "supplier_filter_events": 3, + "journals": 2, + "lines": 4, + "debit_minor": 33500, + "credit_minor": 33500, + "actual_selected_cost_minor": 27500, + "supplier_balance_minor": 6000, + "cost_source_and_outbox_unchanged": true, + "joint_qa_period_closed": true, + "supplier_receipt_controlled_synthetic_not_live_import": true, + "no_payment_or_stock_effect": true + } + }, + "evidence": [ + { + "file": "private/ledger-6d0ea9e319e0/cost-workflow.json", + "sha256": "a19473225be09808b45311a14dcfa72ebe1d1dee874b20ec3fb6a17d785d1acb" + }, + { + "file": "private/ledger-6d0ea9e319e0/cost-defaults.json", + "sha256": "33f35dfab53f491bc546e22d9ffca58d24951b9cb593866214680d7a17a8b49e" + }, + { + "file": "private/ledger-6c9ec47c310e/cost-cases.json", + "sha256": "e85735a28cc7fb18a9f94e65108395a6474092901c5a7319e81457831d6dd126" + }, + { + "file": "private/ledger-6c9ec47c310e/cost-security.json", + "sha256": "5a4a46c181e396a1fef1d8aab006d20b1c986d38e1388ef90e233e41c0d5eb97" + }, + { + "file": "private/ledger-6c9ec47c310e/cost-http.json", + "sha256": "7af9deeeba9a9ecb0aa66ee917194a2dedbdc4bb46649aa6d137df97c8259cca" + }, + { + "file": "private/ledger-6c9ec47c310e/cost-http-final.json", + "sha256": "9127aab59de61d07d760ba3465288f26a943346ea1f230066b2237a264c3c906" + }, + { + "file": "private/ledger-6c9ec47c310e/cost-ui-postcheck.json", + "sha256": "62ddec3aab42dd9dab56d0334af61dba1a6a79b8b725d9bfeb01f1e982cb91fb" + }, + { + "file": "private/ledger-5e566833f610/cost-race.json", + "sha256": "0c3e3d32f748ca22ae9fa9eae8259f9861276ded414a50cefdcc5e0b465796a8" + }, + { + "file": "private/ledger-6a73790314ce/cost-demo-http.json", + "sha256": "17f994271da5d70bc7124686ad125ecb6cb918d8663ff3c24e647d535660863e" + }, + { + "file": "private/ledger-6a73790314ce/cost-demo-preservation.json", + "sha256": "f9235884994993e9cd500989bc773ea8d74be40cde3e4668251a1e67a4bc63bc" + }, + { + "file": "private/ledger-a6f36429ef4f/ledger-cases.json", + "sha256": "8197a2fa96f3dee1e85b411c94b5f72f4a45ac3eac14241bc0062faffb7a0ff8" + }, + { + "file": "private/ledger-7dabce07b0c3/cost-extension-sales-compatibility.json", + "sha256": "8177d894753d44967f75b234940fe18ae7342d1a9ccffea4ffa96fe9aacbc083" + }, + { + "file": "private/ledger-native-c5ff3a6aa5a3/cost-capability-refusal.json", + "sha256": "8b932c8a5d3c064da56d578430a6db20023016d58a79c8358c6804ac0b7ccc87" + }, + { + "file": "private/ledger-3eafd03c8c3a/cost-coexistence.json", + "sha256": "40866ec5e98268123104d4b8c295589a5329bfe8969cd74829325b4befc0fe73" + }, + { + "file": "private/ledger-cost-approved-scope.md", + "sha256": "fda42b728512b5fc554db4dcd67a5b652aa1bdfd1e44b1de93b32a7d694aaf92" + } + ], + "previous_proofs": [ + { + "file": "docs/proofs/common-ledger-reports-20261103.json", + "sha256": "83b81a3401e4cfe8ea4c9d13339385f9241d0eefee5495da3e767812f0c863f1" + }, + { + "file": "docs/proofs/common-ledger-sales-receivable-20261103.json", + "sha256": "b5572466111fb85d89a604fbaa423976ed17c61afc5e2e45ba392fb23aa82e8c" + }, + { + "file": "docs/proofs/common-finance-bundle-20261103.json", + "sha256": "086c1556e7cefcf64a7064995a4aa6bd0e3aa9dd62cba66285b7801715f9f22c" + }, + { + "file": "docs/proofs/common-ledger-complete-cycle-20261102.json", + "sha256": "23657d594b84e6aeeb0d16d45790d54feca04b12e2260cfffa4f8e4a37eaa0ce" + } + ], + "previous_private_artifacts_verified": 52, + "frozen_native_packages": [ + { + "files": 25, + "manifest_sha256": "6a507ea7d708a12a8e526e4c610696d8db84079d18aede470237b65505630e7e", + "all_hashes_preserved": true, + "cost_extension_not_installed": true + }, + { + "files": 30, + "manifest_sha256": "cbc4ddbea15f5e396c92bc2e664b973138551928980f334bcf3eb0cf097cacb1", + "all_hashes_preserved": true, + "cost_extension_not_installed": true + } + ], + "sources": [ + { + "file": "AGENTS.md", + "sha256": "df66a4b9278a5c5bea669dc29fe02e85dc5d7842b3d9a89b8b8e76af7cfd8ed1" + }, + { + "file": "config/cost_ledger.php", + "sha256": "64069dd558f87f2bb6b1f10bc2a0383fa63629cecb5b2f1f86a39cba3fed1b7b" + }, + { + "file": "app/Shared/Testing/TestingDatabaseGuard.php", + "sha256": "963043d7a872422aab9e9e0b3746d0be841ae3aa1da795e50b6904121fc77dff" + }, + { + "file": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c" + }, + { + "file": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "5a07462a3f4cc06776fce3da98b42b188f26f1f32c3c7cb4bc37d46408b3be17" + }, + { + "file": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "c2bbe4a6ff8d0deb4a298b6821cb762510670a573135d34dbabc87a03c140697" + }, + { + "file": "app/Modules/Accounting/GeneralLedgerController.php", + "sha256": "671d853f1d6784588e8a5f374c2b377d98de016a788bd81a38d3f8b12121eb70" + }, + { + "file": "app/Modules/Accounting/CostLedgerController.php", + "sha256": "5491d1eb03daaf278d18eeebc3867a6ab8a8c917fd91cfee5f3e611d28042b82" + }, + { + "file": "app/Modules/Accounting/CostLedgerSource.php", + "sha256": "7951fbbde11783805b82ab7d682be38ae9666bae70292f92e2d86cff7f390330" + }, + { + "file": "packages/general-ledger/bootstrap.php", + "sha256": "6fdaa73b95c14f000ead649eb37d5d5926f79034250c5b4bcf910c3d95845f0e" + }, + { + "file": "packages/general-ledger/README.md", + "sha256": "09aba8ccb95da4fa8303a02d85349776bec5af4d374be0194dadd0dedfab8d26" + }, + { + "file": "packages/general-ledger/src/LedgerSchema.php", + "sha256": "1fb2490fe8d4d206d2f8157803307cdd4e2f733150d0fec4993a7e229fce58cb" + }, + { + "file": "packages/general-ledger/src/CycleSchema.php", + "sha256": "25407f9ea4321ee3acb0c310b5d981b8fdaf89c5464d32878ecc57c29e60972d" + }, + { + "file": "packages/general-ledger/src/CostSchema.php", + "sha256": "da0919e6aeab83a572d1171b1f641b62593f1a0157a51ec988ecbdacda0a9942" + }, + { + "file": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7a4f01e6f0dfcf9845574e9f316bade3fde7b97a3ba806128c8fc452754b44aa" + }, + { + "file": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "0f3bd409ccd71df153806ff654dfe74bac2dd053526f53bcba7e46f40d2f5e0b" + }, + { + "file": "packages/general-ledger/src/LedgerSales.php", + "sha256": "ea21a8376705e413b824513d30243c271870b2bfbc7a9af2fd922916a145e130" + }, + { + "file": "packages/general-ledger/src/LedgerReports.php", + "sha256": "f0f271114229eab097808aa4ee0d50b47805524dc87c7d7c8d7f248e91705344" + }, + { + "file": "packages/general-ledger/src/ReportsWorkspace.php", + "sha256": "46238afbb708b6c111b90a8bb79f5dd6ae9b1189e926746efefeef497ff1fc33" + }, + { + "file": "packages/general-ledger/ui/reports.php", + "sha256": "ae34b86e21cbdd42bceced8c4e260a7b360c819078b3a5c410219e2d24890d90" + }, + { + "file": "resources/views/accounting/general-ledger.blade.php", + "sha256": "7107bb48054a41f955a979d101784e1ffcdaa8949bb5f9b6a5bf89bfd5708b0a" + }, + { + "file": "resources/views/accounting/cost-ledger.blade.php", + "sha256": "7459009383cd7561443259beb9a446d6a872a4571193c468628a10fad6eb0934" + }, + { + "file": "resources/views/accounting/cost-demo-entry.blade.php", + "sha256": "17c39f5537acdc34ddd4b5ce181faded53a4c9f0661d5367fa2d60a6062d4f10" + }, + { + "file": "routes/web.php", + "sha256": "8851966d45cd947f80deba9bb7854002d07ab759c0a3a216151c19ca117a1105" + }, + { + "file": "scripts/payable-history-sgf-proof.php", + "sha256": "ebe4fb518e97cc3eeb81da1a14c045e85d25c942434279c90b8f3fba75018996" + }, + { + "file": "scripts/ledger-run.mjs", + "sha256": "820041eb470c73fd94da785265c1f15e40570d12ebb04ccfcad3923227bc4c9b" + }, + { + "file": "scripts/ledger-sales-proof.php", + "sha256": "eb69b99cc7b8a6da8578955f84a3603d4d80a54befb3c9b67415460332a75f70" + }, + { + "file": "scripts/ledger-cycle-native-proof.php", + "sha256": "4a76e998dd4494a0c2c24174aa75eb0eb08940a84b4367a6c529dc7fcb2c4b39" + }, + { + "file": "scripts/ledger-cost-cases.php", + "sha256": "8efd52d010b3f6fa4fd14c2010dfc9db07fcf704039aa52c5a2d0ca4df283f37" + }, + { + "file": "scripts/ledger-cost-coexistence.php", + "sha256": "5425572beab3ea0ea24ed7d71ece66e46d8004ffd1394fcf0545e471b297ac4e" + }, + { + "file": "scripts/ledger-cost-demo-check.mjs", + "sha256": "4c75ef4d551f5cfc8851cb325d2e15c5a8aea722ec5cb6d83330a526c729dec9" + }, + { + "file": "scripts/ledger-cost-demo.mjs", + "sha256": "59e86f3d067c8002c5ddd9729fbb8c02bfb2bdcc3bef39b5caf1df19fd7c1afc" + }, + { + "file": "scripts/ledger-cost-http-entry.php", + "sha256": "f6aaeec2685beb9c0696e78820f1e67740f063bb49e9db28272f45465f15a8ed" + }, + { + "file": "scripts/ledger-cost-http-router.php", + "sha256": "1b659dd9fc57a9603a622d7556de8324a7e8291368a18e6fd6cb9ec0a3fe458a" + }, + { + "file": "scripts/ledger-cost-http.mjs", + "sha256": "7595f1a93365b72c28e78c33a9b9842c314423a610e459292372969f8d1d1857" + }, + { + "file": "scripts/ledger-cost-proof.php", + "sha256": "cc03422fa8d01946601eb699e8d95f4dfd4d040bc541089853045fa2a19ff481" + }, + { + "file": "scripts/ledger-cost-race.php", + "sha256": "f7008fcca51176481344766e19b4fc8cbf4b2eecf85025661de9c39479c42b6f" + }, + { + "file": "scripts/ledger-cost-security.php", + "sha256": "364abd336050f45de9ba46ec95746cc67882ba834d4f917e8a02c8990c41c2db" + }, + { + "file": "scripts/archive-ledger-cost-scope.mjs", + "sha256": "b3b7f6e39dd7c2ac43f56e39fcaec380d17b6e58a63db6e1a0ab17a1abc86ff8" + }, + { + "file": "scripts/summarize-ledger-cost.mjs", + "sha256": "a41a559270409845bb5ef3374878c0de102093f7d32fec29be0d843d21edd6ac" + }, + { + "file": "docs/GENERAL_LEDGER_DIRECT_COST_SCOPE.md", + "sha256": "9bfa1d3b17a715714cfb1f5226564d9e1152eff3643c64f1874cf1f97783e69a" + }, + { + "file": "docs/GENERAL_LEDGER_DIRECT_COST_DELIVERY.md", + "sha256": "d0c295cc7493ff066ed442566d6eaaebe7b9c00214e965a97e5a48677a257c77" + }, + { + "file": "docs/GENERAL_LEDGER_DIRECT_COST_CORRECTION_SCOPE.md", + "sha256": "7b71bab9654cc0b4f5c4fa33a6728208c9450b6bccca887a86d157f1263396c4" + }, + { + "file": "README.md", + "sha256": "5206e8369e696b56229e0d7213b6a089320c21608bb5dbe0703bd0b3c4a53afe" + }, + { + "file": "docs/PRODUCT_DEMO.md", + "sha256": "166e27d1833bac15a2588102f44fb79e5edf0d2383b2396e6e7e71361b60c300" + }, + { + "file": "docs/SGF_MODULE_FLOW_PREPARATION.md", + "sha256": "a39f19aeca52e9b65c7235e406af8176e045f39725c75138558a62dd3d42c988" + } + ], + "quality": { + "syntax": { + "php_files": 29, + "javascript_files": 6 + }, + "git_diff_check_both_repositories": true, + "new_dependencies": false, + "sgf_phpstan_pint": "not_installed_not_run", + "native_application_code_unchanged_previous_quality_not_repeated": true + }, + "rights": { + "distinct_ledger_rights": 7, + "ledger_grants_per_standard_cost_fixture": 9, + "existing_cost_and_technical_rights_only": true, + "real_or_public_grants": 0, + "mixed_supplier_fixture_additional_existing_qa_rights_only": true + }, + "source": { + "actual_workshop_and_cost_workflows": true, + "known_selected_direct_cost_minor": 27500, + "full_cost_or_margin": false, + "automatic_outbox_processing": false, + "identity_stable_per_order_and_selected_perimeter": true, + "correction_of_already_posted_cost": false + }, + "team_demo": { + "tag": "6a73790314ce", + "pid": 27284, + "url": "http://127.0.0.1:8054/qa/cost-demo", + "cookie": "sgf_cost_6a73790314ce", + "loopback_only": true, + "separate_team_database": true, + "old_demos_not_reset": true + }, + "preservation": { + "six_pending_records_untouched": true, + "blocked_cache_not_cleared": true, + "existing_demos_not_reset": true, + "source_history_outbox_preserved": true, + "existing_valid_proofs_preserved": true, + "unrelated_work_preserved": true, + "destination_package_unchanged": true + }, + "next_scope": { + "file": "docs/GENERAL_LEDGER_DIRECT_COST_CORRECTION_SCOPE.md", + "sha256": "7b71bab9654cc0b4f5c4fa33a6728208c9450b6bccca887a86d157f1263396c4", + "status": "proposal_only_requires_explicit_authorization", + "implemented": false + }, + "limits": { + "visual_review_pending": true, + "actual_browser": false, + "large_volume_load_not_measured": true, + "deployment_capacity_validated": false, + "new_indexes": false, + "all_six_modules_operational_composition": false, + "real_chart_or_cost_policy": false, + "stock_valuation_or_posting": false, + "payroll_or_industrial_cost_posting": false, + "real_financial_operations": false, + "cost_correction_or_revaluation": false, + "reopening": false, + "destination_migrations_or_grants": false, + "publication": false, + "purchasing_activation": false, + "acceptance_presumed": false, + "checkpoint": false + } +} diff --git a/docs/proofs/common-ledger-direct-cost-correction-20261103.json b/docs/proofs/common-ledger-direct-cost-correction-20261103.json new file mode 100644 index 0000000..34ca1f4 --- /dev/null +++ b/docs/proofs/common-ledger-direct-cost-correction-20261103.json @@ -0,0 +1,668 @@ +{ + "increment": "COMMON-LEDGER-DIRECT-COST-CORRECTION-SIM-v1", + "consolidated_at_utc": "2026-11-03T05:18:18.685Z", + "authorization": { + "answer": "Autorizar a correcção sintética proposta", + "scope_archive_matches_presented_proposal": true, + "approved_scope_sha256": "7b71bab9654cc0b4f5c4fa33a6728208c9450b6bccca887a86d157f1263396c4" + }, + "functional_code": true, + "synthetic_only": true, + "status": "implemented_and_tested_with_explicit_limits", + "tests": { + "actual_source_setup": { + "passed": true, + "original_journal_id": 1, + "original_journal_sha256": "db5c9af341f544b0c6cb0b0fad4b4e2c8d79f7dea7078576b4d10b3d052008c3", + "original_calculation_sha256": "7917c0951c5737ad86037b9742751f5582abb93e678c4cd2e6993eee44639980", + "replacement_rate_id": 3, + "replacement_calculation_id": 2, + "original_minor": 27500, + "replacement_minor": 29500, + "difference_minor": 2000, + "source_fingerprint": "fe005fcf3bbac3631f00b6bfe460cbb7a54ba0a141e1f2f7f713be2e87bd4730", + "no_correction_groups_yet": true + }, + "actual_complete_workflow": { + "passed": true, + "journals": 3, + "lines": 6, + "correction_groups_applied": 1, + "gross_debit_minor": 84500, + "gross_credit_minor": 84500, + "cost_balance_minor": 29500, + "net_difference_minor": 2000, + "original_cost_calculation_source_outbox_rights_unchanged": true, + "same_and_other_key_single_pair": true, + "period_closed": true, + "reports_reconciled": true + }, + "defaults": { + "passed": true, + "default_without_environment": false, + "explicit_new_qa_runtime": true, + "real_environment_unchanged": true + }, + "regression": { + "passed": true, + "cases": [ + { + "name": "explicit-asymmetric-impact-and-indivisible-application", + "checks": 7, + "passed": true + }, + { + "name": "faults-at-pair-boundaries-rollback-and-recovery", + "checks": 7, + "passed": true + }, + { + "name": "database-rejects-orphan-cost-reversal", + "checks": 1, + "passed": true + }, + { + "name": "changed-source-version-requires-new-conference", + "checks": 4, + "passed": true + }, + { + "name": "rights-person-and-replay-authority", + "checks": 2, + "passed": true + }, + { + "name": "readers-foreign-original-disabled-capability-and-closed-period", + "checks": 5, + "passed": true + }, + { + "name": "new-change-after-correction-blocks-close-no-implicit-chain", + "checks": 3, + "passed": true + } + ], + "checks": 30, + "rollback_only": true, + "source_originals_outbox_rights_unchanged": true, + "asymmetric_pair_and_orphan_sql_enforced": true + }, + "security": { + "passed": true, + "checks": 8, + "eligible_foreign_tenant_company_unit_refused": true, + "four_live_rights_revalidated": true, + "rollback_only": true, + "source_outbox_rights_unchanged": true + }, + "actual_http": { + "passed": true, + "checks": 58, + "actual_http": true, + "csrf_and_context": true, + "indivisible_four_line_impact": true, + "isolated_public_parts_refused": true, + "original_minor": 27500, + "replacement_minor": 29500, + "delta_minor": 2000, + "journals": 3, + "lines": 6, + "applied_groups": 1, + "gross_minor": 84500, + "balance_minor": 29500, + "source_snapshot_unchanged": true, + "one_reviewed_close": true, + "read_only_workspace": true, + "writer_locks": 0, + "visual_review": false + }, + "http_final": { + "passed": true, + "original_journal_calculation_source_outbox_rights_unchanged": true, + "journals": 3, + "lines": 6, + "results": 1, + "closures": 1, + "closed_ui_no_commands": true + }, + "concurrency": { + "passed": true, + "workers": 6, + "stale_group_after_committed_version": { + "waiting": { + "a": { + "chain_reaches_parent": true, + "wait_event": "transactionid" + } + }, + "read_before_release": { + "status": 200, + "amount_minor": 29500, + "journals": 1, + "results": 0 + }, + "results": { + "a": { + "status": 409, + "message": "Fonte, regra ou período mudaram; prepare nova conferência." + } + }, + "changed_effect_id": 3 + }, + "fresh_pair": { + "waiting": { + "a": { + "chain_reaches_parent": true, + "wait_event": "transactionid" + }, + "b": { + "chain_reaches_parent": true, + "wait_event": "tuple" + } + }, + "read_before_release": null, + "results": { + "a": { + "status": 200, + "result": { + "state": "corrected", + "correction_id": 2, + "result_id": 1, + "reverse_journal_id": 2, + "replacement_journal_id": 3, + "replayed": false + } + }, + "b": { + "status": 200, + "result": { + "state": "corrected", + "correction_id": 2, + "result_id": 1, + "reverse_journal_id": 2, + "replacement_journal_id": 3, + "replayed": false + } + } + }, + "changed_effect_id": null + }, + "fresh_close": { + "waiting": { + "a": { + "chain_reaches_parent": true, + "wait_event": "transactionid" + }, + "b": { + "chain_reaches_parent": true, + "wait_event": "tuple" + } + }, + "read_before_release": null, + "results": { + "a": { + "status": 200, + "result": { + "state": "closed", + "closure_id": 1, + "period_version": 2, + "replayed": false + } + }, + "b": { + "status": 200, + "result": { + "state": "closed", + "closure_id": 1, + "period_version": 2, + "replayed": false + } + } + }, + "changed_effect_id": null + }, + "reader_finished_before_release": true, + "prepared_groups": 2, + "applied_groups": 1, + "journals": 3, + "lines": 6, + "closures": 1, + "cost_balance_minor": 29500, + "latest_cost_version": 3, + "original_journal_calculations_outbox_unchanged": true + }, + "three_interface_postcheck": { + "passed": true, + "superseded_group_visible_without_action": true, + "cost_generic_and_legacy_cycle_hide_isolated_part_application": true, + "read_only": true + }, + "cost_supplier_corrections": { + "passed": true, + "coinciding_order_and_supplier_obligation_ids": true, + "cost_typed_journals": 3, + "cost_typed_events": 9, + "supplier_typed_journals": 3, + "supplier_typed_events": 9, + "focused_cost_groups": 1, + "both_sql_pair_domains_validated": true, + "journals": 6, + "lines": 12, + "applied_groups": 2, + "gross_minor": 102500, + "current_cost_minor": 29500, + "supplier_balance_minor": 6000, + "source_original_outbox_preserved": true, + "joint_qa_close": true, + "controlled_supplier_receipt_not_live_import": true + }, + "native_supplier_cycle": { + "passed": true, + "checks": 23, + "rollback_only": true, + "principal_minor": 6000, + "allocated_balance_minor": 4000, + "final_balance_minor": 6000, + "debit_minor": 22000, + "credit_minor": 22000, + "journals": 5, + "lines": 10, + "correction_pairs": 1, + "period_closed": true, + "obligation_id": 1, + "recognition_journal_id": 1, + "allocation_id": 1, + "reversal_id": 1, + "correction_id": 1, + "period_check_id": 1 + }, + "old_cost_mode": { + "passed": true, + "old_cost_source_matches_original_posted_snapshot": true, + "single_cost_period_provider_packet_preserved": true, + "new_correction_flag_default_off": true, + "new_correction_schema_absent": true, + "uncomposed_correction_refused403": true, + "old_ledger_grants_still9": true, + "no_business_writes": true + }, + "old8054_preservation": { + "passed": true, + "old8054_source_outbox_rights_exact": true, + "correction_flag_off": true, + "correction_schema_absent": true, + "journals_observed": 0, + "no_business_writes": true + }, + "team_readiness_and_forms": { + "passed": true, + "checks": 23, + "three_accounting_roles": true, + "original_minor": 27500, + "actual_successor_minor": 29500, + "initial_journals": 1, + "initial_groups": 0, + "initial_closures": 0, + "no_business_commands": true, + "rendered_forms_mock_checks": 5, + "actual_browser": false, + "visual_review": false, + "private_existing_build": true + }, + "team_preservation": { + "passed": true, + "original275_present": true, + "actual_validated_successor295": true, + "original_source_outbox_rights_exact": true, + "initial_journals": 1, + "initial_correction_groups": 0, + "initial_closures": 0, + "ledger_grants": 12, + "distinct_ledger_rights": 10, + "no_business_writes": true + } + }, + "evidence": [ + { + "file": "private/ledger-e2ec7e0e3f38/cost-correction-fixture.json", + "sha256": "c05b25101dcd5bccfd0b1b4fa5762d5e71460dd597c01ef50bbd5ae4bf8686c3" + }, + { + "file": "private/ledger-e2ec7e0e3f38/cost-correction-workflow.json", + "sha256": "70f071de9bf6d7dd19457675a1e515414ed2778badf1767a26b6ebc6ef8bec1c" + }, + { + "file": "private/ledger-e2ec7e0e3f38/cost-correction-defaults.json", + "sha256": "03982abebd43c75e7a50a3ad4985e3ba7789653a9f79bec85105159ce93ed679" + }, + { + "file": "private/ledger-c4c506a3c295/cost-correction-cases.json", + "sha256": "1c9f5ad3c2324309185f9215acba257cf7ac6296b5a983969fb2edb90fb01d6f" + }, + { + "file": "private/ledger-c4c506a3c295/cost-correction-security.json", + "sha256": "0750db59f3a205b884bfabec035c862ff8ca39511d421064c0e44f2b9ebe769e" + }, + { + "file": "private/ledger-c4c506a3c295/cost-correction-http.json", + "sha256": "fec1ab48d1d74f7332ca41c543307fa5d3e266a4f68473eb6224c849c43e0ba2" + }, + { + "file": "private/ledger-c4c506a3c295/cost-correction-http-final.json", + "sha256": "05315ebf59f8301fcbdab8da4b334bccc0e1c154e480818fa8d83cae94dc10f7" + }, + { + "file": "private/ledger-eee1a330c1bb/cost-correction-race.json", + "sha256": "974c304283d4505263d8ea6b2024326d18e9d8d52634f0bfc2324759fb5e931a" + }, + { + "file": "private/ledger-eee1a330c1bb/cost-correction-ui-postcheck.json", + "sha256": "90e28087316f2bb74d3a7d0160ab7e1d33843a2aa24f77839c1a6d90a0eb91b6" + }, + { + "file": "private/ledger-ac404fba21fd/cost-correction-coexistence.json", + "sha256": "557028c4221c6912a7790eb0a8bdeadbda4dee0013740096ece711cc800a0e4c" + }, + { + "file": "private/ledger-native-0912930aea5b/native-cycle-cases.json", + "sha256": "e79f0c9c4423abbe8fac86ee5fe38ced1a3ced3491fd8db4229aaf5e461a2344" + }, + { + "file": "private/ledger-6d0ea9e319e0/cost-correction-legacy-mode.json", + "sha256": "c904b02bf94068ff803fbc97acddea45bc330f46d3c156722ba9f9f4874f818f" + }, + { + "file": "private/ledger-6a73790314ce/cost-demo-after-correction.json", + "sha256": "4ee4263136ddbb8fbc662453141457de0d6063acf93235096990bf08ac32028b" + }, + { + "file": "private/ledger-f3e0a05eb2ad/cost-correction-demo-http.json", + "sha256": "091ae9db0065595568ea5e8c7f39b4783ca10586030fcbe94a18a9b72a902e6a" + }, + { + "file": "private/ledger-f3e0a05eb2ad/cost-correction-demo-preservation.json", + "sha256": "39aa598ac07239ce91141fe8e603212d493c56d42f3f598a9e90f6cbfe73cb93" + }, + { + "file": "private/ledger-cost-correction-approved-scope.md", + "sha256": "7b71bab9654cc0b4f5c4fa33a6728208c9450b6bccca887a86d157f1263396c4" + } + ], + "previous_proofs": [ + { + "file": "docs/proofs/common-ledger-direct-cost-20261103.json", + "sha256": "5354ac34eb27dd9c05564d8eb9694a90c3e8eceaf018e2873aa299aa54b6cf6e" + }, + { + "file": "docs/proofs/common-ledger-reports-20261103.json", + "sha256": "83b81a3401e4cfe8ea4c9d13339385f9241d0eefee5495da3e767812f0c863f1" + }, + { + "file": "docs/proofs/common-ledger-sales-receivable-20261103.json", + "sha256": "b5572466111fb85d89a604fbaa423976ed17c61afc5e2e45ba392fb23aa82e8c" + }, + { + "file": "docs/proofs/common-finance-bundle-20261103.json", + "sha256": "086c1556e7cefcf64a7064995a4aa6bd0e3aa9dd62cba66285b7801715f9f22c" + }, + { + "file": "docs/proofs/common-ledger-complete-cycle-20261102.json", + "sha256": "23657d594b84e6aeeb0d16d45790d54feca04b12e2260cfffa4f8e4a37eaa0ce" + } + ], + "previous_private_artifacts_verified": 67, + "frozen_native_packages": [ + { + "files": 25, + "manifest_sha256": "6a507ea7d708a12a8e526e4c610696d8db84079d18aede470237b65505630e7e", + "all_hashes_preserved": true, + "not_replaced": true + }, + { + "files": 30, + "manifest_sha256": "cbc4ddbea15f5e396c92bc2e664b973138551928980f334bcf3eb0cf097cacb1", + "all_hashes_preserved": true, + "not_replaced": true + } + ], + "sources": [ + { + "file": "AGENTS.md", + "sha256": "eecf5e761d4b9b9b673359399fafcc845d6e0277490cf601cf0582ee2538478a" + }, + { + "file": "config/cost_ledger.php", + "sha256": "15cc9dfeb8877698e5b7553eeb3411a45ac3ad82ac4e23b4e38c4eb2f10cdf60" + }, + { + "file": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "27791ca5599ab6059dd4c6f7c69a0bfb90165ad22249e3fb847bd8b6b9768958" + }, + { + "file": "app/Modules/Accounting/CostLedgerSource.php", + "sha256": "8cbf64e69a189439202920d6094f8720247aab519ec14be7d91b0ba5908cdf97" + }, + { + "file": "app/Modules/Accounting/GeneralLedgerController.php", + "sha256": "671d853f1d6784588e8a5f374c2b377d98de016a788bd81a38d3f8b12121eb70" + }, + { + "file": "app/Modules/Accounting/CostLedgerController.php", + "sha256": "5491d1eb03daaf278d18eeebc3867a6ab8a8c917fd91cfee5f3e611d28042b82" + }, + { + "file": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c" + }, + { + "file": "app/Shared/Testing/TestingDatabaseGuard.php", + "sha256": "963043d7a872422aab9e9e0b3746d0be841ae3aa1da795e50b6904121fc77dff" + }, + { + "file": "packages/general-ledger/bootstrap.php", + "sha256": "61d0b77bcac3459f059cd1a3ae1a55cbc4d12c7cb31144b4081c39e8b419adc8" + }, + { + "file": "packages/general-ledger/README.md", + "sha256": "c4d18ffb16de5e22ad83e528a9fb991bf8ee7de100149e086b3c13b6e3c3b22e" + }, + { + "file": "packages/general-ledger/src/LedgerSchema.php", + "sha256": "1fb2490fe8d4d206d2f8157803307cdd4e2f733150d0fec4993a7e229fce58cb" + }, + { + "file": "packages/general-ledger/src/CycleSchema.php", + "sha256": "25407f9ea4321ee3acb0c310b5d981b8fdaf89c5464d32878ecc57c29e60972d" + }, + { + "file": "packages/general-ledger/src/CostSchema.php", + "sha256": "da0919e6aeab83a572d1171b1f641b62593f1a0157a51ec988ecbdacda0a9942" + }, + { + "file": "packages/general-ledger/src/CostCorrectionSchema.php", + "sha256": "1c43f7a3812e2a8ea31d4a0c88e887ec7d4cef4e9dd70cbab14af38b7b3e6080" + }, + { + "file": "packages/general-ledger/src/PayableJournal.php", + "sha256": "ac3e843fa54cbff12401fe03b6dcb0ddd39fb999f231fcd920ca1d7dd498626a" + }, + { + "file": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "4b129275a365ed482c89b4f3753402c956a17b2c9ea77f6ed6a9e643c680d116" + }, + { + "file": "packages/general-ledger/src/LedgerReports.php", + "sha256": "f0f271114229eab097808aa4ee0d50b47805524dc87c7d7c8d7f248e91705344" + }, + { + "file": "packages/general-ledger/ui/cycle.php", + "sha256": "a5f5fb6ce5e10d8db37ce10f29d6cb93d332e69010c69298cebc8eb2a869b771" + }, + { + "file": "resources/views/accounting/general-ledger.blade.php", + "sha256": "fef5645143028eee9c17b232f2fedd1ed5d1faedacd173a81d7d5bd2ecc89968" + }, + { + "file": "resources/views/accounting/cost-ledger.blade.php", + "sha256": "cf326bc06fc25ef99f3145cb960bd0de75aed8017db03339e0f0acb6c58c3b3d" + }, + { + "file": "resources/views/accounting/cost-correction.blade.php", + "sha256": "22e45f78e95b706d2b872a5a11497272550954eaf8ae37a6e0062a9e74c557e4" + }, + { + "file": "resources/views/accounting/cost-correction-demo-entry.blade.php", + "sha256": "e91948a22822bdd7177ce2fb3fe6652c7fb5124289cfc8889facf24c88a8352e" + }, + { + "file": "routes/web.php", + "sha256": "8851966d45cd947f80deba9bb7854002d07ab759c0a3a216151c19ca117a1105" + }, + { + "file": "scripts/payable-history-sgf-proof.php", + "sha256": "b783266cf8bdf7173bfc7976719d37a7ae6be358efc1c545d65082f07099ed97" + }, + { + "file": "scripts/ledger-run.mjs", + "sha256": "f85bb2ddefdabbce22e98a35a41765ec20f78444527690d648e6f423f01ed821" + }, + { + "file": "scripts/ledger-cost-proof.php", + "sha256": "2ce63e29dbc1fa67bbdd515e1cfe534fb620cf07a5446d8f535e0a9441116419" + }, + { + "file": "scripts/ledger-cost-http-entry.php", + "sha256": "757844f4cee11ba8cc7b68c0e64c4db6fff6deb8b786db5917196c8d4fda629e" + }, + { + "file": "scripts/ledger-cost-http-router.php", + "sha256": "1b659dd9fc57a9603a622d7556de8324a7e8291368a18e6fd6cb9ec0a3fe458a" + }, + { + "file": "scripts/ledger-cost-demo.mjs", + "sha256": "59e86f3d067c8002c5ddd9729fbb8c02bfb2bdcc3bef39b5caf1df19fd7c1afc" + }, + { + "file": "scripts/ledger-cost-correction-cases.php", + "sha256": "78aef54f74e5fa222ed619c452235937888c3c5912298ca00a20c81972fb635f" + }, + { + "file": "scripts/ledger-cost-correction-coexistence.php", + "sha256": "9e42a010ba5050e0c06e82c0d516e932f35f79e56710a86474a53b8cdd5ac6ef" + }, + { + "file": "scripts/ledger-cost-correction-demo-check.mjs", + "sha256": "9413c2906b4a7dfee51de607e2b087455b3fa98415fa6a150b94d606f10b832c" + }, + { + "file": "scripts/ledger-cost-correction-http.mjs", + "sha256": "4a73c046a7b24f916d3e127cd7ee371e9b030b5d6d590867fec878007dcb7d0c" + }, + { + "file": "scripts/ledger-cost-correction-proof.php", + "sha256": "ae44772b2e7221b8dce332bd7dc226d74cf95b0c97fcb10e05242279ad6c7e22" + }, + { + "file": "scripts/ledger-cost-correction-race.php", + "sha256": "73e0767b16bb2da23d9333e544e9e7c6b8d31fc4b538238a7e3647237a3c2626" + }, + { + "file": "scripts/ledger-cost-correction-security.php", + "sha256": "3fed38fe6ae8d721476f90cb235df8afbb9f4ed482fd8f8a9961da268600067e" + }, + { + "file": "scripts/archive-ledger-cost-correction-scope.mjs", + "sha256": "41db1ba54f9040aa3036dae232aa09deba9774707eaac93d38a7fc70a9b2f300" + }, + { + "file": "scripts/summarize-ledger-cost-correction.mjs", + "sha256": "1045a03e0eaaf5b97a43e87c46a518f60a79c5cb23723b7d07522600d6cb54cc" + }, + { + "file": "docs/GENERAL_LEDGER_DIRECT_COST_CORRECTION_SCOPE.md", + "sha256": "6a9dc267c063aaca738cd5cf2e82dbb017b1e21994c2e8447b3fbe3a18f553fe" + }, + { + "file": "docs/GENERAL_LEDGER_DIRECT_COST_CORRECTION_DELIVERY.md", + "sha256": "8b27281b95c5c030c2c41088469dc763b22545163c440daaaee5a8c291f986d2" + }, + { + "file": "README.md", + "sha256": "18861d53936846731aba0ecc97b388fe0c99a9a14711be4899043e98f173d0a4" + }, + { + "file": "docs/PRODUCT_DEMO.md", + "sha256": "91180f5bd37ee568c94b7776ac323a01503afe583370adf7ca17be868289ef99" + }, + { + "file": "docs/SGF_MODULE_FLOW_PREPARATION.md", + "sha256": "8965dabf3c8f691002233d71006aa679ae704a23364b14e233d7b540dd92947f" + } + ], + "quality": { + "syntax": { + "php_files": 26, + "javascript_files": 6 + }, + "git_diff_check_both": true, + "sgf_phpstan_pint": "not_installed_not_run", + "native_application_code_unchanged_prior_static_quality_not_repeated": true, + "new_dependencies": false + }, + "result": { + "original_minor": 27500, + "replacement_minor": 29500, + "delta_minor": 2000, + "journals": 3, + "lines": 6, + "gross_each_side_minor": 84500, + "current_cost_minor": 29500, + "atomic_group": true, + "isolated_parts_public_and_sql_refused": true, + "same_and_other_key_single_result": true + }, + "rights": { + "distinct_ledger_rights": 10, + "ledger_grants_per_standard_new_fixture": 12, + "existing_correction_rights_only": true, + "real_or_public_grants": 0 + }, + "team_demo": { + "tag": "f3e0a05eb2ad", + "pid": 11120, + "url": "http://127.0.0.1:8055/qa/cost-demo", + "cookie": "sgf_cost_f3e0a05eb2ad", + "loopback_only": true, + "separate_team_database": true, + "old_demos_not_reset": true + }, + "preservation": { + "old8054_source_outbox_rights_exact": true, + "old8054_correction_flag_off_and_schema_absent": true, + "six_pending_records_untouched": true, + "blocked_cache_not_cleared": true, + "existing_demos_not_reset": true, + "original_journal_calculations_decisions_outbox_preserved": true, + "previous_valid_proofs_preserved": true, + "unrelated_work_preserved": true, + "destination_unchanged": true + }, + "limits": { + "visual_review_pending": true, + "actual_browser": false, + "deployment_capacity_validated": false, + "new_large_volume_benchmarks": false, + "new_indexes": false, + "all_six_modules_operational_composition": false, + "additional_implicit_revaluation_chains": false, + "closed_period_correction_or_reopening": false, + "stock_valuation_or_posting": false, + "payroll_or_industrial_cost_posting": false, + "real_tax_chart_or_financial_operations": false, + "destination_migrations_or_grants": false, + "publishing": false, + "purchasing_activation": false, + "checkpoint": false, + "acceptance_presumed": false + } +} diff --git a/docs/proofs/common-ledger-industrial-20261103.json b/docs/proofs/common-ledger-industrial-20261103.json new file mode 100644 index 0000000..4bf1fe2 --- /dev/null +++ b/docs/proofs/common-ledger-industrial-20261103.json @@ -0,0 +1,740 @@ +{ + "increment": "COMMON-LEDGER-INDUSTRIAL-SIM-v1", + "consolidated_at_utc": "2026-11-03T05:54:08.190Z", + "authorization": { + "answer": "Autorizar o ciclo industrial sintético proposto", + "approved_scope_archive_sha256": "6044a9471b741db010f6d0509aacb56609624b05e83489311f8f5340cced108d", + "matches_presented_proposal": true + }, + "functional_code": true, + "synthetic_only": true, + "status": "implemented_and_tested_with_limits", + "targeted_checks": 162, + "rendered_form_vm_checks": 9, + "concurrency_workers": 6, + "tests": { + "actual_owner_fixture": { + "passed": true, + "scope": { + "tenant_id": 1, + "company_id": 1, + "unit_id": 1 + }, + "lot_id": 1, + "result_id": 1, + "refs": { + "material": { + "id": 1, + "version": 1 + }, + "labour": { + "id": 2, + "version": 1 + }, + "pool": { + "id": 3, + "version": 1 + }, + "machine": { + "id": 4, + "version": 1 + }, + "production": { + "id": 5, + "version": 1 + }, + "material_rate": { + "id": 6, + "version": 1 + }, + "labour_rate": { + "id": 7, + "version": 1 + }, + "criterion": { + "id": 8, + "version": 1 + } + }, + "accounts": { + "QA-CUSTO-INDUSTRIAL": 9, + "QA-COMPENSACAO-INDUSTRIAL": 10 + }, + "principal_minor": 180000, + "residual_exact": "300", + "good_units": "10", + "unit_cost_exact": "180", + "initial_industrial_journals": 0, + "actual_owner_workflow": true + }, + "actual_industrial_workflow": { + "passed": true, + "journal_id": 2, + "journals": 1, + "lines": 2, + "events": 3, + "principal_minor": 180000, + "cost_per_unit": "180", + "good_units": "10", + "residual_exact": "300", + "residual_not_posted": true, + "source_outbox_rights_unchanged": true, + "same_and_other_key_single_effect": true, + "typed_filter_and_reports": true + }, + "regression": { + "passed": true, + "checks": 31, + "cases": [ + { + "name": "exact-owner-impact-and-no-automatic-residual", + "checks": 4, + "passed": true + }, + { + "name": "incomplete-result-and-current-dependencies", + "checks": 2, + "passed": true + }, + { + "name": "same-amount-new-version-stales-capture", + "checks": 3, + "passed": true + }, + { + "name": "live-permissions-person-and-config", + "checks": 5, + "passed": true + }, + { + "name": "eligible-foreign-tenant-company-unit", + "checks": 3, + "passed": true + }, + { + "name": "atomic-faults-recovery-and-no-second-recognition", + "checks": 7, + "passed": true + }, + { + "name": "direct-origin-overlap-and-perimeter-immutability", + "checks": 2, + "passed": true + }, + { + "name": "bounded-industrial-cards-and-hidden-panel", + "checks": 4, + "passed": true + } + ], + "rollback_only": true, + "source_outbox_rights_unchanged": true + }, + "extra_boundaries": { + "passed": true, + "checks": 10, + "cases": [ + { + "name": "unapproved-result-and-non-cent-total", + "checks": 3, + "passed": true + }, + { + "name": "production-not-completed-and-criterion-pending", + "checks": 2, + "passed": true + }, + { + "name": "canonical-source-cannot-be-used-by-second-lot", + "checks": 1, + "passed": true + }, + { + "name": "changed-posted-result-needs-future-correction", + "checks": 2, + "passed": true + }, + { + "name": "whole-lot-period-must-fit", + "checks": 1, + "passed": true + } + ], + "rollback_only": true, + "source_outbox_rights_unchanged": true + }, + "actual_http": { + "passed": true, + "checks": 43, + "actual_http": true, + "actual_csrf": true, + "principal_minor": 180000, + "residual_exact": "300", + "industrial_journals": 1, + "industrial_lines": 2, + "industrial_events": 3, + "read_only_repeatable_read": true, + "writer_locks": 0, + "typed_reports_and_links": true, + "visual_review": false + }, + "industrial_rendered_form": { + "passed": true, + "checks": 5, + "rendered_javascript": true, + "node_vm_only": true, + "no_business_commands": true, + "actual_browser": false + }, + "joint_workflow": { + "passed": true, + "checks": 18, + "invoice_id": 1, + "obligation_id": 1, + "receipts": [ + 2, + 3 + ], + "allocations": [ + 3, + 5 + ], + "reversal_effect_id": 6, + "invoice_journal_id": 8, + "journals": 9, + "lines": 19, + "gross_debit_minor": 510500, + "gross_credit_minor": 510500, + "client_balance_minor": 40000, + "financial_balance_minor": 40000, + "period_closed": true, + "origin_unchanged": true, + "combined_checks": 33, + "source_outbox_rights_preserved": true, + "supplier_balance_minor": 6000, + "cost_balance_minor": 29500, + "typed_source_filters_separate": true, + "joint_period_closed": true + }, + "joint_final": { + "passed": true, + "journals": 9, + "lines": 19, + "gross_debit_minor": 510500, + "gross_credit_minor": 510500, + "closures": 1, + "current_industrial_source_matches_posted_evidence": true, + "residual_exact": "300", + "residual_not_posted": true, + "closed_industrial_ui_without_commands": true, + "all_industrial_outbox_still_captured": true, + "panel_links_posted_industrial_journal": true + }, + "concurrency": { + "passed": true, + "workers": 6, + "stale": { + "waiting": { + "a": { + "chain_reaches_parent": true, + "wait_event": "transactionid" + } + }, + "read_before_release": { + "status": 200, + "amount_minor": 180000, + "journals": 0 + }, + "results": { + "a": { + "status": 409, + "message": "Resultado industrial actual completo e validado distintamente obrigatório." + } + }, + "changed_effect_id": 9 + }, + "posting": { + "waiting": { + "b": { + "chain_reaches_parent": true, + "wait_event": "transactionid" + }, + "a": { + "chain_reaches_parent": true, + "wait_event": "tuple" + } + }, + "read_before_release": null, + "results": { + "a": { + "status": 200, + "result": { + "state": "posted", + "proposal_id": 3, + "journal_id": 2, + "replayed": false + } + }, + "b": { + "status": 200, + "result": { + "state": "posted", + "proposal_id": 3, + "journal_id": 2, + "replayed": false + } + } + }, + "changed_effect_id": null + }, + "joint_closing": { + "waiting": { + "b": { + "chain_reaches_parent": true, + "wait_event": "transactionid" + }, + "a": { + "chain_reaches_parent": true, + "wait_event": "tuple" + } + }, + "read_before_release": null, + "results": { + "a": { + "status": 200, + "result": { + "state": "closed", + "closure_id": 1, + "period_version": 2, + "replayed": false + } + }, + "b": { + "status": 200, + "result": { + "state": "closed", + "closure_id": 1, + "period_version": 2, + "replayed": false + } + } + }, + "changed_effect_id": null + }, + "journals": 9, + "lines": 19, + "gross_minor": 510500, + "closures": 1, + "original_result_and_outbox_preserved": true, + "residual_exact": "300", + "reader_finished_before_release": true + }, + "concurrency_final": { + "passed": true, + "journals": 9, + "lines": 19, + "gross_debit_minor": 510500, + "gross_credit_minor": 510500, + "closures": 1, + "current_industrial_source_matches_posted_evidence": true, + "residual_exact": "300", + "residual_not_posted": true, + "closed_industrial_ui_without_commands": true, + "all_industrial_outbox_still_captured": true, + "panel_links_posted_industrial_journal": true + }, + "team_readiness": { + "passed": true, + "checks": 40, + "roles": 3, + "no_business_commands": true, + "forms_mock_checks": 4, + "actual_browser": false, + "visual_review": false, + "initial_journals": 1, + "initial_groups": 0, + "initial_customer_openings": 0, + "initial_closures": 0 + }, + "team_preservation": { + "passed": true, + "sources_outbox_rights_unchanged": true, + "initial_industrial_journals": 0, + "initial_closures": 0, + "no_reset": true + }, + "old8057_preservation": { + "passed": true, + "old8057_industrial_flag_off": true, + "new_schema_absent": true, + "existing_three_panels_unchanged": true, + "two_provider_packet_hash_unchanged": true, + "observed_gross_minor": 27500, + "source_outbox_rights_unchanged": true, + "read_only": true + } + }, + "private_evidence": [ + { + "file": "private/ledger-9784b53db6ec/industrial-fixture.json", + "sha256": "90dcfa147b52ac19a12653bc2cb375c9fe3f2a432339d54f1795f4a6d207b601" + }, + { + "file": "private/ledger-9784b53db6ec/industrial-workflow.json", + "sha256": "1fbe6bc0d1b0d3882ab8f4a5b005ad682c32cf990d0277378b8405a63c5fe2aa" + }, + { + "file": "private/ledger-1aa5762a0c16/industrial-cases.json", + "sha256": "085cca2cbc57d5302e499aa67bd6d69cb948ca3878b3456b875cc8bf280f1b3a" + }, + { + "file": "private/ledger-1aa5762a0c16/industrial-extra-cases.json", + "sha256": "27aab4c701f11bd20378f2a87e3a37b4dbaaff387eb926cbcc9beee9f5c0f3cc" + }, + { + "file": "private/ledger-1aa5762a0c16/industrial-http.json", + "sha256": "f37d0868d94d56b5074584d4a00a770a858d383faf0e984cc71c78374c7b819b" + }, + { + "file": "private/ledger-1aa5762a0c16/industrial-form-check.json", + "sha256": "c99308acb405ff5d94576018e0ee82fee2485fb68a1d1e62da0d94578be1ba48" + }, + { + "file": "private/ledger-1aa5762a0c16/composition-workflow.json", + "sha256": "cfc6e70d148f8721b1fa4e55d4d48df330c46c55edc53627c789bb4abbee1ff3" + }, + { + "file": "private/ledger-1aa5762a0c16/industrial-final.json", + "sha256": "8940edb3eedc6f70c54aa438556393423793af4b9f61224690e68f5663ba30ae" + }, + { + "file": "private/ledger-e3009c989fb2/industrial-race.json", + "sha256": "7666eb40b6c387871dfced43064df668beec6ae1854d2b8f041c864f80ac41a0" + }, + { + "file": "private/ledger-e3009c989fb2/industrial-final.json", + "sha256": "8940edb3eedc6f70c54aa438556393423793af4b9f61224690e68f5663ba30ae" + }, + { + "file": "private/ledger-072ef8124ab4/industrial-demo-http.json", + "sha256": "29b989bf0747cb53560205cbb15055ce6cc682fae333dd4eb4be46b5cd6cd1a7" + }, + { + "file": "private/ledger-072ef8124ab4/industrial-demo-preservation.json", + "sha256": "12c0c4d5a95617b87ebd03dcf3ce931d1421a638b5d889c575af5d1bbbbb18cb" + }, + { + "file": "private/ledger-fe42e1169ce6/composition-industrial-compatibility.json", + "sha256": "5901b4685318d6416e6b00b192f860be277b4f0bbedd89b4ffa366f8ea258e35" + }, + { + "file": "private/ledger-industrial-approved-scope.md", + "sha256": "6044a9471b741db010f6d0509aacb56609624b05e83489311f8f5340cced108d" + } + ], + "reused_manifests": [ + { + "file": "docs/proofs/common-ledger-composition-20261103.json", + "sha256": "d64957d14dd6140b66fbb8569997ed941dab954046b56c38939202a2e63653a0", + "private_artifacts_reused": true + }, + { + "file": "docs/proofs/common-ledger-direct-cost-correction-20261103.json", + "sha256": "2111a30006d24f4325c6f4292e9ffb567adf28950ffbfa76fbb9e8143a2fedb7", + "private_artifacts_reused": true + }, + { + "file": "docs/proofs/common-ledger-direct-cost-20261103.json", + "sha256": "5354ac34eb27dd9c05564d8eb9694a90c3e8eceaf018e2873aa299aa54b6cf6e", + "private_artifacts_reused": true + }, + { + "file": "docs/proofs/common-ledger-sales-receivable-20261103.json", + "sha256": "b5572466111fb85d89a604fbaa423976ed17c61afc5e2e45ba392fb23aa82e8c", + "private_artifacts_reused": true + }, + { + "file": "docs/proofs/common-ledger-reports-20261103.json", + "sha256": "83b81a3401e4cfe8ea4c9d13339385f9241d0eefee5495da3e767812f0c863f1", + "private_artifacts_reused": true + }, + { + "file": "docs/proofs/common-ledger-complete-cycle-20261102.json", + "sha256": "23657d594b84e6aeeb0d16d45790d54feca04b12e2260cfffa4f8e4a37eaa0ce", + "private_artifacts_reused": true + }, + { + "file": "docs/proofs/common-finance-bundle-20261103.json", + "sha256": "086c1556e7cefcf64a7064995a4aa6bd0e3aa9dd62cba66285b7801715f9f22c", + "private_artifacts_reused": true + } + ], + "previous_private_artifacts_verified": 89, + "frozen_bundles": [ + { + "files": 25, + "manifest_sha256": "6a507ea7d708a12a8e526e4c610696d8db84079d18aede470237b65505630e7e", + "all_bytes_preserved": true + }, + { + "files": 30, + "manifest_sha256": "cbc4ddbea15f5e396c92bc2e664b973138551928980f334bcf3eb0cf097cacb1", + "all_bytes_preserved": true + } + ], + "quality": { + "syntax": { + "php": 26, + "js": 7 + }, + "diff_check_both_repositories": true, + "unrelated_business_suites_not_repeated": true + }, + "source_files": [ + { + "file": "AGENTS.md", + "sha256": "7585c74ee1d3a1631cfe55d7aebf87b7e8aebda5721efd4085e8d26febc3666a" + }, + { + "file": "config/industrial_ledger.php", + "sha256": "29613a0128f8b22db2f30fb7b498ea0ad5cae24633768552aca90e8ba589b976" + }, + { + "file": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45" + }, + { + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "7e72f7ed48dede5e8b719e906dc0ea104e1b19846f4b288632f65e4980c4662d" + }, + { + "file": "app/Modules/Accounting/IndustrialLedgerController.php", + "sha256": "ff3645bfb89e78211f4eead60eb65de32ea5f128136b652e4a24fcdf38529972" + }, + { + "file": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "39cceb9ec129dc36ae272e5da07538a6e2d7be9bd536e48d4eed3c13a22045ad" + }, + { + "file": "app/Modules/Accounting/GeneralLedgerController.php", + "sha256": "25db29ca326a0e5d6f5ae74d0e127e55fdfb60abf152b82243c7eec83292e246" + }, + { + "file": "app/Modules/Accounting/CostLedgerSource.php", + "sha256": "4514a392e4900219826da3ffd62f26236a1dfcb5708f0d5f1ff3ab91cbbc6bc8" + }, + { + "file": "app/Modules/Accounting/LedgerComposition.php", + "sha256": "0b9f8edafef7c7417b5a3f76ae68ecb693f6884934aa8ade43a0051967c3b1a9" + }, + { + "file": "app/Modules/Accounting/LedgerCompositionController.php", + "sha256": "a84834c4471075642a642ad4bed669ba0a439c1a771e17db026113813c61debd" + }, + { + "file": "app/Shared/Testing/TestingDatabaseGuard.php", + "sha256": "475cd00bc67bf4e6ed9928170b1c19ff9be8d56b6ab56af783a654a789d7f9fb" + }, + { + "file": "packages/general-ledger/bootstrap.php", + "sha256": "4f1353a70e3fe3345cf6816e5d729c5c2d06a07546c958258c75deee0e6d9687" + }, + { + "file": "packages/general-ledger/README.md", + "sha256": "78ce127a398fc05d796b41b0c6de3c4748be3fd8c51f0c7539ffed60f6803a1a" + }, + { + "file": "packages/general-ledger/src/IndustrialSchema.php", + "sha256": "7ba834cea96e91c5a3d063fe99d4805a823a86e6cac371b3e12b6e46de39873a" + }, + { + "file": "packages/general-ledger/src/PayableJournal.php", + "sha256": "c7bd6de3ad850dbfe655c06a3f1f2d27507460260b7faa658fce4231756e9ffc" + }, + { + "file": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "615e993a66794ab54012c4f6b02106ce1309d31d4066437714275f064d0a68a3" + }, + { + "file": "packages/general-ledger/src/LedgerReports.php", + "sha256": "13ba42d65494bdd65c3e534de6483b691f79231771cf6234748d400caa550968" + }, + { + "file": "packages/general-ledger/ui/reports.php", + "sha256": "519ea65b609c3b716dc08e50b2048518963b7991f625e61d190228a90c98ee88" + }, + { + "file": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "d705d844582005cce3c777057075b38f8f97885b898463162163cd0d5300f90a" + }, + { + "file": "resources/views/accounting/industrial-ledger-demo-entry.blade.php", + "sha256": "07475b98c5017e87c09ebd05f02415463e7c8980248aaa997345ab519e89800c" + }, + { + "file": "resources/views/accounting/general-ledger.blade.php", + "sha256": "758de16171114eff0b1bf5197d5db11d62e99af49ae8198f61efa5233c10fd09" + }, + { + "file": "resources/views/accounting/ledger-composition.blade.php", + "sha256": "7cd8ac7cfab684fc73e35752d3b157a3020365628262a7918d40ebce1ea365a0" + }, + { + "file": "routes/web.php", + "sha256": "426d7356c4d62278a637495fa8e908f64ad24131e347d0339e95d133f66ead7d" + }, + { + "file": "scripts/payable-history-sgf-proof.php", + "sha256": "16f564772fe5c0860734fcbf6368d915f2bb9af2bd9f2764f836325d426ccbe3" + }, + { + "file": "scripts/ledger-cost-proof.php", + "sha256": "73950d99939e5edf38556df73912d3807dc4ae3c2e9f7bab82d7464c6552bdbf" + }, + { + "file": "scripts/ledger-cost-http-entry.php", + "sha256": "c89ee42790efacb0220fe4e7e30c46e43fd731b0d2f249aa06bca7b8a99c2bf1" + }, + { + "file": "scripts/ledger-cost-demo.mjs", + "sha256": "59e86f3d067c8002c5ddd9729fbb8c02bfb2bdcc3bef39b5caf1df19fd7c1afc" + }, + { + "file": "scripts/ledger-run.mjs", + "sha256": "30897a856e1804051e65cfd145f3ff15e027123c4d8ac8713da85e0bc2944f1c" + }, + { + "file": "scripts/ledger-composition-proof.php", + "sha256": "dd32c47b8be2c45cc484704e25d105ef6467f81dda1882e085f42d99bea296da" + }, + { + "file": "scripts/ledger-composition-workflow.php", + "sha256": "2c376a5c4576ef67ca5d0bad1e1754e7c95211d6d75ee4d551f93a299e819825" + }, + { + "file": "scripts/ledger-industrial-cases.php", + "sha256": "b99f31a6c26093188fe71741f808a2b8151f578906ef77b9656fae4a0b8bb4db" + }, + { + "file": "scripts/ledger-industrial-demo-check.mjs", + "sha256": "c979354087d2349bae08d43ecfadc590ee4bb98217811198507a69fdda971424" + }, + { + "file": "scripts/ledger-industrial-extra-cases.php", + "sha256": "67706870888077f6d0cbe9e8fb10cf696e90bb17309480d5e626ce9fba708778" + }, + { + "file": "scripts/ledger-industrial-form-check.mjs", + "sha256": "fab3e40dad965bbc7206f4f3c05a4aaca75b3ef417d224ec4d0ef255012942e7" + }, + { + "file": "scripts/ledger-industrial-http.mjs", + "sha256": "1811c65444c111f9e6556b80acb249115ee2857e2c2151803e88f1e33b9d4763" + }, + { + "file": "scripts/ledger-industrial-proof.php", + "sha256": "5dcbfb55957a0eb7288e93037b19466a60d755b04ccafa7950c41029dad4f366" + }, + { + "file": "scripts/ledger-industrial-race.php", + "sha256": "255311ae488da28ec2f7cca4429e34739adb2aa4100af46c51df60a7f61a63d1" + }, + { + "file": "scripts/summarize-ledger-industrial.mjs", + "sha256": "1f29b5e5ffdd1f24f566b2f5b941c339626815117c75f9a16bb888feadd2a1a0" + }, + { + "file": "scripts/inspect-module-flow-plan.mjs", + "sha256": "f1b52208694e90dd6d5ed83792e97ee6f8772dddea8baefd29158b92b1f2bb59" + }, + { + "file": "docs/integration/sgf-flow-plan.json", + "sha256": "49c5c87cc1f7cbf63dadabdc81d92a8a04a98615d0c86d2acb6d097923c4c615" + }, + { + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_SCOPE.md", + "sha256": "1f32ff86851f04181111d3ec0deaaa51f7582873bfcb469c9a055f3c04eefb4e" + }, + { + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "a8655379552022c561f25b519e1ba30841afac350aa66b585c237d36b78aa2be" + }, + { + "file": "docs/GENERAL_LEDGER_COMPOSITION_DELIVERY.md", + "sha256": "07c6d002bc2ae1eb6d0926ee4d0b35cb6f0e5d2a65b8e6256aa5ca3b72caf11a" + }, + { + "file": "README.md", + "sha256": "1d0ed8cc7fd6fbdfd96af17da450151343e8eb0b020751b80bc9d5c0f4327938" + }, + { + "file": "docs/PRODUCT_DEMO.md", + "sha256": "2d8d14a2b709869ed04a75f4201f7eee3ef7fe2f177ca340f71ff806ba7907a6" + }, + { + "file": "docs/SGF_MODULE_FLOW_PREPARATION.md", + "sha256": "ec95aa485e47c8c4efd0e492128c8b0c969908f76cf491597876a39c330e3a46" + } + ], + "static_flow_inventory": { + "file": "docs/proofs/module-flow-industrial-update-20261103.json", + "sha256": "4d660a11058dda4db8c841cdfd05d3993eb550ef7e3d2b6d33c550d4bc47fbfa", + "modules": 6, + "stages": 13, + "sources": 32, + "mandatory_cycles": 0, + "database_connections": 0, + "operational_validation": false + }, + "team_demo": { + "tag": "072ef8124ab4", + "pid": 25536, + "url": "http://127.0.0.1:8058/qa/cost-demo", + "cookie": "sgf_cost_072ef8124ab4", + "loopback_only": true, + "separate_team_database": true, + "old_demos_not_reset": true + }, + "observed_result": { + "industrial_journals": 1, + "industrial_lines": 2, + "industrial_minor": 180000, + "units": "10", + "unit_cost_exact": "180", + "unposted_residual_exact": "300", + "joint_journals": 9, + "joint_lines": 19, + "joint_debit_minor": 510500, + "joint_credit_minor": 510500, + "client_balance_minor": 40000, + "direct_cost_balance_minor": 29500, + "supplier_balance_minor": 6000, + "joint_closures": 1 + }, + "preservation": { + "old8057_source_outbox_rights_match_original_baseline": true, + "old_composition_provider_packet_unchanged": true, + "six_pending_records_untouched": true, + "blocked_cache_untouched": true, + "old_demos_not_reset": true, + "destination_unchanged": true, + "private_credentials_not_versioned": true, + "unrelated_work_preserved": true + }, + "limits": { + "visual_review_pending": true, + "actual_browser": false, + "large_volume_measurements": false, + "deployment_capacity_validated": false, + "all_six_modules_operationally_complete": false, + "industrial_correction": false, + "period_reopening": false, + "stock_valuation_or_payroll": false, + "real_financial_operations": false, + "destination_migrations_or_grants": false, + "purchasing_activation": false, + "publication": false, + "checkpoint": false, + "acceptance_presumed": false + } +} diff --git a/docs/proofs/common-ledger-industrial-correction-20261103.json b/docs/proofs/common-ledger-industrial-correction-20261103.json new file mode 100644 index 0000000..c5475d6 --- /dev/null +++ b/docs/proofs/common-ledger-industrial-correction-20261103.json @@ -0,0 +1,710 @@ +{ + "increment": "COMMON-LEDGER-INDUSTRIAL-CORRECTION-SIM-v1", + "consolidated_at_utc": "2026-11-03T06:46:32.380Z", + "authorization": { + "answer": "Autorizar a correcção industrial sintética proposta", + "approved_scope_archive_sha256": "7d41a413c1d1e5b8436b72edb0600852841dfd29ae2ba995b2a691bd7562cd1a", + "matches_presented_proposal": true + }, + "functional_code": true, + "synthetic_only": true, + "status": "implemented_and_tested_with_limits", + "targeted_checks": 155, + "form_vm_checks": 5, + "concurrency_workers": 6, + "tests": { + "actual_owner_setup": { + "passed": true, + "original_journal_id": 2, + "original_journal_sha256": "0189bb33a87d912ae3f83e21a393cf53e96e4b448ea5747fdfc627533b024144", + "original_result_sha256": "70ccb629f4c3b025394e9cc2e101182f614087f3430e3e767aec6ee1cac1b7cb", + "replacement_rate_id": 9, + "replacement_result_id": 2, + "replacement_refs": { + "material": { + "id": 1, + "version": 1 + }, + "labour": { + "id": 2, + "version": 1 + }, + "pool": { + "id": 3, + "version": 1 + }, + "machine": { + "id": 4, + "version": 1 + }, + "production": { + "id": 5, + "version": 1 + }, + "material_rate": { + "id": 9, + "version": 2 + }, + "labour_rate": { + "id": 7, + "version": 1 + }, + "criterion": { + "id": 8, + "version": 1 + } + }, + "original_minor": 180000, + "replacement_minor": 182000, + "residual_exact": "300", + "source_fingerprint": "f62ebfc903c20b2bb55357b4f83edae1db4a481c762930d0b4f044f60869527b", + "initial_industrial_correction_groups": 0 + }, + "actual_industrial_pair": { + "passed": true, + "industrial_journals": 3, + "industrial_lines": 6, + "industrial_events": 9, + "gross_minor": 542000, + "industrial_balance_minor": 182000, + "source_original_outbox_rights_exact": true, + "same_and_other_key_no_duplicate": true + }, + "regression": { + "passed": true, + "cases": [ + { + "name": "explicit-asymmetric-impact-and-indivisible-application", + "checks": 7, + "passed": true + }, + { + "name": "faults-at-pair-boundaries-rollback-and-recovery", + "checks": 7, + "passed": true + }, + { + "name": "database-rejects-orphan-cost-reversal", + "checks": 1, + "passed": true + }, + { + "name": "changed-source-version-requires-new-conference", + "checks": 4, + "passed": true + }, + { + "name": "rights-person-and-replay-authority", + "checks": 2, + "passed": true + }, + { + "name": "readers-foreign-original-disabled-capability-and-closed-period", + "checks": 5, + "passed": true + }, + { + "name": "new-change-after-correction-blocks-owner-conference-no-chain", + "checks": 4, + "passed": true + } + ], + "checks": 31, + "rollback_only": true, + "source_originals_outbox_rights_unchanged": true, + "asymmetric_pair_and_orphan_sql_enforced": true + }, + "security": { + "passed": true, + "checks": 7, + "eligible_foreign_tenant_company_unit_refused": true, + "rollback_only": true, + "source_outbox_rights_unchanged": true, + "capture_rights_revalidated": [ + "industrial_costs.view", + "general_ledger.view", + "general_ledger.correct_prepare" + ], + "post_right_revocation_covered_in_main_regression": true + }, + "fully_eligible_foreign_contexts": { + "passed": true, + "checks": 4, + "foreign_tenant_company_unit_fully_eligible": true, + "foreign_accounting_person_and_rights_present": true, + "original_journal_refused_by_scope": true, + "rollback_only": true, + "source_outbox_rights_exact": true + }, + "actual_http": { + "passed": true, + "checks": 51, + "actual_http": true, + "csrf_and_context": true, + "indivisible_four_line_impact": true, + "isolated_public_parts_refused": true, + "original_minor": 180000, + "replacement_minor": 182000, + "delta_minor": 2000, + "journals": 3, + "lines": 6, + "applied_groups": 1, + "industrial_gross_minor": 542000, + "company_gross_minor": 569500, + "balance_minor": 182000, + "source_snapshot_unchanged": true, + "joint_close_requires_other_sources": true, + "read_only_workspace": true, + "writer_locks": 0, + "visual_review": false + }, + "three_pair_domains": { + "passed": true, + "checks": 6, + "three_pair_domains_sql_validated": true, + "same_numeric_source_ids_separate": true, + "rollback_only": true, + "source_outbox_rights_unchanged": true + }, + "joint_workflow": { + "passed": true, + "checks": 18, + "invoice_id": 1, + "obligation_id": 1, + "receipts": [ + 2, + 3 + ], + "allocations": [ + 3, + 5 + ], + "reversal_effect_id": 6, + "invoice_journal_id": 10, + "journals": 11, + "lines": 23, + "gross_debit_minor": 872500, + "gross_credit_minor": 872500, + "client_balance_minor": 40000, + "financial_balance_minor": 40000, + "period_closed": true, + "origin_unchanged": true, + "combined_checks": 33, + "source_outbox_rights_preserved": true, + "supplier_balance_minor": 6000, + "cost_balance_minor": 29500, + "typed_source_filters_separate": true, + "joint_period_closed": true + }, + "joint_final": { + "passed": true, + "journals": 11, + "lines": 23, + "gross_minor": 872500, + "industrial_closing_minor": 182000, + "residual_exact": "300", + "joint_closures": 1, + "typed_industrial_groups": 1, + "closed_ui_no_commands": true, + "current_source_resolved": true + }, + "concurrency": { + "passed": true, + "workers": 6, + "stale_group": { + "waiting": { + "a": { + "chain_reaches_parent": true, + "wait_event": "transactionid" + } + }, + "read_before_release": { + "status": 200, + "amount_minor": 182000, + "journals": 1, + "results": 0 + }, + "results": { + "a": { + "status": 409, + "message": "Fonte, regra ou período mudaram; prepare nova conferência." + } + }, + "changed_effect_id": 3 + }, + "fresh_pair": { + "waiting": { + "b": { + "chain_reaches_parent": true, + "wait_event": "transactionid" + }, + "a": { + "chain_reaches_parent": true, + "wait_event": "tuple" + } + }, + "read_before_release": null, + "results": { + "a": { + "status": 200, + "result": { + "state": "corrected", + "correction_id": 2, + "result_id": 1, + "reverse_journal_id": 3, + "replacement_journal_id": 4, + "replayed": false + } + }, + "b": { + "status": 200, + "result": { + "state": "corrected", + "correction_id": 2, + "result_id": 1, + "reverse_journal_id": 3, + "replacement_journal_id": 4, + "replayed": false + } + } + }, + "changed_effect_id": null + }, + "joint_close": { + "waiting": { + "b": { + "chain_reaches_parent": true, + "wait_event": "transactionid" + }, + "a": { + "chain_reaches_parent": true, + "wait_event": "tuple" + } + }, + "read_before_release": null, + "results": { + "a": { + "status": 200, + "result": { + "state": "closed", + "closure_id": 1, + "period_version": 2, + "replayed": false + } + }, + "b": { + "status": 200, + "result": { + "state": "closed", + "closure_id": 1, + "period_version": 2, + "replayed": false + } + } + }, + "changed_effect_id": null + }, + "reader_finished_before_release": true, + "industrial_groups_prepared": 2, + "industrial_groups_applied": 1, + "journals": 11, + "lines": 23, + "gross_minor": 872500, + "industrial_balance_minor": 182000, + "closures": 1, + "original_journal_both_results_and_original_outbox_exact": true, + "current_result_version": 3, + "residual_exact": "300" + }, + "concurrency_final": { + "passed": true, + "journals": 11, + "lines": 23, + "gross_minor": 872500, + "industrial_closing_minor": 182000, + "residual_exact": "300", + "joint_closures": 1, + "typed_industrial_groups": 1, + "closed_ui_no_commands": true, + "current_source_resolved": true + }, + "team_http_forms": { + "passed": true, + "checks": 23, + "three_accounting_roles": true, + "original_minor": 180000, + "actual_successor_minor": 182000, + "initial_groups": 0, + "initial_closures": 0, + "no_business_commands": true, + "rendered_forms_mock_checks": 5, + "actual_browser": false, + "visual_review": false, + "private_existing_build": true, + "initial_industrial_journals": 1, + "initial_company_journals": 2 + }, + "team_before": { + "passed": true, + "initial_journals": 2, + "initial_industrial_groups": 0, + "initial_closures": 0, + "source_original_outbox_rights_exact": true + }, + "team_after": { + "passed": true, + "initial_journals": 2, + "initial_industrial_groups": 0, + "initial_closures": 0, + "source_original_outbox_rights_exact": true + }, + "old8058_preservation": { + "passed": true, + "old8058_source_outbox_rights_exact": true, + "correction_default_off": true, + "correction_schema_absent": true, + "uncomposed_correction_refused403": true, + "three_provider_packet_unchanged": true, + "old_initial_journal_count": 1, + "read_only": true + } + }, + "private_evidence": [ + { + "file": "private/ledger-a3c69acf5a50/industrial-correction-fixture.json", + "sha256": "2495090d91cc2b43422d0f7ecb8f528a1e90baec89fc88b5574cc124b1c38f7f" + }, + { + "file": "private/ledger-a3c69acf5a50/industrial-correction-workflow.json", + "sha256": "fa421b294d82eaea37e6008fd1e6f2a0a2ec8a61217dcfca2d39ce9d3ac100fb" + }, + { + "file": "private/ledger-a3c69acf5a50/industrial-correction-cases.json", + "sha256": "15879e78004bd4c70f03eeee12cf8fbed7982f1dc5a22f15c2342cc959854ec2" + }, + { + "file": "private/ledger-a3c69acf5a50/industrial-correction-security.json", + "sha256": "bbc6b18061c8cecf41c4547c9b5b3493364b596be7d5ed130669d3bbb934fcf9" + }, + { + "file": "private/ledger-d55f5fc71dcb/industrial-correction-deep-scope.json", + "sha256": "193ed3f907bf7dceaf679ea21c2c066b172bf12f1590ee71ce72c29d6e997868" + }, + { + "file": "private/ledger-d55f5fc71dcb/industrial-correction-http.json", + "sha256": "23c391e548c6c8148ceca929654de225cb94f2165977aa2c33fb442743ec36cd" + }, + { + "file": "private/ledger-d55f5fc71dcb/industrial-correction-coexistence.json", + "sha256": "60cc3e27dbeff03e192fde41a87c9b8f74859d5a1fa06b759f0690680fab31b4" + }, + { + "file": "private/ledger-d55f5fc71dcb/composition-workflow.json", + "sha256": "83c8b094d063fec8d28f7af2b5390413d343e4f15cf2b52f575a13af0109fdac" + }, + { + "file": "private/ledger-d55f5fc71dcb/industrial-correction-final.json", + "sha256": "b819ccd09e66cf057d80030b4b75461548f1e20773e40fc2c12c6ee161dd2f13" + }, + { + "file": "private/ledger-5b49607829f9/industrial-correction-race.json", + "sha256": "8bd5ab40773a772d7a8e8563b788fb1131088a2ea140c63811b09e561cff52e2" + }, + { + "file": "private/ledger-5b49607829f9/industrial-correction-final.json", + "sha256": "b819ccd09e66cf057d80030b4b75461548f1e20773e40fc2c12c6ee161dd2f13" + }, + { + "file": "private/ledger-61b694d72ae4/industrial-correction-demo-http.json", + "sha256": "2d0ca9279bd6dc7715173d544afaf405eda7477bfb1ca8e4fbac80a5918b3e6a" + }, + { + "file": "private/ledger-61b694d72ae4/industrial-correction-demo-preservation.json", + "sha256": "3c531f7dbeb1363c13f5c7eaaf396806fe72462ab3cdd606706d6bd6c333bb6b" + }, + { + "file": "private/ledger-61b694d72ae4/industrial-correction-demo-post.json", + "sha256": "3c531f7dbeb1363c13f5c7eaaf396806fe72462ab3cdd606706d6bd6c333bb6b" + }, + { + "file": "private/ledger-072ef8124ab4/industrial-demo-after-correction.json", + "sha256": "e98b61f5d7eaf0cd684962b7a821717f8b72c6fafa8e1a60c6b667b2fccfe5bc" + }, + { + "file": "private/ledger-industrial-correction-approved-scope.md", + "sha256": "7d41a413c1d1e5b8436b72edb0600852841dfd29ae2ba995b2a691bd7562cd1a" + } + ], + "metadata_notes": [ + "The inherited four_live_rights_revalidated label was replaced with the exact three capture rights in the public view; correct_post revocation is tested in the main regression. Original private evidence is unmodified.", + "Team initial_industrial_journals is1; the initial company book contains2 journals." + ], + "previous_manifests": [ + { + "file": "docs/proofs/sgf-payable-report-capture-20261103.json", + "sha256": "155c60a14406b3ae3a5df862806a2ea2d9144b67871aaff7e75f9713701d649c", + "private_artifacts_preserved": true + }, + { + "file": "docs/proofs/common-ledger-industrial-20261103.json", + "sha256": "1f26b2c11d565a65456f3fb5f3b11c9e0ac0726649ccef1485464e46ba753e18", + "private_artifacts_preserved": true + }, + { + "file": "docs/proofs/common-ledger-composition-20261103.json", + "sha256": "d64957d14dd6140b66fbb8569997ed941dab954046b56c38939202a2e63653a0", + "private_artifacts_preserved": true + }, + { + "file": "docs/proofs/common-ledger-direct-cost-correction-20261103.json", + "sha256": "2111a30006d24f4325c6f4292e9ffb567adf28950ffbfa76fbb9e8143a2fedb7", + "private_artifacts_preserved": true + }, + { + "file": "docs/proofs/common-ledger-direct-cost-20261103.json", + "sha256": "5354ac34eb27dd9c05564d8eb9694a90c3e8eceaf018e2873aa299aa54b6cf6e", + "private_artifacts_preserved": true + }, + { + "file": "docs/proofs/common-ledger-sales-receivable-20261103.json", + "sha256": "b5572466111fb85d89a604fbaa423976ed17c61afc5e2e45ba392fb23aa82e8c", + "private_artifacts_preserved": true + }, + { + "file": "docs/proofs/common-ledger-complete-cycle-20261102.json", + "sha256": "23657d594b84e6aeeb0d16d45790d54feca04b12e2260cfffa4f8e4a37eaa0ce", + "private_artifacts_preserved": true + } + ], + "previous_private_artifacts_verified": 94, + "frozen_bundles": [ + { + "files": 25, + "manifest_sha256": "6a507ea7d708a12a8e526e4c610696d8db84079d18aede470237b65505630e7e", + "all_bytes_preserved": true + }, + { + "files": 30, + "manifest_sha256": "cbc4ddbea15f5e396c92bc2e664b973138551928980f334bcf3eb0cf097cacb1", + "all_bytes_preserved": true + } + ], + "quality": { + "syntax": { + "php": 19, + "js": 4 + }, + "diff_check_both_repositories": true, + "unrelated_suites_not_repeated": true + }, + "source_files": [ + { + "file": "AGENTS.md", + "sha256": "196232e45098535f084fe1df62887f700a7ff5d3416536523b9e69b4bd133457" + }, + { + "file": "config/industrial_ledger.php", + "sha256": "f6ccfe29a6bfce1fbf636de3ed1f245644547a3c196fe7a54e7e76c4693b40fa" + }, + { + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + }, + { + "file": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "file": "packages/general-ledger/bootstrap.php", + "sha256": "f8f94212a0cbc926aa510459a1bbd3a022d149a7a0f185cf56644c2f5a2c6bb7" + }, + { + "file": "packages/general-ledger/README.md", + "sha256": "1a016bbc92fef19263dc823eb4713b28d1126d4c9ebb820f33121776cf266229" + }, + { + "file": "packages/general-ledger/src/IndustrialCorrectionSchema.php", + "sha256": "3d657773582fe5afc4948d60c60f5b70f79b274a619778df97d62ead6013186f" + }, + { + "file": "packages/general-ledger/src/PayableJournal.php", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "file": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "file": "packages/general-ledger/ui/cycle.php", + "sha256": "26eaee6a187e41aedac23d101e26fe8707937cd59fc70042a2332a2f13f3f1be" + }, + { + "file": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "file": "resources/views/accounting/industrial-correction.blade.php", + "sha256": "5d2a3c72714f55c4378ec7ae4ccfb4738b3b7db32eb5bb882f5de47d2793eb65" + }, + { + "file": "resources/views/accounting/industrial-correction-demo-entry.blade.php", + "sha256": "d6d0db6bce610fd8347db4eb629842e36879bc36448e3023497e71ba99188c09" + }, + { + "file": "resources/views/accounting/general-ledger.blade.php", + "sha256": "ca0608bd9c9cce03a37674795848516ef546f76f38bd7b7e00932cba5f2f4e81" + }, + { + "file": "resources/views/accounting/cost-ledger.blade.php", + "sha256": "9a5f58b97767e96eb8e998870cac5fded74c9ad5dfd812c6323b934f2aeb1ff4" + }, + { + "file": "scripts/payable-history-sgf-proof.php", + "sha256": "05fb3240f513fa1b91249caf0ddeeb25304186b98cb3bdfe6e339e38126fb54e" + }, + { + "file": "scripts/ledger-cost-proof.php", + "sha256": "c3df28409571229e8d63a1d7314d15eaf0ef7e70dd75b496b071b9028b8825a7" + }, + { + "file": "scripts/ledger-industrial-proof.php", + "sha256": "fc3d380840a5896f50d391ddf9320bcdbb9334cda17bf0c094cf3a3ce80c61e7" + }, + { + "file": "scripts/ledger-cost-http-entry.php", + "sha256": "9966c9b3a24075e6adaa65584874e62b03aed7a4cc1a3d3c57fadbd39ea81ea0" + }, + { + "file": "scripts/ledger-composition-workflow.php", + "sha256": "fb37d6fb30f98e90441743195a45818f7837f5ca68e4f16be6650597675e802e" + }, + { + "file": "scripts/ledger-run.mjs", + "sha256": "80fe57cd803ceaf774420dbb5064a28ea5e53c8b56ba79fbddef337dd89bd52a" + }, + { + "file": "scripts/ledger-industrial-correction-cases.php", + "sha256": "08b429f70624bf46975871bc317d8765e7fba62ea30a772cec97e80086b88b81" + }, + { + "file": "scripts/ledger-industrial-correction-coexistence.php", + "sha256": "6daf4625ce1fd496e65812be35a36211dd44409049950e131ee036a4df6b29b5" + }, + { + "file": "scripts/ledger-industrial-correction-deep-scope.php", + "sha256": "de7c7d1efe508b4da7ad20d4fb1b26095813283538006d25c1b730aebca712d8" + }, + { + "file": "scripts/ledger-industrial-correction-demo-check.mjs", + "sha256": "5cc0f396caf47b765b3d7c70a8fe862d3719f3b7487f6bccbbc93c279428df12" + }, + { + "file": "scripts/ledger-industrial-correction-http.mjs", + "sha256": "6d34883f38850a04862f084bf7c372fca0e76db9fd7bc58bcad7842753a62554" + }, + { + "file": "scripts/ledger-industrial-correction-proof.php", + "sha256": "80c613be879566fe0947def881bab16c8d335f310071dc30f3cdc6118b538bd5" + }, + { + "file": "scripts/ledger-industrial-correction-race.php", + "sha256": "03f61ea28ea36861f0c416e306fbf23e4758e0960bf05f33005caf96b49b3029" + }, + { + "file": "scripts/ledger-industrial-correction-security.php", + "sha256": "59d78838d992e1fc13586069945fe3cebc7c14c3286f0c602403c40bbf49379b" + }, + { + "file": "scripts/summarize-ledger-industrial-correction.mjs", + "sha256": "5b437bafc553ae4d21aa1299a40a86365973a42d2257794f5624c6a8044a9004" + }, + { + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_SCOPE.md", + "sha256": "163d63bfeb7b76f6177c88b4c83cc3149559abfd2f491397ce5c1a861a4d6036" + }, + { + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + }, + { + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + }, + { + "file": "README.md", + "sha256": "bacd393b9a4b98b1f57a52ab7ffff6a64b9e1f22818e38cceb2bd2a62f9f73b5" + }, + { + "file": "docs/PRODUCT_DEMO.md", + "sha256": "ff5a7b474cc76fa0983b8054d161d41603dfa007a693f16f620cb44c411bdbed" + }, + { + "file": "docs/SGF_MODULE_FLOW_PREPARATION.md", + "sha256": "94b277ed53dfa04543ce05b99191e1c76e94c0fc0b75990b059dc7f24353baaa" + }, + { + "file": "docs/integration/sgf-flow-plan.json", + "sha256": "6f8270c0376b207bf592a405d6223f4b690d98b6b083194355df93cf256895f3" + } + ], + "static_inventory": { + "file": "docs/proofs/module-flow-industrial-correction-update-20261103.json", + "sha256": "844eade754f98275e8a02bf0a62106530c422697a35dfa206b3493e354e562a5", + "modules": 6, + "stages": 13, + "sources": 33, + "mandatory_cycles": 0, + "database_connections": 0, + "operational_validation": false + }, + "team_demo": { + "tag": "61b694d72ae4", + "pid": 26780, + "url": "http://127.0.0.1:8059/qa/cost-demo", + "cookie": "sgf_cost_61b694d72ae4", + "loopback_only": true, + "separate_team_database": true, + "old_demos_not_reset": true + }, + "observed_result": { + "industrial_journals": 3, + "industrial_lines": 6, + "industrial_gross_minor": 542000, + "industrial_closing_minor": 182000, + "residual_exact": "300", + "residual_not_posted": true, + "joint_journals": 11, + "joint_lines": 23, + "joint_gross_minor": 872500, + "joint_closures": 1, + "client_balance_minor": 40000, + "direct_cost_balance_minor": 29500, + "supplier_balance_minor": 6000 + }, + "preservation": { + "old8058_flag_off_and_schema_absent": true, + "old8058_source_outbox_rights_and_three_provider_packet_exact": true, + "six_pending_records_untouched": true, + "blocked_cache_untouched": true, + "prior_demos_not_reset": true, + "unrelated_work_preserved": true, + "credentials_private": true, + "destination_unchanged": true + }, + "limits": { + "visual_review_pending": true, + "actual_browser": false, + "large_volume_benchmarks": false, + "deployment_capacity_validated": false, + "all_six_modules_operationally_complete": false, + "additional_correction_chains": false, + "closed_period_correction_or_reopening": false, + "stock_valuation_payroll_or_residual_posting": false, + "new_payments_or_receipts": false, + "destination_migrations_or_grants": false, + "purchasing_activation": false, + "publication": false, + "checkpoint": false, + "acceptance_presumed": false + } +} diff --git a/docs/proofs/common-ledger-payable-20261102.json b/docs/proofs/common-ledger-payable-20261102.json new file mode 100644 index 0000000..595e80d --- /dev/null +++ b/docs/proofs/common-ledger-payable-20261102.json @@ -0,0 +1,369 @@ +{ + "increment": "COMMON-LEDGER-PAYABLE-SIM-v1", + "date": "2026-11-02", + "authorization": { + "answer": "Autorizar o incremento sintético proposto", + "approved_scope_sha256": "eb36d91e7532f49792287c26791892919380adefa77095c860d8201093175914", + "scope_archive_in_evidence": true, + "real_access": false, + "acceptance_or_checkpoint": false + }, + "synthetic_only": true, + "tests": { + "passed": true, + "cases": [ + { + "name": "prepare-independent-review-post-and-source-reconciliation", + "assertions": 9, + "passed": true + }, + { + "name": "repetition-conflicting-key-and-recovery-after-period-version", + "assertions": 6, + "passed": true + }, + { + "name": "rights-revoked-actor-person-and-no-inheritance", + "assertions": 4, + "passed": true + }, + { + "name": "independence-rejection-and-preparer-ownership", + "assertions": 6, + "passed": true + }, + { + "name": "source-rule-period-latest-capture-and-revision-changes", + "assertions": 10, + "passed": true + }, + { + "name": "invalid-period-accounts-currency-foreign-scopes-and-extra-fields", + "assertions": 10, + "passed": true + }, + { + "name": "failure-at-every-posting-boundary-and-idempotent-recovery", + "assertions": 12, + "passed": true + }, + { + "name": "database-balance-guards-and-append-only-history", + "assertions": 16, + "passed": true + } + ], + "assertions": 74, + "financial_fingerprint_equal": true, + "all_test_journals_rolled_back": true + }, + "concurrency": { + "passed": true, + "waiting": { + "a": { + "chain_reaches_parent": true, + "wait_event": "transactionid", + "statement": "companies FOR UPDATE" + }, + "b": { + "chain_reaches_parent": true, + "wait_event": "tuple", + "statement": "companies FOR UPDATE" + } + }, + "both_completed_after_release": true, + "same_journal_id": true, + "journals": 1, + "lines": 2, + "posting_events": 1, + "replay_without_duplicate": true + }, + "http": { + "passed": true, + "checks": 23, + "actual_http_kernel": true, + "recovered_all_three_original_command_receipts": true, + "one_effect_retained": true, + "read_transaction": { + "transaction": { + "isolation": "repeatable read", + "read_only": "on" + }, + "writer_lock_queries": 0 + }, + "private_build_served": true, + "visual_review": false, + "browser_interactions_tested": false + }, + "ui": { + "passed": true, + "targeted_static_checks": 3, + "production_build": true, + "private_build": true, + "public_demo_manifest_untouched": true, + "visual_review": false, + "browser_interactions_tested": false, + "general_navigation_check": "interrupted_after_no_completion; not counted as passed" + }, + "posted_proposal_ui": { + "passed": true, + "posted_proposal_has_journal_reference": true, + "no_duplicate_apply_form": true + }, + "preservation": { + "passed": true, + "read_only": true, + "financial_fingerprint_equal": true, + "financial_fingerprint": "a53684d829b0d177849d7e288d9656f0605c00077aa80faf249006ccd31c6f9b", + "journals": 1, + "lines": 2, + "debit_minor": 6000, + "credit_minor": 6000, + "posting_events": 1, + "synthetic_rights_only": true, + "default_flag": false + }, + "integrity": { + "passed": true, + "balance_function_sha256": "2b68c5a39fd557d6ca2f30ab05e51d49431c70e40f5c8768cf6527676bd6098b", + "deferred_balance_constraint": true, + "review_source_account_checks_in_database": true, + "final_blade_rendered": true, + "financial_fingerprint_equal": true, + "absent_domain_tables_not_exercised": { + "stock": true, + "budget": true + } + }, + "sources": [ + { + "file": "packages/general-ledger/bootstrap.php", + "sha256": "50da6708053c4b3dedc3be43a909fd8d4db9eb2f10bfe341c661cc4ff130adab" + }, + { + "file": "packages/general-ledger/src/LedgerSchema.php", + "sha256": "22cc9387de04eab28ce5522c687f7c162f9f83f9f479c89957064994e05591b5" + }, + { + "file": "packages/general-ledger/src/PayableJournal.php", + "sha256": "96f01292bea51228ce7ec317708147a7d5d6a14dc2a97254be9b19b0dbe7099b" + }, + { + "file": "packages/general-ledger/README.md", + "sha256": "ce84b27a3a573d6415a4a77ad0ebe2933b7aae0ff3b27ee8ed9ed1d889a992d3" + }, + { + "file": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "e455092f25ee58d1493219d6a5ea8051929d5f2940132777a476673bf7b2b9f7" + }, + { + "file": "app/Modules/Accounting/GeneralLedgerController.php", + "sha256": "f65d0d7d0783b1caf2b9cbf8f46dde7de1428a4e48947a387a9cf5e2c1e20382" + }, + { + "file": "app/Providers/AppServiceProvider.php", + "sha256": "851968c34fb1c64517dd0e95abaef823ce044d368f2cc34287f7da233ce92cfe" + }, + { + "file": "app/Shared/Context/ModuleNavigation.php", + "sha256": "59a50a468f922d1cdf439ec3dd42361cf1b7c51e32c625a7e444ab79ce1a3274" + }, + { + "file": "config/general_ledger.php", + "sha256": "98cfe2fa7b4e4510c27478e08e745d1e248dfe86799bc9ff8ac77e777423f142" + }, + { + "file": "routes/web.php", + "sha256": "6669c268e493bcac5f562ae2ec771e024a6d2d8e35555949b737741c41044d5f" + }, + { + "file": "resources/views/accounting/general-ledger.blade.php", + "sha256": "49575e103ff0dd7019e9e16323d52ebed77980ea032003f03e4ee9ee2b058401" + }, + { + "file": "resources/js/AccountingMenuWorkspace.jsx", + "sha256": "ad841dfad7d8408c620ba427500e9538bd539c7c4540b1b7803cda0caab6fd01" + }, + { + "file": "scripts/ledger-run.mjs", + "sha256": "691e5453fe2010bc4775a6cf0f19180d8cbc04c43dbc6fbc04b4c6b731c636b3" + }, + { + "file": "scripts/ledger-proof.php", + "sha256": "eebb3808fdb10f8ea8fd1242fd922517528529257776e75002bf31cf4b38b5fb" + }, + { + "file": "scripts/ledger-cases.php", + "sha256": "03cb3e21cdb63ec8454dd3d68d9d458ddf5b514f5d12ed1d562a94de5d18bdc4" + }, + { + "file": "scripts/ledger-race.php", + "sha256": "5a82aa8fd57a73dfeb14c7c43b49b747bf9096531afeb8911481a0e652d6fe46" + }, + { + "file": "scripts/ledger-ui-check.mjs", + "sha256": "0bd486ee53ef6ccdd30426383433b0029f67b5f76a48d43875ebd95c5be1e68c" + }, + { + "file": "scripts/ledger-http.mjs", + "sha256": "049229dd3bcc3351b69f34e46aebcf39618ef38134f98adeec971033957f7e55" + }, + { + "file": "scripts/ledger-http-entry.php", + "sha256": "e86f40106b195d5de1905b63e052cb647ab4f7d84e0c065bfcdc2d8f28cb87b4" + }, + { + "file": "scripts/ledger-http-router.php", + "sha256": "9fb96d3b6dbee9b6cccc6d9c713dfa458bc78a2cbd00d705d361209733660c3d" + }, + { + "file": "scripts/ledger-demo.mjs", + "sha256": "0eea5f62a0ef832bd1d6d588ff86747f1ed40b4b02d7c61760eb1f53e62c5b96" + }, + { + "file": "scripts/ledger-demo-check.mjs", + "sha256": "4d0b2ee08eec044fa4eaa35b3b04e6818705e4052c5b541d24b965667506926b" + }, + { + "file": "scripts/ledger-demo-cookie-check.mjs", + "sha256": "24b3ca1b43f0df1086d54416d7d41243097a0defe67576e23c9ba547819ed3c2" + }, + { + "file": "scripts/payable-history-sgf-proof.php", + "sha256": "eb786684eda612fdb44802fe75f6987537f5cfbfa79124450a9c0b7012743fd0" + }, + { + "file": "scripts/summarize-ledger.mjs", + "sha256": "7e773b6ac7172fa05a70cca9f3f15d85e40e66cb0b3f173b56af80e1794705df" + }, + { + "file": "docs/integration/sgf-flow-plan.json", + "sha256": "f1386de7b80c720fde48937face5551cd34eb74ef95f98adf041bf765cd8d025" + }, + { + "file": "scripts/inspect-module-flow-plan.mjs", + "sha256": "f1b52208694e90dd6d5ed83792e97ee6f8772dddea8baefd29158b92b1f2bb59" + } + ], + "evidence": [ + { + "file": "private/ledger-d93394698835/ledger-fixture.json", + "sha256": "0305622fcd1063ee8a3f82fee6b115a78f5e5359fed8024dc2ba6885a77fc2e3" + }, + { + "file": "private/ledger-d93394698835/ledger-cases.json", + "sha256": "8197a2fa96f3dee1e85b411c94b5f72f4a45ac3eac14241bc0062faffb7a0ff8" + }, + { + "file": "private/ledger-d93394698835/ledger-race.json", + "sha256": "2444062deb2094c0398e7a1bed6a7b48fc46455b8f062c80598a5e620ebdb9ad" + }, + { + "file": "private/ledger-d93394698835/ledger-http.json", + "sha256": "4d410555e0d618e3f55026b8d7cab8a0af7f3f31ca8d4af1f4222a8c520531e3" + }, + { + "file": "private/ledger-d93394698835/ledger-http-read-mode.json", + "sha256": "e9fce3fc31a5456ca726ec899c1ab953a6019b1bd974ac7cc82099db757e6053" + }, + { + "file": "private/ledger-d93394698835/ledger-ui.json", + "sha256": "d026aa920737e2bdd4bdb7b4c4e70ed6e55f9f5f3ecd17de742e40c05f7f12b3" + }, + { + "file": "private/ledger-d93394698835/ledger-ui-state.json", + "sha256": "736ed3ab2cfdeca735195234d637a7df1159b07e19b7b822e81ea97a8895e96e" + }, + { + "file": "private/ledger-d93394698835/ledger-post.json", + "sha256": "e1584081e2e25e9821e7ca26475efb0727567fc3a7c2a3431271b813bdada777" + }, + { + "file": "private/ledger-d93394698835/ledger-integrity.json", + "sha256": "ca9c3345b99956d9906f3c02b063b486a387f08481a1300bbe158ff1f5d8374f" + }, + { + "file": "private/ledger-d93394698835/approved-ledger-scope.md", + "sha256": "eb36d91e7532f49792287c26791892919380adefa77095c860d8201093175914" + } + ], + "team_demo": { + "url": "http://127.0.0.1:8048/qa/ledger-demo", + "isolated_from_regression": true, + "checks": 13, + "initial_state": { + "passed": true, + "read_only": true, + "financial_fingerprint_equal": true, + "journals": 0, + "proposals": 0, + "ready_for_team_workflow": true, + "qa_grants": 6 + }, + "cookie_isolation": { + "passed": true, + "own_session_cookie": true, + "shared_xsrf_cookie_not_replaced": true, + "csrf_validation_retained": true, + "unauthorised_action_refused": true, + "no_business_effect": true + }, + "evidence": [ + { + "file": "private/ledger-5905dd7a5ecf/ledger-demo.json", + "sha256": "fc586f69ecc34f324e6ebf89765a7a78428dfbbea7fec5654588d3c62eed158a" + }, + { + "file": "private/ledger-5905dd7a5ecf/ledger-demo-http.json", + "sha256": "8d792b83e4cd5e85fde7ac45795169cd2dd3d3bc668b997a8e35c49758669040" + }, + { + "file": "private/ledger-5905dd7a5ecf/ledger-demo-state.json", + "sha256": "68ac4f71f4bdef7c298e8cd9b05f5c2e4141fb2cb377749e5b8ae4cf025a99ef" + }, + { + "file": "private/ledger-5905dd7a5ecf/ledger-demo-cookie.json", + "sha256": "fe711353d9f743dddb01b799c6414fd18b5503877e775520fd0187f83af994ef" + } + ] + }, + "flow_inventory": { + "file": "docs/proofs/module-flow-ledger-update-20261102.json", + "sha256": "b3f56faa3d78379d6a3e8fa7b750cf2d93f5ad39e94ca3b4755025f8d77dec68", + "static_only": true + }, + "previous_proof": { + "file": "docs/proofs/sgf-payable-report-20261102.json", + "sha256": "d16770a76e673972ad28dadbf5c911cd94fb867b120d51edc8a3995cdc3301dd", + "all_recorded_private_artifacts_preserved": true + }, + "private_build": { + "manifest_sha256": "aa83d6b358515dc33f3753eb02b9d804dbe6b5ac6b659109ccac22c1ac3d1390", + "installed_public_manifest_not_replaced": true + }, + "limits": [ + "General module/navigation check did not complete and was interrupted; not counted as passing. Three targeted static permission/render checks, private production build and actual module/context HTTP refusals passed.", + "Only SGF QA adapter and one recognition scenario. Native SGC adapter, real PGC mapping, fiscal recognition, bank/settlement accounting, correction/reversal, operational periods/closing and deployment remain outside delivery.", + "Stock and budget tables are absent in this new minimal QA composition; those engines were not exercised. No new stock/budget binding or write is performed by the ledger.", + "The QA application role owns its isolated database. Production role/schema hardening and sustained volume/concurrency are not validated.", + "Configuration writes have no application API in this increment; future configuration/source writers must use the documented company serialization boundary." + ], + "distinct_new_qa_rights": [ + "general_ledger.view", + "general_ledger.prepare", + "general_ledger.validate", + "general_ledger.post" + ], + "qa_grants": 6, + "real_grants": 0, + "operational_migrations": false, + "default_enabled": false, + "six_pending_associations_untouched": true, + "blocked_cache_not_cleared": true, + "demos_preserved": true, + "native_purchasing_activation": false, + "publication": false, + "checkpoint": false, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/common-ledger-reports-20261103.json b/docs/proofs/common-ledger-reports-20261103.json new file mode 100644 index 0000000..98fe808 --- /dev/null +++ b/docs/proofs/common-ledger-reports-20261103.json @@ -0,0 +1,543 @@ +{ + "increment": "COMMON-LEDGER-REPORTS-SIM-v1", + "consolidated_at_utc": "2026-11-02T22:57:39.867Z", + "functional_code": true, + "read_only_capability": true, + "new_business_effect_types": 0, + "new_rights": 0, + "new_dependencies": false, + "tests": { + "sgf_seed": { + "passed": true, + "dedicated_report_database": true, + "actual_workflow_recognitions": 1, + "sql_only_reporting_journals": 130, + "journals": 131, + "lines": 262, + "no_extra_financial_effects": true, + "financial_fingerprint": "bbe9f767fc9db4d021a7ac4b75ea69539d75a37f1cca44000596d7045b13d023" + }, + "native_seed": { + "passed": true, + "dedicated_report_database": true, + "actual_workflow_recognitions": 1, + "sql_only_reporting_journals": 130, + "journals": 131, + "lines": 262, + "no_extra_financial_effects": true, + "financial_fingerprint": "c9ecdaf99410c7683313882e936ec88e611e523a5d7f6a154ca63560025e1958" + }, + "sgf_service": { + "passed": true, + "checks": 21, + "opening_minor": 55, + "movement_minor": 13205, + "closing_minor": 13260, + "accounts": 122, + "account_lines": 111, + "page_sizes": [ + 25, + 100 + ], + "exact_dates": true, + "running_balance_across_pages": true, + "revoked_access_refused": true, + "writer_locks": 0, + "financial_authority_unchanged": true, + "sql_fixture_explicit": true + }, + "native_service": { + "passed": true, + "checks": 21, + "opening_minor": 55, + "movement_minor": 13205, + "closing_minor": 13260, + "accounts": 122, + "account_lines": 111, + "page_sizes": [ + 25, + 100 + ], + "exact_dates": true, + "running_balance_across_pages": true, + "revoked_access_refused": true, + "writer_locks": 0, + "financial_authority_unchanged": true, + "sql_fixture_explicit": true + }, + "sgf_http": { + "passed": true, + "checks": 21, + "host": "SGF", + "actual_http": true, + "read_only": true, + "writer_locks": 0, + "report_queries_per_page": 3, + "page_sizes": [ + 25, + 100 + ], + "totals_cover_all_rows": true, + "source_evidence": true, + "no_commands": true, + "observations": [ + { + "transaction": { + "isolation": "repeatable read", + "read_only": "on" + }, + "report_queries": 3, + "writer_locks": 0 + }, + { + "transaction": { + "isolation": "repeatable read", + "read_only": "on" + }, + "report_queries": 3, + "writer_locks": 0 + } + ], + "visual_review": false + }, + "native_http": { + "passed": true, + "checks": 20, + "host": "SGC", + "actual_http": true, + "read_only": true, + "writer_locks": 0, + "report_queries_per_page": 3, + "page_sizes": [ + 25, + 100 + ], + "totals_cover_all_rows": true, + "source_evidence": true, + "no_commands": true, + "observations": [ + { + "transaction": { + "isolation": "repeatable read", + "read_only": "on" + }, + "report_queries": 3, + "writer_locks": 0 + }, + { + "transaction": { + "isolation": "repeatable read", + "read_only": "on" + }, + "report_queries": 3, + "writer_locks": 0 + } + ], + "visual_review": false + }, + "sgf_isolation": { + "passed": true, + "checks": 8, + "foreign_tenant_company_unit_excluded": true, + "foreign_accounts_refused": true, + "missing_source_is_503": true, + "rollback_only": true, + "source_and_rights_unchanged": true + }, + "native_isolation": { + "passed": true, + "checks": 8, + "foreign_tenant_company_unit_excluded": true, + "foreign_accounts_refused": true, + "missing_source_is_503": true, + "rollback_only": true, + "source_and_rights_unchanged": true + }, + "actual_sales_cycle": { + "passed": true, + "checks": 6, + "read_only_commands_only": true, + "actual_posted_journals": 4, + "actual_posted_lines": 9, + "debit_minor": 240000, + "credit_minor": 240000, + "accounts": 4, + "all_account_balances_reconcile": true, + "ledger_and_closed_period_fingerprint_unchanged": true + }, + "actual_mixed_sources": { + "passed": true, + "checks": 7, + "read_only_commands_only": true, + "actual_posted_journals": 2, + "actual_posted_lines": 5, + "debit_minor": 106000, + "credit_minor": 106000, + "accounts": 5, + "all_account_balances_reconcile": true, + "ledger_and_closed_period_fingerprint_unchanged": true + }, + "actual_native_complete_cycle": { + "passed": true, + "checks": 5, + "read_only_commands_only": true, + "actual_posted_journals": 5, + "actual_posted_lines": 10, + "debit_minor": 22000, + "credit_minor": 22000, + "accounts": 3, + "all_account_balances_reconcile": true, + "ledger_and_closed_period_fingerprint_unchanged": true + }, + "packaged_runtime": { + "passed": true, + "checks": 6, + "pinned_manifest_sha256": "cbc4ddbea15f5e396c92bc2e664b973138551928980f334bcf3eb0cf097cacb1", + "runtime_from_package": true, + "ui_from_package": true, + "journals": 1, + "lines": 2, + "debit_minor": 6000, + "sales_schema_not_installed": true, + "financial_authority_unchanged": true + }, + "packaged_report_after_capability_guard": { + "passed": true, + "checks": 4, + "read_only_commands_only": true, + "actual_posted_journals": 1, + "actual_posted_lines": 2, + "debit_minor": 6000, + "credit_minor": 6000, + "accounts": 2, + "all_account_balances_reconcile": true, + "ledger_and_closed_period_fingerprint_unchanged": true + }, + "frozen_previous_package_refusal": { + "passed": true, + "frozen_previous_package": true, + "missing_capability_status": 503, + "journals_unchanged": true, + "no_package_replacement": true + }, + "team_readiness": { + "passed": true, + "checks": 8, + "demos": [ + { + "port": 8053, + "status": 200, + "journals_observed": 0, + "report_has_commands": false + }, + { + "port": 8051, + "status": 200, + "journals_observed": 0, + "report_has_commands": false + }, + { + "port": 8052, + "status": 503, + "old_package_preserved": true + } + ], + "no_business_commands": true, + "no_reset_or_package_replacement": true, + "visual_review": false + } + }, + "evidence": [ + { + "file": "private/ledger-217b04d4fc64/ledger-reports-seed.json", + "sha256": "27b00bf6d1e18f2efc7a3464ca61994a83fe100a1872a18de00cd833acd234fe" + }, + { + "file": "private/ledger-native-9be03d75ee37/ledger-reports-seed.json", + "sha256": "038e1032c243c7479068eb797e9ab84d1f6e5508d359c452ccde92357591cf32" + }, + { + "file": "private/ledger-217b04d4fc64/ledger-reports-cases.json", + "sha256": "55211e380268298f9c08aed9e76ce2d00a0c0ce019385bf86be88f7c81e2914a" + }, + { + "file": "private/ledger-native-9be03d75ee37/ledger-reports-cases.json", + "sha256": "55211e380268298f9c08aed9e76ce2d00a0c0ce019385bf86be88f7c81e2914a" + }, + { + "file": "private/ledger-217b04d4fc64/ledger-reports-http.json", + "sha256": "77a9d1761a3d9fd78c30e74fc02776062bfa34af2ab9b38d1ab80804391d5857" + }, + { + "file": "private/ledger-native-9be03d75ee37/ledger-reports-http.json", + "sha256": "943b70ede0b9d7fbc921e2d0f53979cbe23eb8a536fd0be815e0a87bc333ec36" + }, + { + "file": "private/ledger-217b04d4fc64/ledger-reports-isolation.json", + "sha256": "699fc3ec955506c98723199ebc50fc5d0ddf5b6260b1e1089a1c698d81fba033" + }, + { + "file": "private/ledger-native-9be03d75ee37/ledger-reports-isolation.json", + "sha256": "699fc3ec955506c98723199ebc50fc5d0ddf5b6260b1e1089a1c698d81fba033" + }, + { + "file": "private/ledger-7dabce07b0c3/ledger-reports-reconcile.json", + "sha256": "574316d0dc2f15909267f060b9ea35494ff5a17947677ea23da26a9a688d124d" + }, + { + "file": "private/ledger-7a94f1f4fe7d/ledger-reports-reconcile.json", + "sha256": "b2c27e6cee8cfdf6a8ee4b988e3f88fe5e646713a76fd9e64e2768e5f9fa776d" + }, + { + "file": "private/ledger-native-717011443eb8/ledger-reports-reconcile.json", + "sha256": "4888a27d2883d2cbad636612ddef1e9d9493d6bf58f094b9541733f35cec856d" + }, + { + "file": "private/ledger-native-be2ea10293ea/ledger-reports-package.json", + "sha256": "a219d12bbfca39fb33e32a55ea9a2780d3fed75bbf0a77b5de15f036367eb517" + }, + { + "file": "private/ledger-native-be2ea10293ea/ledger-reports-reconcile.json", + "sha256": "418c56cebf7491458b56641e719ac1ad6b053830b21372bb2e498f9452d673c7" + }, + { + "file": "private/ledger-native-be2ea10293ea/ledger-reports-old-package-postcheck.json", + "sha256": "748b6b447f8e07d4f35a60265ddb8bfe28fa55c8b663222d09ac5bb5e6109ad9" + }, + { + "file": "private/ledger-reports-demo-readiness.json", + "sha256": "e05a8824ba91aef391707f1d9906bc55201f7916ec4daf7731d2769b754ed5cb" + } + ], + "previous_proofs": [ + { + "file": "docs/proofs/common-ledger-sales-receivable-20261103.json", + "sha256": "b5572466111fb85d89a604fbaa423976ed17c61afc5e2e45ba392fb23aa82e8c" + }, + { + "file": "docs/proofs/common-finance-bundle-20261103.json", + "sha256": "086c1556e7cefcf64a7064995a4aa6bd0e3aa9dd62cba66285b7801715f9f22c" + }, + { + "file": "docs/proofs/common-ledger-complete-cycle-20261102.json", + "sha256": "23657d594b84e6aeeb0d16d45790d54feca04b12e2260cfffa4f8e4a37eaa0ce" + } + ], + "previous_private_artifacts_verified": 37, + "distribution": { + "new_artifact": { + "files": 30, + "manifest_sha256": "cbc4ddbea15f5e396c92bc2e664b973138551928980f334bcf3eb0cf097cacb1", + "qa_only": true, + "runtime_and_ui_from_package_proven": true + }, + "previous_artifact": { + "files": 25, + "all_pinned_hashes_preserved": true + }, + "destination_package_replaced": false + }, + "quality": { + "syntax": { + "php_files": 20, + "javascript_files": 4 + }, + "native_phpstan": { + "passed": true, + "level": 7, + "errors": 0, + "files": [ + "app/Services/GeneralLedger.php", + "app/Http/Controllers/GeneralLedgerController.php" + ], + "single_canonical_autoload": true, + "private_cache": true + }, + "native_pint": { + "passed": true, + "same_two_files": true + }, + "sgf_phpstan_pint": "not_installed_not_run", + "git_diff_check_both": true + }, + "sources": [ + { + "file": "packages/general-ledger/bootstrap.php", + "sha256": "d23afe918ec22ffe79c97166595738ce574d48c32f40c86256be9297a2205876" + }, + { + "file": "packages/general-ledger/README.md", + "sha256": "e1d6469fc88bcdd324847ffef2f9ea9e5f4228aaf4e78dd47774203ef2ed4120" + }, + { + "file": "packages/general-ledger/src/PayableJournal.php", + "sha256": "59e7569de153baa1cdb14de850f4a1b70d48931082f40f72af3830e9aaef2c68" + }, + { + "file": "packages/general-ledger/src/LedgerReports.php", + "sha256": "70f2ac86c73c456dc292e00315ab601d33f012afc50c7dd55940026ac0df422b" + }, + { + "file": "packages/general-ledger/src/ReportsWorkspace.php", + "sha256": "46238afbb708b6c111b90a8bb79f5dd6ae9b1189e926746efefeef497ff1fc33" + }, + { + "file": "packages/general-ledger/ui/reports.php", + "sha256": "3391e1692b6d784268ee8032756fa286f2e2327fdb8936ce103c9f3fb2589aa8" + }, + { + "file": "packages/general-ledger/ui/cycle.php", + "sha256": "defa8f4c98e083e0c9251544d4eeff262fcacbf745352bc5466c23642f422709" + }, + { + "file": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "6c3eb3cabbdb471e512a94a5417f3db88c8fd29f568abfbd8dd50ec4959bd932" + }, + { + "file": "app/Modules/Accounting/GeneralLedgerController.php", + "sha256": "20671ad2d344e10e351018d9dde48780cfce42627c207a0d6996a0f28e91a967" + }, + { + "file": "resources/views/accounting/general-ledger.blade.php", + "sha256": "fc9e4877fc2e46074851293789e99381eb86c8139119fba99f4671aff4751ac5" + }, + { + "file": "routes/web.php", + "sha256": "ccf83dd1600b514a592604f8d5ca36262cd559c039f3e9dc36c8b7d208081b41" + }, + { + "file": "../compras/app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485" + }, + { + "file": "../compras/app/Http/Controllers/GeneralLedgerController.php", + "sha256": "23dc456ba90d099a92586492be9eb9a34096e8460f3cbec45ba78968bf685646" + }, + { + "file": "../compras/routes/web.php", + "sha256": "58fd656f7e5cafc80176c9c05fa77703f29251c79ab66f65ef4bcc6aabfde299" + }, + { + "file": "scripts/ledger-proof.php", + "sha256": "3c603ebffc7941f5e142642335512eef78a6803dcb7a2cd251205be7f0800795" + }, + { + "file": "scripts/ledger-sales-proof.php", + "sha256": "6785f5e458dcd2ac0e3931d721c76909ede1ea5fed9314d6ad68138e765c355d" + }, + { + "file": "scripts/ledger-http-entry.php", + "sha256": "f418b7fe7346fa6fc1f922e5e292633745ab401ea375bb1a6126cf9289c96960" + }, + { + "file": "scripts/ledger-cycle-native-proof.php", + "sha256": "248feaed611110139ea6833d09887cf4455bb183154ac53b49025e1449d07b97" + }, + { + "file": "scripts/ledger-reports-demo-check.mjs", + "sha256": "afcf4e664bb5e7ba4ba7ad741a0b1988634527eb76d9a8e82cc8ff8e4cdc82b4" + }, + { + "file": "scripts/ledger-reports-http.mjs", + "sha256": "ae8307f5185dfdc7997df2cc57e387f5cf33ed8bb32e63a773338a90a8b89699" + }, + { + "file": "scripts/ledger-reports-isolation.php", + "sha256": "fcda2ca9a1c06467c7f7b6803fb9868eb560bf687133cd0fb35eb4c38e28a295" + }, + { + "file": "scripts/ledger-reports-observer.php", + "sha256": "7d8fdab4cbaed538603e2be9a7b1fe1613a96b72937f503a8924f47d026d5a63" + }, + { + "file": "scripts/ledger-reports-proof.php", + "sha256": "d8c5e5f3210198b5a48b62c7dcad1369ba42d6d4f97545d409590d5cb9e7c5c3" + }, + { + "file": "scripts/ledger-reports-reconcile.php", + "sha256": "2013d37460b7bd0f4d7a84534dfe7523f296ac8164513c637e8be975e438f600" + }, + { + "file": "scripts/ledger-reports-run.mjs", + "sha256": "c740e3423233295897f8597a2546d335996d8d4074d8e0c9ae599e1fb9560bef" + }, + { + "file": "scripts/summarize-ledger-reports.mjs", + "sha256": "59fac7fb9615c5e52519945365198dd13c9669b15da5b21d4054567b520074da" + }, + { + "file": "docs/GENERAL_LEDGER_REPORTS_DELIVERY.md", + "sha256": "45347f82802e4007f36db2c9d212e9e13e212affca5ac6e12bc31a23172d093f" + }, + { + "file": "docs/GENERAL_LEDGER_DIRECT_COST_SCOPE.md", + "sha256": "fda42b728512b5fc554db4dcd67a5b652aa1bdfd1e44b1de93b32a7d694aaf92" + }, + { + "file": "README.md", + "sha256": "821308509e056c5688d4803dbd62b532f7bffae44d10a036e0771eb2e777c73f" + }, + { + "file": "docs/PRODUCT_DEMO.md", + "sha256": "82644214120dffec0a5975b924cd28c68ee3f7b900fb0bb7b358ae323ccfa144" + }, + { + "file": "docs/SGF_MODULE_FLOW_PREPARATION.md", + "sha256": "ace244edb3c52fd25751f7ef04102e874c752b0133af21e9f33861bc165c8226" + }, + { + "file": "../compras/docs/relatorios-contabilisticos-ensaio.md", + "sha256": "ae5b9bd60f9fb611b6e0a456b834e877d5952c1e4047abd4688baae13487536c" + }, + { + "file": "../compras/docs/desenvolvimento.md", + "sha256": "d01833de81f1b8790e02bc411fef01db6cceea023c9fdbc64cbb898df8fdf579" + }, + { + "file": "../compras/docs/orientacoes-continuidade.md", + "sha256": "b9f809bdf17e531a4580de5214e684b59aa988e8ac485e11488528f1949d52fa" + } + ], + "scope": { + "posted_journals_only": true, + "dates_inclusive": true, + "page_sizes": [ + 25, + 100 + ], + "server_side_aggregation": true, + "running_balance_before_pagination": true, + "trial_balance_report_queries": 3, + "authorization_and_schema_queries_additional": true, + "missing_capability_or_schema_status": 503 + }, + "preservation": { + "six_pending_records_untouched": true, + "blocked_cache_not_cleared": true, + "existing_demos_not_reset": true, + "existing_valid_proofs_preserved": true, + "unrelated_work_preserved": true, + "real_or_public_rights_unchanged": true + }, + "next_scope": { + "file": "docs/GENERAL_LEDGER_DIRECT_COST_SCOPE.md", + "sha256": "fda42b728512b5fc554db4dcd67a5b652aa1bdfd1e44b1de93b32a7d694aaf92", + "status": "proposal_only_requires_explicit_authorization", + "implemented": false + }, + "limits": { + "visual_review_pending": true, + "browser_automation": false, + "deployment_capacity_validated": false, + "new_large_volume_benchmarks": false, + "new_indexes": false, + "legal_financial_statements": false, + "stock_cost_payroll_accounting": false, + "real_operations": false, + "destination_migrations": false, + "publishing": false, + "purchasing_activation": false, + "checkpoint": false, + "acceptance_presumed": false + } +} diff --git a/docs/proofs/common-ledger-sales-receivable-20261103.json b/docs/proofs/common-ledger-sales-receivable-20261103.json new file mode 100644 index 0000000..6f3c359 --- /dev/null +++ b/docs/proofs/common-ledger-sales-receivable-20261103.json @@ -0,0 +1,701 @@ +{ + "increment": "COMMON-LEDGER-SALES-RECEIVABLE-SIM-v1", + "consolidated_at_utc": "2026-11-02T22:39:33.997Z", + "functional_code": true, + "synthetic_only": true, + "status": "implemented_and_tested_with_explicit_limits", + "authorization": { + "answer": "Autorizar o ciclo sintético proposto", + "approved_scope_sha256": "b689ed1624eba2f9346427d41f5d68be2168c7b482cad8030522876b302df1a3", + "archive_matches_presented_proposal": true + }, + "tests": { + "source_rule_recovery": { + "passed": true, + "cases": [ + { + "name": "source-opening-rights-independence-and-three-line-recovery", + "checks": 19, + "passed": true + }, + { + "name": "current-rule-period-and-scope-revalidation", + "checks": 5, + "passed": true + }, + { + "name": "guard-negative-and-page-query-contract", + "checks": 4, + "passed": true + } + ], + "checks": 29, + "rollback_only": true, + "issued_document_and_rights_preserved": true + }, + "actual_http_workflow": { + "passed": true, + "checks": 95, + "actual_http": true, + "real_csrf": true, + "read_transaction": { + "transaction": { + "isolation": "repeatable read", + "read_only": "on" + }, + "writer_locks": 0 + }, + "invoice_id": 1, + "obligation_id": 3, + "allocation_ids": [ + 5, + 7 + ], + "reversal_id": 8, + "source_pdf_sha256": "59c78788f00158ee2401462f2ac79af9f962898c7346873cf7e9957b9a9f6530", + "principal_minor": 100000, + "financial_balance_minor": 40000, + "client_account_minor": 40000, + "journals": 4, + "lines": 9, + "gross_debit_minor": 240000, + "gross_credit_minor": 240000, + "closed": true, + "visual_review": false, + "browser_automation": false + }, + "concurrency": { + "passed": true, + "workers": 6, + "three_line_post": { + "waiting": { + "a": { + "chain_reaches_parent": true, + "wait_event": "tuple" + }, + "b": { + "chain_reaches_parent": true, + "wait_event": "transactionid" + } + }, + "read_before_release": { + "status": 200, + "balance": "1000.00", + "journals": 0 + }, + "results": { + "a": { + "status": 200, + "result": { + "state": "posted", + "proposal_id": 1, + "journal_id": 1, + "replayed": false + } + }, + "b": { + "status": 200, + "result": { + "state": "posted", + "proposal_id": 1, + "journal_id": 1, + "replayed": false + } + } + }, + "changed_effect_id": null + }, + "stale_after_confirmed_allocation": { + "waiting": { + "a": { + "chain_reaches_parent": true, + "wait_event": "transactionid" + } + }, + "read_before_release": null, + "results": { + "a": { + "status": 409, + "message": "Factos, regras ou período mudaram; prepare nova conferência." + } + }, + "changed_effect_id": 5 + }, + "fresh_period_close": { + "waiting": { + "a": { + "chain_reaches_parent": true, + "wait_event": "transactionid" + }, + "b": { + "chain_reaches_parent": true, + "wait_event": "tuple" + } + }, + "read_before_release": null, + "results": { + "a": { + "status": 200, + "result": { + "state": "closed", + "closure_id": 1, + "period_version": 2, + "replayed": false + } + }, + "b": { + "status": 200, + "result": { + "state": "closed", + "closure_id": 1, + "period_version": 2, + "replayed": false + } + } + }, + "changed_effect_id": null + }, + "original_invoice_unchanged": true, + "journals": 2, + "lines": 5, + "financial_balance": "600.00", + "closures": 1, + "read_finished_before_writer_release": true + }, + "concurrent_source_postcheck": { + "passed": true, + "current_invoice_matches_posted_document_revision": true, + "matching_journals": 2, + "pdf_hash_matches": true, + "no_business_writes": true + }, + "latest_schema_workflow": { + "passed": true, + "checks": 10, + "invoice_id": 1, + "obligation_id": 1, + "receipts": [ + 2, + 3 + ], + "allocations": [ + 3, + 5 + ], + "reversal_effect_id": 6, + "invoice_journal_id": 1, + "journals": 4, + "lines": 9, + "gross_debit_minor": 240000, + "gross_credit_minor": 240000, + "client_balance_minor": 40000, + "financial_balance_minor": 40000, + "period_closed": true, + "origin_unchanged": true + }, + "latest_final": { + "passed": true, + "invoice_snapshot_sha256": "0ac6388831d11b86f5b75fc449dcfc44de42f079938477a4e5b7fa4c343c839e", + "pdf_sha256": "59c78788f00158ee2401462f2ac79af9f962898c7346873cf7e9957b9a9f6530", + "original_snapshot_and_pdf_preserved": true, + "principal_minor": 100000, + "balance_minor": 40000, + "client_account_minor": 40000, + "journals": 4, + "lines": 9, + "gross_debits_minor": 240000, + "gross_credits_minor": 240000, + "late_line_constraint_deferred": true, + "closed_ui_read_only": true, + "explicit_qa_runtime_flag": true + }, + "defaults": { + "passed": true, + "default_without_environment": false, + "explicit_owned_qa_runtime": true, + "real_environment_not_changed": true, + "no_business_writes": true + }, + "latest_http_read": { + "passed": true, + "checks": 10, + "latest_schema": true, + "read_only": true, + "writer_locks": 0, + "journals": 4, + "lines": 9, + "balance_minor": 40000, + "closed_forms_hidden": true, + "generic_diary_sales_origin": true, + "no_business_commands": true, + "visual_review": false + }, + "schema_scope_pagination": { + "passed": true, + "checks": 12, + "authorised_foreign_contexts_refused": [ + "unit", + "company", + "tenant" + ], + "revoked_rights_refused": true, + "late_third_line_refused_by_database": true, + "fourth_line_refused": true, + "history_pagination_bounded": true, + "rollback_only": true + }, + "module_isolation": { + "passed": true, + "checks": 4, + "picker_respects_module_associations": true, + "source_without_association_refused": true, + "whole_period_still_blocks_unaccounted_source": true, + "associations_unchanged_after_rollback": true + }, + "supplier_compatibility": { + "passed": true, + "cases": [ + { + "name": "prepare-independent-review-post-and-source-reconciliation", + "assertions": 9, + "passed": true + }, + { + "name": "repetition-conflicting-key-and-recovery-after-period-version", + "assertions": 6, + "passed": true + }, + { + "name": "rights-revoked-actor-person-and-no-inheritance", + "assertions": 4, + "passed": true + }, + { + "name": "independence-rejection-and-preparer-ownership", + "assertions": 6, + "passed": true + }, + { + "name": "source-rule-period-latest-capture-and-revision-changes", + "assertions": 10, + "passed": true + }, + { + "name": "invalid-period-accounts-currency-foreign-scopes-and-extra-fields", + "assertions": 10, + "passed": true + }, + { + "name": "failure-at-every-posting-boundary-and-idempotent-recovery", + "assertions": 12, + "passed": true + }, + { + "name": "database-balance-guards-and-append-only-history", + "assertions": 16, + "passed": true + } + ], + "assertions": 74, + "financial_fingerprint_equal": true, + "all_test_journals_rolled_back": true + }, + "native_cycle_compatibility": { + "passed": true, + "checks": 23, + "rollback_only": true, + "principal_minor": 6000, + "allocated_balance_minor": 4000, + "final_balance_minor": 6000, + "debit_minor": 22000, + "credit_minor": 22000, + "journals": 5, + "lines": 10, + "correction_pairs": 1, + "period_closed": true, + "obligation_id": 1, + "recognition_journal_id": 1, + "allocation_id": 1, + "reversal_id": 1, + "correction_id": 1, + "period_check_id": 1 + }, + "native_sales_refusal": { + "passed": true, + "sales_not_composed": true, + "no_journal_or_proposal": true, + "no_sgf_sales_table_dependency": true + }, + "supplier_customer_coexistence": { + "passed": true, + "customer_supplier_ids_coincide": true, + "one_writer": true, + "customer_filter_journals": 1, + "customer_filter_events": 3, + "supplier_filter_journals": 1, + "supplier_filter_events": 3, + "journals": 2, + "lines": 5, + "gross_debit_minor": 106000, + "gross_credit_minor": 106000, + "customer_balance_minor": 100000, + "supplier_balance_minor": 6000, + "joint_period_closed": true, + "supplier_origin_is_controlled_synthetic_receipt_not_live_import": true + }, + "team_access": { + "passed": true, + "declared_roles": 3, + "unlisted_users_with_grants": 0, + "pruned_helper_grants": 5, + "original_users_and_approvals_preserved": true, + "business_effects": 0 + }, + "team_http_readiness": { + "passed": true, + "checks": 29, + "url": "http://127.0.0.1:8053/qa/sales-demo", + "three_roles": true, + "one_actual_test_invoice": true, + "financial_records": 0, + "financial_effects": 0, + "journals": 0, + "no_business_commands": true, + "private_build": true, + "module_generation_checked_by_ui": true, + "unlisted_users_with_grants": 0, + "visual_review": false, + "browser_automation": false + }, + "rendered_forms": { + "passed": true, + "checks": 10, + "rendered_script_sha256": "b62b3a2e4869f980bd397c0ed20eeec4d5076aeadfe4369cf47bfb889430fdee", + "mock_dom": true, + "actual_browser": false, + "no_business_requests": true, + "exact_amount_and_hash_types": true, + "stable_repetition": true, + "stale_generation_cannot_self_refresh": true, + "pdf_failure_recovery": true + } + }, + "evidence": [ + { + "file": "private/ledger-fc19bcb8d9de/sales-cases.json", + "sha256": "aa53636592906b6c0a376dcd68cfe9ec50fc2679774236026a52c183d8e10664" + }, + { + "file": "private/ledger-fc19bcb8d9de/sales-http.json", + "sha256": "56d51b997dcb4184a969704112b868bd4f7c0715662f3b3b7761563326a766c1" + }, + { + "file": "private/ledger-78270fedb4e4/sales-race.json", + "sha256": "deaa9632ab2417e9ef62c7b73de0d41e966b91e421582a379d21197360846ae7" + }, + { + "file": "private/ledger-78270fedb4e4/sales-source-postcheck.json", + "sha256": "e40b2b431008ec728105c05473f5bb4bbb78972104ae345e8f1d196f16717f6b" + }, + { + "file": "private/ledger-7dabce07b0c3/sales-workflow.json", + "sha256": "9cdba15b0838402b5750aa933793c584eb432a2c3735efd1abe432fa8e4afd64" + }, + { + "file": "private/ledger-7dabce07b0c3/sales-final.json", + "sha256": "e3d539914dbe002888526aff7693c9953b858d33e01e0770ad6afe91d3394572" + }, + { + "file": "private/ledger-7dabce07b0c3/sales-defaults.json", + "sha256": "94d861c091916b0e83532f4624143f2057362dc143e76b540115b0f659c1a0e4" + }, + { + "file": "private/ledger-7dabce07b0c3/sales-readcheck.json", + "sha256": "892d07e409982bbdfca33be32d3b77ce50a6b5d5892e1100cd14073b7cbffb7a" + }, + { + "file": "private/ledger-2b60f38982b1/sales-integrity.json", + "sha256": "b6ef7a4f22c9ef2001beb03a37de066d3adb9344e8000ea393d87766497305ee" + }, + { + "file": "private/ledger-2b60f38982b1/sales-module-check.json", + "sha256": "7099f1f965eccce300993245700ddeb77e14b78735df8b2a5bdd727784d8d0d5" + }, + { + "file": "private/ledger-c47dfbc3fad1/ledger-cases.json", + "sha256": "8197a2fa96f3dee1e85b411c94b5f72f4a45ac3eac14241bc0062faffb7a0ff8" + }, + { + "file": "private/ledger-native-c5ff3a6aa5a3/native-cycle-cases.json", + "sha256": "e79f0c9c4423abbe8fac86ee5fe38ced1a3ced3491fd8db4229aaf5e461a2344" + }, + { + "file": "private/ledger-native-c5ff3a6aa5a3/sales-capability-refusal.json", + "sha256": "92fbe119b7a8d3fee43412f69a4b8a7d5cebeb4e746fe530e67f354ea3d516ee" + }, + { + "file": "private/ledger-7a94f1f4fe7d/sales-coexistence.json", + "sha256": "6029db775441a12385094ad557a73df84db607a1327a85803cb0a27dd0f47153" + }, + { + "file": "private/ledger-b4c7b11c1593/sales-demo-access.json", + "sha256": "477566f13cc2ff1be646445adfcac50b5dd272c40eae6c017c9bc3fee0f03d8c" + }, + { + "file": "private/ledger-b4c7b11c1593/sales-demo-http.json", + "sha256": "26bc004c0d7f8688ac13854965255e8ba2082f189f25f082d6acaaebe9d9492e" + }, + { + "file": "private/ledger-b4c7b11c1593/sales-forms.json", + "sha256": "a9fcfdb6cebbddeb74ae2cfede9e1e46509ac8b6515a19e3b5fdee8a1ddaa355" + }, + { + "file": "private/ledger-sales-approved-scope.md", + "sha256": "b689ed1624eba2f9346427d41f5d68be2168c7b482cad8030522876b302df1a3" + } + ], + "previous_proofs": [ + { + "file": "docs/proofs/common-finance-bundle-20261103.json", + "sha256": "086c1556e7cefcf64a7064995a4aa6bd0e3aa9dd62cba66285b7801715f9f22c" + }, + { + "file": "docs/proofs/common-ledger-complete-cycle-20261102.json", + "sha256": "23657d594b84e6aeeb0d16d45790d54feca04b12e2260cfffa4f8e4a37eaa0ce" + }, + { + "file": "docs/proofs/common-ledger-payable-20261102.json", + "sha256": "330b4b15ad952d014a828d17ec810a65c4a724d64cf91fd04807e7f37f4ab44b" + }, + { + "file": "docs/proofs/sgf-financial-ledger-flow-20261102.json", + "sha256": "5d384fd07b26cc38ad3946a6ec27341c7e177152a32d53ed1d5d56743c165836" + } + ], + "previous_private_artifacts_verified": 33, + "frozen_native_bundle": { + "files": 25, + "manifest_sha256": "6a507ea7d708a12a8e526e4c610696d8db84079d18aede470237b65505630e7e", + "all_hashes_preserved": true, + "sales_extension_not_installed": true + }, + "sources": [ + { + "file": "packages/general-ledger/bootstrap.php", + "sha256": "8de5e1e8cd5b6ca96f34f33294284106015ae5b893088c4651200df40d1380e0" + }, + { + "file": "packages/general-ledger/README.md", + "sha256": "c59638392018a9e9da57e73a2ce5e7adc12b9c618922f710ab7052950a158f09" + }, + { + "file": "packages/general-ledger/src/LedgerSchema.php", + "sha256": "1fb2490fe8d4d206d2f8157803307cdd4e2f733150d0fec4993a7e229fce58cb" + }, + { + "file": "packages/general-ledger/src/PayableJournal.php", + "sha256": "982479060b0b61dd8089f7994241df0c098fc4d0a9258f494698c030ff438fd1" + }, + { + "file": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "4589d7270c12d90e171109e6cf3af452831b03c896881e53a32307673c501331" + }, + { + "file": "packages/general-ledger/src/CycleSchema.php", + "sha256": "25407f9ea4321ee3acb0c310b5d981b8fdaf89c5464d32878ecc57c29e60972d" + }, + { + "file": "packages/general-ledger/src/CycleWorkspace.php", + "sha256": "a76bf1b4c18c3a0585de744d58e38e736777831a019200150deb1615b6fe5010" + }, + { + "file": "packages/general-ledger/src/LedgerSales.php", + "sha256": "ea21a8376705e413b824513d30243c271870b2bfbc7a9af2fd922916a145e130" + }, + { + "file": "packages/general-ledger/src/SalesSchema.php", + "sha256": "95388e12e631f89a200e764a86d6da42e95812955e62fa2e36166168c06119d6" + }, + { + "file": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "6ec89d6815acd9133c3b93d218395aa6e6392dd01e2cdd03e8ea73fd459097a1" + }, + { + "file": "app/Modules/Accounting/GeneralLedgerController.php", + "sha256": "d8a8c81f23986dd411535b38085ec51a469357413f1a8a094dceb99a57866179" + }, + { + "file": "app/Modules/Accounting/SalesLedgerController.php", + "sha256": "7a47a8b53a26b4541b224de71611721ec416dfe47736da4242fced593ac1d6aa" + }, + { + "file": "app/Modules/Accounting/SalesLedgerSource.php", + "sha256": "6a6efdc690c4ae6bd66032475ce70493c9e8b8e51bfee1429478c29d8989e9e7" + }, + { + "file": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec" + }, + { + "file": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "68ec6bc24321604cfa2b2126fc3d894a2dd30a1a272536e50c93830029f0f97e" + }, + { + "file": "app/Shared/Testing/TestingDatabaseGuard.php", + "sha256": "42c67eb798b2fc43fcf0da125f46b72c79d507e8def02a733dee30a5d305c9be" + }, + { + "file": "config/sales_ledger.php", + "sha256": "da275ef0283ee527be42700d68450dec466ba048f2ac8a803d4434ce54fc12c8" + }, + { + "file": "config/general_ledger.php", + "sha256": "2b0794ca0f3337acd3fc7793f209b5f649d0a5cc3c94b6bdc2a547faaced64f4" + }, + { + "file": "routes/web.php", + "sha256": "8ee70c479f8fd983456a62d827a38452511449ef08e7a9bc963e60599914da08" + }, + { + "file": "resources/views/accounting/general-ledger.blade.php", + "sha256": "4a26d26ce7410c618bae049c0037d2c21dd811942de3c61891fe045cd2093ad5" + }, + { + "file": "resources/views/accounting/sales-ledger.blade.php", + "sha256": "df8406a3539ac098780de6b20edb630e3a3a6ce6a2778c0a435f340905e36696" + }, + { + "file": "resources/views/accounting/sales-demo-entry.blade.php", + "sha256": "161f2e531eb7225d33c090065f9493246670b4df2b7334c855509411191eaf09" + }, + { + "file": "scripts/payable-history-sgf-proof.php", + "sha256": "0fe3fb06270a944d9158a9eabcfb445c6a7383be2fd35dea2797b01180442b2f" + }, + { + "file": "scripts/ledger-run.mjs", + "sha256": "4d5834803aa37b76c7c2bf0e7c44efbe4bdbfe84ea6abff3bdd008f3ba93212a" + }, + { + "file": "scripts/ledger-sales-cases.php", + "sha256": "c5b2a9efb2f460b8dd8bcc301636830f57d8833ddb57c9270783a60612385674" + }, + { + "file": "scripts/ledger-sales-coexistence.php", + "sha256": "3c5fac7f481818f82d799fa83471a26770b25f8394315f5f889945c230ef4367" + }, + { + "file": "scripts/ledger-sales-demo-check.mjs", + "sha256": "a0272d43016820ccc588bf2f9e9d96889db046881ddf8f12a4ee4f089f76a1ce" + }, + { + "file": "scripts/ledger-sales-demo.mjs", + "sha256": "00c325206b46eeb14befd57a1602452f46f76481148a300090bc0e4d55a56038" + }, + { + "file": "scripts/ledger-sales-form-check.mjs", + "sha256": "68683c6661116cbf4488ce3438d3372e5116098bd0e79d8660e04b3cb95a6aa2" + }, + { + "file": "scripts/ledger-sales-http-entry.php", + "sha256": "79130286eb828b463a063391315750ee926e8a7141f4ef7f367ffa1a606342a4" + }, + { + "file": "scripts/ledger-sales-http-router.php", + "sha256": "298f987b035b7b2049e7efc6f29bf8a0b08a93d438566d847113c38b90090a1d" + }, + { + "file": "scripts/ledger-sales-http.mjs", + "sha256": "9d86f4b0c417e5dbe3a09479dd60cbd12a9f4e493951ee276b0dd8fabab3f8e1" + }, + { + "file": "scripts/ledger-sales-integrity.php", + "sha256": "5ef84735ef814aebed369331c15241a3c7a85e3c8ac25b0947a82bee3bede9b6" + }, + { + "file": "scripts/ledger-sales-proof.php", + "sha256": "42f3501ba095e4f28e293425e51d78acec9598739d5ca9248838588c72215c6f" + }, + { + "file": "scripts/ledger-sales-race.php", + "sha256": "e213420073fb4c7d3a1fe39cd3850e38bc3b3bbe07ae99110dd5225c7a11195c" + }, + { + "file": "scripts/ledger-sales-readcheck.mjs", + "sha256": "fa4d71ce14604caa6bc29a611ab600aef9aa312db6f54f41e018b13dc50a6c8f" + }, + { + "file": "scripts/summarize-ledger-sales.mjs", + "sha256": "119178f3c4b67711a957cc6ddd43e27efd2c7f5ea371345522d855cebfd0ef11" + }, + { + "file": "docs/GENERAL_LEDGER_SALES_RECEIVABLE_SCOPE.md", + "sha256": "3ac91e356b701dc1149d00fb6cb10a9d289fdde663112381dcd1d366c48405f5" + }, + { + "file": "docs/GENERAL_LEDGER_SALES_RECEIVABLE_DELIVERY.md", + "sha256": "fa2a9ff135cd7af412de852d2e7a922e6825b350bf26545b7786f88e3c34b3de" + }, + { + "file": "README.md", + "sha256": "00480f56801a8cadedba48501562d82da6b847390cbd4626012e4a9d01fd1f58" + }, + { + "file": "docs/PRODUCT_DEMO.md", + "sha256": "062cd312396d72769c61374c01627baec3eecf198450b043dc46a7975cae587c" + }, + { + "file": "docs/SGF_MODULE_FLOW_PREPARATION.md", + "sha256": "ca7d51984434a42f73a439eabcfbca086b7fb56142f2da5e396d472b973ae497" + } + ], + "quality": { + "syntax": { + "php_files": 26, + "javascript_files": 7 + }, + "git_diff_check_sgf_and_native": true, + "phpstan_sgf": "not_installed_not_run", + "pint_sgf": "not_installed_not_run", + "new_dependencies": false + }, + "team_demo": { + "tag": "b4c7b11c1593", + "pid": 27308, + "url": "http://127.0.0.1:8053/qa/sales-demo", + "cookie": "sgf_sales_b4c7b11c1593", + "loopback_only": true, + "separate_team_database": true, + "old_demos_preserved": true + }, + "rights": { + "distinct_ledger_rights": 7, + "ledger_grants_per_fixture": 9, + "qa_only": true, + "real_grants": 0 + }, + "preservation": { + "six_pending_associations_untouched": true, + "blocked_cache_not_cleared": true, + "existing_demos_not_reset": true, + "unrelated_work_preserved": true, + "previous_valid_proofs_preserved": true + }, + "limits": { + "visual_review_pending": true, + "actual_browser_executed": false, + "deployment_capacity_validated": false, + "new_load_benchmarks": false, + "new_indexes": false, + "real_tax_or_chart": false, + "real_monetary_operations": false, + "destination_migrations": false, + "real_or_public_rights_changes": false, + "reopening": false, + "stock_cost_payroll_accounting": false, + "publication": false, + "purchasing_activation": false, + "acceptance_presumed": false, + "checkpoint": false + } +} diff --git a/docs/proofs/common-ledger-stock-valuation-20261103.json b/docs/proofs/common-ledger-stock-valuation-20261103.json new file mode 100644 index 0000000..d8f2c47 --- /dev/null +++ b/docs/proofs/common-ledger-stock-valuation-20261103.json @@ -0,0 +1,484 @@ +{ + "date": "2026-11-03T07:55:49.842Z", + "increment": "COMMON-LEDGER-STOCK-VALUATION-SIM-v1", + "functional_code": true, + "passed": true, + "targeted_checks": 146, + "tests": { + "cases": { + "file": "private/stock-ledger-b6b0e5d2fbc5/cases.json", + "sha256": "523592f31e15f34a4f278f9aa70ea4866842ad84e30b3c46461bd31ac9ec6126", + "checks": 31, + "result": { + "passed": true, + "checks": [ + "missing rate visible; no invented values", + "missing rate cannot capture", + "unvalued movements block close conference", + "case rollback preserves physical/financial/rights fingerprint", + "rate replay no duplication", + "changed rate replay refused", + "rate self review refused", + "rate review replay unique", + "read actor cannot prepare rate", + "case rollback preserves physical/financial/rights fingerprint", + "issue cannot precede valued receipt", + "return cannot precede valued issue", + "actual2/-1/+0.5 at50 gives100/50/25", + "server pagination boundary", + "unsupported page size refused", + "wrong physical effect type refused", + "journal date must match physical date", + "other unit cannot read mapped movement", + "case rollback preserves physical/financial/rights fingerprint", + "same-value rate successor invalidates old capture", + "new capture after rate version change", + "case rollback preserves physical/financial/rights fingerprint", + "fault rolls back header lines and receipt", + "exact and other-key retry one journal", + "stock correction excluded", + "case rollback preserves physical/financial/rights fingerprint", + "actual later physical movement invalidates pending capture", + "case rollback preserves physical/financial/rights fingerprint", + "revoked post right refused before existing effect replay", + "rate correction after posting excluded", + "case rollback preserves physical/financial/rights fingerprint" + ], + "all_cases_rolled_back": true, + "no_persistent_journals": true + } + }, + "concurrency": { + "file": "private/stock-ledger-b6b0e5d2fbc5/race.json", + "sha256": "02a747b3629a5df08945bb5c8235064f5bdd79130b788e93b7648d2108fbc9e8", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "released same-key confirmation returns original journal without duplication", + "released worker rechecks changed period and refuses stale capture without receipt", + "two workers leave one journal and original physical/financial/rights state" + ], + "workers": [ + { + "scenario": "same_key_commit", + "observed_wait": "transactionid", + "blocker_observed": true, + "status": 200, + "journals_after": 1 + }, + { + "scenario": "period_changed_then_refuse", + "observed_wait": "transactionid", + "blocker_observed": true, + "status": 409, + "journals_after": 1 + } + ], + "source_fingerprint_unchanged": true, + "not_throughput_measurement": true + } + }, + "workflow": { + "file": "private/stock-ledger-b6b0e5d2fbc5/workflow.json", + "sha256": "b73de0985e9775eb7ed8010c8ef06f98acd1bdfdb81e72511c8c7220c36d332e", + "checks": 4, + "result": { + "passed": true, + "checks": [ + "same core reports gross175 stock75 consumption25", + "period close replay unique", + "three journals six lines one close", + "valuation leaves physical financial budget and grants intact" + ], + "journals": 3, + "lines": 6, + "gross_minor": 17500, + "stock_minor": 7500, + "consumption_minor": 2500, + "physical_quantity_milli": 1500, + "closures": 1, + "physical_financial_rights_fingerprint_unchanged": true + } + }, + "isolation_sql": { + "file": "private/stock-ledger-b6b0e5d2fbc5/extra.json", + "sha256": "4cf70e03a3d9ed1ba04f04a397c1cbea2310fc16cd0fd37bd73a8fff5c7fd9a4", + "checks": 9, + "result": { + "passed": true, + "checks": [ + "same-person rate review refused with both actual rights", + "another tenant cannot resolve physical source", + "another company cannot resolve mapped book", + "case rollback preserves physical/financial/rights fingerprint", + "SQL forbids a second stock journal even with a forged new effect key", + "case rollback preserves physical/financial/rights fingerprint", + "SQL rejects amount forged independently of reviewed PHP source", + "same-person journal review refused with both actual rights", + "case rollback preserves physical/financial/rights fingerprint" + ], + "all_extra_physical_and_sql_changes_rolled_back": true, + "existing_closed_book_preserved": true + } + }, + "sql_predecessor": { + "file": "private/stock-ledger-255565a5f62d/order-guard.json", + "sha256": "ad718dde00053e06d68b216f288a66a2033cd5044ba8b601f47a83fc4d789d55", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "SQL independently refuses issue before receipt valuation", + "failed order guard leaves no partial journal", + "case rollback preserves physical/financial/rights fingerprint" + ], + "all_changes_rolled_back": true + } + }, + "http": { + "file": "private/stock-ledger-255565a5f62d/http-proof.json", + "sha256": "cd046fb28f1bc3f6578907959c7e5fdbe0f8e6284cd46ce19b58b9ee31913a08", + "checks": 40, + "result": { + "passed": true, + "checks": [ + "native QA entry prepare", + "native QA entry validate", + "native QA entry read", + "open UI presents rate and incomplete amounts", + "API server page100 has three actual movements", + "unknown read parameter refused", + "stale context refused", + "CSRF retained", + "read profile cannot prepare rate", + "rate proposal through HTTP", + "rate exact retry same id", + "rate receipt recovery does not execute", + "another actor cannot read rate receipt", + "rate approval through HTTP", + "capture actual stock movement 1", + "review UI shows exact impact revision and dependencies", + "independent HTTP journal review 1", + "HTTP post selected stock movement 1", + "HTTP retry one journal 1", + "capture actual stock movement 2", + "review UI shows exact impact revision and dependencies", + "independent HTTP journal review 2", + "HTTP post selected stock movement 2", + "HTTP retry one journal 2", + "capture actual stock movement 3", + "review UI shows exact impact revision and dependencies", + "independent HTTP journal review 3", + "HTTP post selected stock movement 3", + "HTTP retry one journal 3", + "journal receipt recovery does not execute", + "another actor cannot read journal receipt", + "same common balancete rendered", + "same common stock account ledger rendered", + "prepare period through HTTP", + "validate period through HTTP", + "close period through HTTP", + "HTTP close retry same receipt", + "closed workspace has no mutation forms", + "anonymous API refused", + "HTTP cycle exact totals preserves physical budget financial and grants" + ], + "actual_http": true, + "journals": 3, + "lines": 6, + "closures": 1, + "physical_financial_rights_unchanged": true, + "visual_review": false + } + }, + "sgf_observer": { + "file": "private/stock-ledger-observer-0f9fe83534bd/proof.json", + "sha256": "37ae92e092007a9f58bf01d6b51bbaefac616d2fe86e7b4fb6bc19d076f9b877", + "checks": 23, + "result": { + "passed": true, + "checks": [ + "SGF QA session reader", + "SGF QA session limited", + "SGF QA session foreign-unit", + "SGF QA session foreign-company", + "SGF reads canonical source with explicit dual rights", + "SGF sees actual1.5UN and posted75 from same native book", + "read-only canonical source identity and six lines", + "SGF response no-store", + "SGF server pagination boundary", + "SGF invalid page size refused", + "SGF protected scope parameter refused", + "SGF stale tab refused", + "general ledger view alone cannot read stock evidence", + "foreign SGF unit refused", + "foreign SGF company refused", + "missing binding is unavailable not zero", + "native scope mismatch refused", + "unapproved native role refused", + "SGF HTML has source facts and no financial command forms", + "SGF snapshot advertises only configured stock observer feature", + "revoked stock view refused on next request", + "source SQL role cannot write", + "source and SGF grants unchanged; no copied physical or ledger book" + ], + "actual_sgf_http": true, + "physical_quantity_milli": 1500, + "posted_stock_minor": 7500, + "source_journals": 3, + "source_lines": 6, + "source_and_grants_unchanged": true, + "select_only_source": true, + "no_local_book_copy": true, + "visual_review": false + } + }, + "sgf_metadata": { + "file": "private/stock-ledger-observer-0f9fe83534bd/proof-final.json", + "sha256": "4ab362a048b06417745b89e78f12dd624f6cd1f30672cc2be48c4bb336b5c9be", + "checks": 4, + "result": { + "passed": true, + "checks": [ + "observer qualifies its reconciliation scope", + "changed native unit refused before presenting stock value", + "restored unit recovers and HTML states source conference limitation", + "all native metadata movements rates and journals exactly restored" + ], + "synthetic_metadata_probe_restored": true, + "actual_http": true, + "not_full_source_revalidation": true + } + }, + "demo": { + "file": "private/stock-ledger-cf1b85f9a040/demo-check.json", + "sha256": "c11fd3291c72ac11d664d486649a3613c895dc16e22f23255b8c94aa35803ba7", + "checks": 9, + "result": { + "passed": true, + "checks": 9, + "read_only_checks": true, + "initial_rates": 0, + "initial_journals": 0, + "initial_closures": 0, + "native": "http://127.0.0.1:8062/qa/stock", + "sgf": "http://127.0.0.1:8063/qa/stock-observer/reader?open=1", + "private_build": true, + "pinned_bundle_manifest": "8b3ad1c600b84c8526b2d9f453a1c5c4e174a69d6acc78ace2af4f52a25dd762", + "visual_review": false + } + }, + "ui": { + "file": "docs/proofs/stock-ledger-ui-20261103.json", + "sha256": "35e82a12aa94d9f1d6874e95dbdd9be2ab92789a497c44caf329277bf6e41e9f", + "checks": 15, + "result": { + "passed": true, + "checks": 15, + "node_vm_and_react_render": true, + "actual_browser": false, + "no_automatic_command_retry": true, + "stale_receipt_responses_discarded": true, + "sgf_scoped_navigation": true + } + }, + "menu": { + "file": "docs/proofs/stock-ledger-menu-final-20261103.json", + "sha256": "14e981998fcad4238b716ef5744c9d8db898b67f744794e7b92112a9201a9f91", + "checks": 5, + "result": { + "passed": true, + "checks": 5, + "react_static_render": true, + "actual_browser": false, + "existing_other_composition_route_preserved": true + } + } + }, + "affected_legacy_regression": { + "file": "private/ledger-native-4ca15d915362/native-cycle-cases.json", + "sha256": "e79f0c9c4423abbe8fac86ee5fe38ced1a3ced3491fd8db4229aaf5e461a2344", + "checks": 23, + "passed": true + }, + "sql_contracts": [ + { + "file": "private/stock-ledger-b6b0e5d2fbc5/contract.json", + "sha256": "62071a80d1dfe5885e0bafbb3b4b762f64e1901f9b0f76ab8b9db256829574d8", + "passed": true, + "sql_contract_sha256": "26146adfd55f4f29a22c1177642a6e745ba3ed442e5e6d4a639164cc02fe90ee", + "predecessor_required": true, + "source_class_sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3", + "read_only_checks": true + }, + { + "file": "private/stock-ledger-255565a5f62d/contract.json", + "sha256": "62071a80d1dfe5885e0bafbb3b4b762f64e1901f9b0f76ab8b9db256829574d8", + "passed": true, + "sql_contract_sha256": "26146adfd55f4f29a22c1177642a6e745ba3ed442e5e6d4a639164cc02fe90ee", + "predecessor_required": true, + "source_class_sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3", + "read_only_checks": true + }, + { + "file": "private/stock-ledger-cf1b85f9a040/contract.json", + "sha256": "62071a80d1dfe5885e0bafbb3b4b762f64e1901f9b0f76ab8b9db256829574d8", + "passed": true, + "sql_contract_sha256": "26146adfd55f4f29a22c1177642a6e745ba3ed442e5e6d4a639164cc02fe90ee", + "predecessor_required": true, + "source_class_sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3", + "read_only_checks": true + } + ], + "sources": [ + { + "file": "packages/general-ledger/bootstrap.php", + "sha256": "71451b27f4a12295b01fd5fce38de7013de7d84c07ed38e07a85da2d04adf670" + }, + { + "file": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "file": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + }, + { + "file": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + }, + { + "file": "packages/general-ledger/src/StockValuation.php", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "file": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + }, + { + "file": "packages/general-ledger/src/StockWorkspace.php", + "sha256": "56a321e3ae796036fe1c6c8f94c15ab938649a87a5582deb43c5e93b5d5c7aa0" + }, + { + "file": "packages/general-ledger/ui/stock.php", + "sha256": "2fc77b306711bd82dab6bd348f8fc7e434ffca5e663e2393589127a9146b48e8" + }, + { + "file": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + }, + { + "file": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + }, + { + "file": "resources/views/accounting/stock-valuation-read.blade.php", + "sha256": "86443c24ffd53c95b107a4e4b8597bf10577215aa8b5bcf9a87939b857afc280" + }, + { + "file": "config/stock_ledger.php", + "sha256": "201a7d6cc603e4ee8d89648e7d4d4a5c841b25254f763ce36603633b205c09b4" + }, + { + "file": "app/Modules/Identity/Services/IdentityWorkflow.php", + "sha256": "995b3d71e2fd7d4935235a29aeec2caca83fff3533b67224389900e080966822" + }, + { + "file": "app/Shared/Context/ModuleNavigation.php", + "sha256": "b6d13a6e3ab5ab7c52591f9d0716a9369ae990409b96febf69419ab2a2966a24" + }, + { + "file": "resources/js/AccountingMenuWorkspace.jsx", + "sha256": "034a189d4b649da8715773f0069788efdd2023ac9298f72ef2b92a4de38fd60a" + }, + { + "file": "routes/web.php", + "sha256": "bd3e5d3db0fdbf4b00be87e39918254dbe22d77a76771f3b587ac94cc00d8795" + }, + { + "file": "../compras/app/Services/ReceiptWorkflow.php", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + }, + { + "file": "../compras/app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + }, + { + "file": "../compras/app/Services/WarehouseRequests.php", + "sha256": "729265408efa13d942f86f0c71370a50ac5286f1f00da3d34daa4eb627e476de" + }, + { + "file": "../compras/app/Services/WarehouseFulfilment.php", + "sha256": "52130ff23382d10e7244b7b4211734772eb4d66518bb9002fc35dfb99f183c02" + }, + { + "file": "../compras/app/Services/WarehouseReturns.php", + "sha256": "0e3ba1f1b9547a9fc21ad85191ff2378a2e5da7d95aaf0625c55d69a5d7bc0d3" + }, + { + "file": "../compras/app/Services/WarehouseReturnMovement.php", + "sha256": "0a4fae10c24319b6f5bd030e99fa4281e337aaae5777e8287e608752e51bb5a3" + }, + { + "file": "../compras/app/Services/StockIssueMovement.php", + "sha256": "61a649d26f4bf1e96becc3ff213bab0a029c47040d1368e99cc558bd98649de6" + } + ], + "demo": { + "native": "http://127.0.0.1:8062/qa/stock", + "sgf": "http://127.0.0.1:8063/qa/stock-observer/reader?open=1", + "pinned_common_manifest_sha256": "8b3ad1c600b84c8526b2d9f453a1c5c4e174a69d6acc78ace2af4f52a25dd762", + "initial_rates": 0, + "initial_journals": 0, + "initial_closures": 0, + "physical_quantity_milli": 1500 + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/requisition-composition-20261103.json", + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e" + }, + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478" + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + }, + { + "file": "docs/proofs/sgf-demo-8039-reconciliation.json", + "sha256": "948ecdb75b1bba9199634856fb2e9802069f3f2226e0e4894244542653fe8307" + } + ], + "incomplete_or_superseded_qa_runs_preserved": [ + "716e93985fae", + "f6f4a1639d23", + "3723aba6c497", + "d064fa825119", + "9dbef750c208", + "68efce228a56" + ], + "limitations": [ + "SGF observes the canonical native book through SELECT-only access; confirmations and full source revalidation execute in the native QA composition.", + "Observer reconciliation covers movement coverage and rate IDs, not independent validation of every current source dependency.", + "No hybrid posting of the same materials as direct/industrial cost; integration of already posted materials with these costs remains separate.", + "Selected fixed synthetic rate is not a real inventory valuation method or tax/accounting policy.", + "QA roles own their new databases; deployment owner/runtime separation and capacity are not validated.", + "No sustained load/throughput or visual review." + ], + "preservation": { + "existing_demos_or_protected_six_records_written": false, + "blocked_cache_cleared": false, + "destination_migrations": false, + "real_or_public_rights_changed": false, + "purchasing_candidate_activated": false, + "publication": false, + "checkpoint": false + } +} \ No newline at end of file diff --git a/docs/proofs/dossier-flow-20261103.json b/docs/proofs/dossier-flow-20261103.json new file mode 100644 index 0000000..1c734c0 --- /dev/null +++ b/docs/proofs/dossier-flow-20261103.json @@ -0,0 +1,657 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "dcc2c168188622f73370adb675ef04433b1c175e792d1366a0666a2ad59dece6", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "2c946b782a62e81b3ec637e2f72590ed6a6c0774f04a8082171f9c898d37c2db", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "75a4d917b300dc9f9c89a8feb90e4ba39829177f946a28fc613612ab4b91a308", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "4bfff0204e67f21a6ddd785d64e7c91bd63bf65742add42fc3aa7f943ab5a6e4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_screen", + "repository": "sgf", + "path": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_screen", + "repository": "sgf", + "path": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_workspace", + "repository": "sgf", + "path": "app/Modules/Purchasing/WorkspaceNavigation.php", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_navigation", + "repository": "sgf", + "path": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_picker", + "repository": "sgf", + "path": "public/supplier-picker-model.mjs", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_search_ui", + "repository": "sgf", + "path": "public/sourcing-workspace.mjs", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/DossierController.php", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_screen", + "repository": "sgf", + "path": "resources/views/purchasing-dossier.blade.php", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_ui", + "repository": "sgf", + "path": "public/purchasing-dossier.mjs", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/dossier-matrix-20261103.json b/docs/proofs/dossier-matrix-20261103.json new file mode 100644 index 0000000..1f192bf --- /dev/null +++ b/docs/proofs/dossier-matrix-20261103.json @@ -0,0 +1,1870 @@ +{ + "date": "2026-11-03T15:19:54.533Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "dcc2c168188622f73370adb675ef04433b1c175e792d1366a0666a2ad59dece6", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "4bfff0204e67f21a6ddd785d64e7c91bd63bf65742add42fc3aa7f943ab5a6e4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_workspace", + "file": "app/Modules/Purchasing/WorkspaceNavigation.php", + "repository": "sgf", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1" + }, + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_navigation", + "file": "resources/views/partials/purchasing-navigation.blade.php", + "repository": "sgf", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_picker", + "file": "public/supplier-picker-model.mjs", + "repository": "sgf", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_search_ui", + "file": "public/sourcing-workspace.mjs", + "repository": "sgf", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "15ed768992dfd8858df65ce7fa41c733906875aec98b1c347169d83571cde52e" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_controller", + "file": "app/Modules/Purchasing/DossierController.php", + "repository": "sgf", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_screen", + "file": "resources/views/purchasing-dossier.blade.php", + "repository": "sgf", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_ui", + "file": "public/purchasing-dossier.mjs", + "repository": "sgf", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-search-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 51 + } + ], + "sha256": "388e738da7e9b3e7f521c8d67f85dd4ef34869c74daf0c04c09067b9fbde5242", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "2c946b782a62e81b3ec637e2f72590ed6a6c0774f04a8082171f9c898d37c2db", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "75a4d917b300dc9f9c89a8feb90e4ba39829177f946a28fc613612ab4b91a308", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + } + ], + "current_hash_has_matching_recorded_evidence": false + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_invoice_controller", + "file": "app/Modules/Purchasing/InvoiceController.php", + "repository": "sgf", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_invoice_screen", + "file": "resources/views/supplier-invoice-workspace.blade.php", + "repository": "sgf", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_obligation_controller", + "file": "app/Modules/Purchasing/ObligationController.php", + "repository": "sgf", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_screen", + "file": "resources/views/supplier-obligation-workspace.blade.php", + "repository": "sgf", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 72 + } + ], + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/financial-receipt-recovery-20261103.json b/docs/proofs/financial-receipt-recovery-20261103.json new file mode 100644 index 0000000..cda775e --- /dev/null +++ b/docs/proofs/financial-receipt-recovery-20261103.json @@ -0,0 +1,163 @@ +{ + "increment": "FINANCIAL-RECEIPT-RECOVERY-v1", + "date": "2026-11-03T06:55:47.251Z", + "functional_code": true, + "checks": 43, + "private_evidence": [ + { + "file": "private/ledger-6070063f42f2/financial-receipt-cases.json", + "sha256": "c6a8d956d82d53a1140d596b4768b57b29df3bb618a865cb0641c61cf7af62d7", + "result": { + "passed": true, + "checks": 13, + "same_uuid_domains_separate": true, + "read_only": { + "isolation": "repeatable read", + "read_only": "on" + }, + "writer_locks": 0, + "no_payments_or_effects_created": true, + "synthetic_receipt_fixture_explicit": true, + "source_rights_unchanged": true + } + }, + { + "file": "private/ledger-6070063f42f2/financial-receipt-core.json", + "sha256": "79dff28c98fdd1358eea696ab48cc1bb0831d2f790e1a3e83af9f76bb7280a96", + "result": { + "passed": true, + "checks": 6, + "foreign_tenant_company_unit_absent": true, + "missing_read_authorizer_refused": true, + "domain_whitelist": true, + "read_only": true + } + }, + { + "file": "private/ledger-6070063f42f2/financial-receipt-http.json", + "sha256": "c769649b84bd0950c515fbc01a67ce09621afe49cd885904e03cb5433a6fdbae", + "result": { + "passed": true, + "checks": 19, + "no_business_commands": true, + "actual_http": true, + "visual_review": false + } + }, + { + "file": "private/ledger-6070063f42f2/financial-receipt-form.json", + "sha256": "85b23ff21361c239566cd2129f3570d5fee9777c843e8b415c2004d8acbc3c3d", + "result": { + "passed": true, + "checks": 5, + "rendered_scripts_compile": true, + "mock_get_only": true, + "no_browser": true + } + } + ], + "previous_manifests": [ + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f" + }, + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478" + } + ], + "previous_private_artifacts_verified": 19, + "frozen_packages_bytes_preserved": true, + "sources": [ + { + "file": "packages/payables/src/ReceiptReader.php", + "sha256": "ed4e153d539ad660f9b87c44d70b14166dbb7262bc9aa5d81b71559a8c80999e" + }, + { + "file": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d" + }, + { + "file": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe" + }, + { + "file": "packages/payables/bootstrap.php", + "sha256": "b90f0947c7c27fe7464b17ef9269f71c8ab9294385029d9e6d1d04f4a3a1930b" + }, + { + "file": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "file": "app/Modules/Accounting/GeneralLedgerController.php", + "sha256": "8c83538a5df4625bb3a15c81e3bf618d12187eca77da5f6e73dd1b4b781c64ce" + }, + { + "file": "routes/web.php", + "sha256": "816e3f7692f8a4365832b1ccafcefbf470d6bb32de2f04c9f5eb595740891b9f" + }, + { + "file": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "file": "scripts/ledger-composition-proof.php", + "sha256": "b00267b3a058739475a3e0f9152e3a6ca662d7d63f76fa2e8e1c14b668997646" + }, + { + "file": "scripts/financial-receipt-proof.php", + "sha256": "8a2e011f6af966fa2a9dcd8b9754c4ee42d0bc4dc5a2fff19b7858857603a897" + }, + { + "file": "scripts/financial-receipt-core.php", + "sha256": "419dc74aea3f7f3ce5e965e4c7a659b5caa036368f208438a289113bcc55f747" + }, + { + "file": "scripts/financial-receipt-http.mjs", + "sha256": "f516baea07b479de87f63415f5e9f0f91906d07e1785d9b89d79153116a9ecd3" + }, + { + "file": "scripts/financial-receipt-form.mjs", + "sha256": "478c543f647e3fad9b08c5ab83427abe0b74f28fadbc1bba6283356a96b69edc" + }, + { + "file": "scripts/summarize-financial-receipt.mjs", + "sha256": "bcc03d4f99a86b61bc9b6d61a00b327e26240cf727192bd18ee474d9e1d7b0ae" + }, + { + "file": "docs/FINANCIAL_RECEIPT_RECOVERY_DELIVERY.md", + "sha256": "3ace4eb8ba99fb2e9dbe34e839ebc25b1d464ac684e1516b40527d80e967accd" + }, + { + "file": "docs/GENERAL_LEDGER_RECEIPT_RECOVERY_DELIVERY.md", + "sha256": "0b970eb526587f57d173eadded1d22cffc2c49cc2267c5f57ca0e7437889c92a" + }, + { + "file": "README.md", + "sha256": "34656e4f443202977d5d341e1321d9b70ba6429258b08d2551b9d48c9573072c" + } + ], + "fixture": { + "actual_supplier_recognition": true, + "settlement_receipt_infrastructure_only": true, + "settlement_fixture_represents_no_business_effect": true, + "payments": 0 + }, + "preservation": { + "six_records_untouched": true, + "blocked_cache_untouched": true, + "prior_demos_not_reset": true, + "no_real_grants": true, + "no_migrations": true, + "no_purchasing_activation": true, + "no_publication": true, + "no_checkpoint": true + }, + "limits": { + "visual_review_pending": true, + "sustained_load_validated": false, + "deployment_capacity_validated": false, + "no_sgc_installation": true + } +} \ No newline at end of file diff --git a/docs/proofs/geography-composition-20261103.json b/docs/proofs/geography-composition-20261103.json new file mode 100644 index 0000000..b1a0451 --- /dev/null +++ b/docs/proofs/geography-composition-20261103.json @@ -0,0 +1,380 @@ +{ + "date": "2026-11-03T12:20:31.325Z", + "increment": "SGF-GEOGRAPHY-SEGMENTATION-QA-v1", + "passed": true, + "functional_code": true, + "checks": 83, + "tests": { + "integration": { + "file": "private/receipt-composition-24b388fdd84f/geography-result.json", + "sha256": "a56ce5071a7edcfa7b2a14b0d2e930b8caceecd2dd4ced5032c3cd2cf1e2d30e", + "checks": 41, + "result": { + "passed": true, + "checks": [ + "all source rows imported without business locations", + "province reference page is accessible", + "cascade follows explicit parent", + "invalid page is rejected", + "stale general reference context is refused", + "server catalogue pages25 are disjoint", + "alphanumeric territorial code survives import and search", + "common location screen served", + "foreign company ID refused", + "another active unit cannot be inferred", + "read permission does not grant editing", + "source ambiguities cannot be assigned", + "preview is read only and presents the exact source version", + "tampered preview refused", + "history failure aborts confirmation", + "history failure rolls back location and receipt", + "same preview recovers after failure removal", + "replay preserves one location and history entry", + "same key cannot change territory", + "independent editors commit once and refuse stale concurrent version", + "editing right revalidated at confirmation", + "unit uses the shared location mechanism", + "changed entity invalidates geographic preview", + "changed active reference requires renewed conference", + "new context generation invalidates general company preview", + "pending unassociated client cannot be reached", + "associated client receives explicitly selected location", + "client consultation does not imply editing", + "client segmentation applies explicit territorial filter", + "absent filter code does not fabricate matches", + "supplier location reuses original administrative authority", + "warehouse cannot inspect supplier location", + "foreign native supplier is inaccessible", + "supplier segmentation rechecks native visibility", + "unmapped unit cannot reuse supplier location", + "explicit removal assigns no replacement territory", + "paged history preserves before after author reason and date", + "geo_location_history refuses deletion", + "geo_territories refuses deletion", + "pending client and module associations are unchanged", + "native supplier addresses review and financial evidence are unchanged" + ], + "concurrent_edit_statuses": [ + 201, + 409 + ], + "catalogue_rows": 20407, + "native_before": "3ee79030cbad7ec962eb87f8a62e0a53a66f7d485486fcff89073c564a249cd4", + "native_after": "3ee79030cbad7ec962eb87f8a62e0a53a66f7d485486fcff89073c564a249cd4", + "purpose": "segmentation_only", + "pending_client_unchanged": true, + "module_associations_unchanged": true, + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "pagination": { + "file": "private/receipt-composition-24b388fdd84f/geography-pagination.json", + "sha256": "a61b31f9ae002a85b3479f6bced60fae9bb9dc2345f6b0a805143f0d9b49646c", + "checks": 5, + "result": { + "passed": true, + "checks": [ + "segmentation first page contains25 authorised locations", + "segmentation cursor reaches final two locations", + "cursor pages contain no duplicate or omitted visible locations", + "prepared metadata cannot bypass an absent client module association", + "invalid segmentation cursor rejected" + ], + "prepared_reader_fixtures": 26, + "actual_command_checks_reused": 41, + "pages": [ + 25, + 2 + ], + "unassociated_client_hidden": true, + "protected_pending_client_location_fixture_removed": true, + "database_scope": "new QA fixture only", + "visual_review": false + } + }, + "guards": { + "file": "private/receipt-composition-24b388fdd84f/geography-guards.json", + "sha256": "3e886415b8c126dcd633c3662cdea2475bd6d1094df10bee8cfd640925179b37", + "checks": 12, + "result": { + "passed": true, + "checks": [ + "disabled catalogue refuses before SQL", + "disabled preview refuses before validation and SQL", + "disabled segmentation refuses before SQL", + "production refuses synthetic geography before SQL", + "correct module owner: geography/company/1", + "correct module owner: geography/unit/1", + "correct module owner: api/geography/catalogue", + "correct module owner: geography/client/1", + "correct module owner: api/geography/segments/client", + "correct module owner: geography/supplier/1", + "correct module owner: api/geography/entities/supplier/1/confirm", + "correct module owner: api/geography/segments/supplier" + ], + "database_queries": 0, + "public_rights_changed": false + } + }, + "demonstration": { + "file": "private/receipt-composition-ce2f27544d34/geography-demo-smoke.json", + "sha256": "ec471f6786901e502912fbdd3ff61ef824509dff4b63d4972a1ab8d4a025f100", + "checks": 14, + "result": { + "passed": true, + "checks": [ + "demo begins without locations or geographic decisions", + "company location capability matches actor", + "company location capability matches issuer", + "company location capability matches validator", + "shared geography screen is live", + "live reference exposes11 source provinces", + "read-only preview carries country and exact source version", + "supplier record advertises shared geographic selector", + "synthetic associated client can open selector without an initial location", + "segmentation demo begins with no assigned client locations", + "pending synthetic client stays outside the selected module", + "client reaches the same live selector", + "served selector script matches delivered source", + "smoke and preview persist no geographic location history or command" + ], + "before": "5ae1625b488b3935122d8dd627fe575b388a5aa360378fa4407aad08baaed1e2", + "after": "5ae1625b488b3935122d8dd627fe575b388a5aa360378fa4407aad08baaed1e2", + "visual_review": false, + "locations": 0 + } + }, + "assets": { + "file": "private/receipt-composition-ce2f27544d34/geography-demo-assets.json", + "sha256": "23478a5b235317e18b3be20d9f8098a0168b854d9c84484646881db130b7be67", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "private frontend build succeeds", + "served built assets match private build", + "geography module is served through private static whitelist" + ], + "assets": [ + "assets/app-Bas0virr.js", + "assets/app-BLSNCrO7.css" + ], + "visual_review": false + } + }, + "links": { + "file": "docs/proofs/geography-links-20261103.json", + "sha256": "ed63b4ffcce13e9417ef9c37f4d139f1316f82a12d728f50ce12b1d2b4191b99", + "checks": 8, + "result": { + "passed": true, + "checks": 8, + "names": [ + "company opens the shared selector", + "unit opens the shared selector", + "client opens the shared selector", + "disabled composition hides location link", + "absent capability hides location link", + "unsaved client has no location target", + "unrecognised entity cannot generate a target", + "noninteger record ID is refused" + ], + "source": "resources/js/GeographyLink.jsx", + "sha256": "1bad1cfbd2568cce7e9ee21e306f10465194f579a152b48187c6f6133533493a", + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Shared/Geography/Cartography.php", + "sha256": "1153c13031ba827ec177c74b624dbeb555e06f731409d5baea6b7b702616c042" + }, + { + "file": "app/Shared/Geography/Catalogue.php", + "sha256": "2cc6a86832ff0c7ec844818feb13ca25a245fa2f14b434a7644fd653e24f8d44" + }, + { + "file": "app/Shared/Geography/Locations.php", + "sha256": "1a4214814fc881275a0bc240fcb17a79b75f878fb93abbd9c0664e11390f36a9" + }, + { + "file": "app/Shared/Geography/Segments.php", + "sha256": "612d83947ed63fc32c16f6f472d7103e2e6a7f70ed8da2db3413f3c8bf6dbfcf" + }, + { + "file": "app/Shared/Geography/GeographyController.php", + "sha256": "62115337f18810544efbe3cbea2ac3f2859c8136a8fa70cb771485fb4f8ab098" + }, + { + "file": "config/geography.php", + "sha256": "ba8ec11d5af512ac36bb795aaa199611e3d5015823a89ab9334b68361afb477f" + }, + { + "file": "routes/web.php", + "sha256": "17cd4656e25c9e2d16292fc57df8bd28bbd8f3a303437f59c6b9d9e1ec8a0e21" + }, + { + "file": "app/Shared/Context/ModuleNavigation.php", + "sha256": "313927be05453b1c7c448b3567a6d8ff30dd46507aea5d2533448295d5d93bc1" + }, + { + "file": "app/Modules/Identity/Services/IdentityWorkflow.php", + "sha256": "5010b609cf0cf675893cd2583edf3ddba32ad5b2d1c5b418771b0930ba06d24d" + }, + { + "file": "app/Modules/Purchasing/SupplierController.php", + "sha256": "4bfff0204e67f21a6ddd785d64e7c91bd63bf65742add42fc3aa7f943ab5a6e4" + }, + { + "file": "resources/js/GeographyLink.jsx", + "sha256": "1bad1cfbd2568cce7e9ee21e306f10465194f579a152b48187c6f6133533493a" + }, + { + "file": "resources/js/app.jsx", + "sha256": "48ebe87adaace5a91db105ae21088990d3636209bd3854545bad0e3a5a6d7c79" + }, + { + "file": "resources/js/ServicesWorkspace.jsx", + "sha256": "c170b195ccd78aa74f283a91b0b4f4cd93aea4677e3aaefe0b50af46f7e31669" + }, + { + "file": "resources/views/geography-workspace.blade.php", + "sha256": "2454e9ee673ebaebc3081a007ede945d7867d055ce534f92ee0bcdf2bd03f5c1" + }, + { + "file": "public/geography-workspace.mjs", + "sha256": "d97625c11e7adc76b9436bf743c1f20b145fd15731b320e890fb629bf257fc48" + }, + { + "file": "public/supplier-workspace.mjs", + "sha256": "4c52a469e622e40274a1a151fa110ce4a71e91e621f36da102f54b034911f1ce" + }, + { + "file": "scripts/geography-host-setup.php", + "sha256": "501b89203a558e775d9ffeefd5cb9014f94badb26a06420713e4cad38adc317e" + }, + { + "file": "scripts/geography-composition-proof.php", + "sha256": "849e27686eb7877321ddbe3c3cd2dfaf16c2dba5d26140ddc3d46522a6badb20" + }, + { + "file": "scripts/geography-proof-body.php", + "sha256": "b4404add269d7ee5c9591f43454c8b84b9c556fea3764eb63c3e3ea10931d8ba" + }, + { + "file": "scripts/geography-pagination-proof.php", + "sha256": "f832ed3d1c4d30abf0021dd265419237abee221cb6fd3a070c169b580080675d" + }, + { + "file": "scripts/geography-pagination-body.php", + "sha256": "024d180faf846f329b04173a98df838242c08d2c9d59cb961b9baa9011e1b19c" + }, + { + "file": "scripts/geography-guard-proof.php", + "sha256": "4a356666c08c38c57eb09d65bdc98d333edcf08e76f23731871d9b4da61146cf" + }, + { + "file": "scripts/geography-links-check.mjs", + "sha256": "947e8ca7499c0d585d1872b2dde0e45e87d5db50d7df4a166967039de4d0de85" + }, + { + "file": "scripts/geography-demo-smoke.php", + "sha256": "b333717fb604f94d7b70d1ff5447c39aa992d15ee944874b5fb915b675e42505" + }, + { + "file": "scripts/geography-demo-assets.mjs", + "sha256": "27daf7a712c0edc6b3cf0d15bf4753ba19f4acfaadeeb06e491da27a11802cba" + }, + { + "file": "scripts/receipt-composition-run.mjs", + "sha256": "5a54572c5e786e606aeaa18d9c6f0c1d457cf91289584573c69229dfcb954052" + }, + { + "file": "scripts/receipt-composition-http.php", + "sha256": "87e66cfcb52b13b92b37cb4135940a2b2ece9ad874a49a0a596de5515c47733a" + }, + { + "file": "scripts/receipt-composition-extra.mjs", + "sha256": "3acec90cc49f875d8a7fb72e33184aefc4b01a68120f03d5ed4b14c96263fa7a" + } + ], + "reference": { + "source_sha256": "70996d9a9133785a848de90bedb4bf685e24d8f823cd153c0adc43eac642a292", + "prepared_sha256": "5ed851666f417afb53a7e804a32d703f5432bc6a2d4532e333ebedef5910c98a", + "rows": 20407, + "source_checks_reused": 16, + "source_workbook_modified": false + }, + "pinned_native_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "entity_types": [ + "company", + "unit", + "client", + "supplier" + ], + "scope": { + "purpose": "segmentation_only", + "canonical_addresses_changed": false, + "supplier_financial_review_changed": false, + "dependent_records_propagated": false, + "new_public_rights": [], + "real_grants_applied": false + }, + "demo": { + "company_url": "http://127.0.0.1:8069/qa/enter/actor?open=1&geography=company", + "unit_url": "http://127.0.0.1:8069/qa/enter/actor?open=1&geography=unit", + "client_url": "http://127.0.0.1:8069/qa/enter/actor?module=commercial&open=1&geography=client", + "supplier_url": "http://127.0.0.1:8069/qa/enter/actor?open=1", + "readonly_company_url": "http://127.0.0.1:8069/qa/enter/validator?open=1&geography=company", + "initial_assignments": 0 + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/cartography-preparation-20261103.json", + "sha256": "d48a719a35c5d75781eb33fa324d4ee46d30880b629b82834192cfb87cf7a0c9" + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce" + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "verification_scope": "41 command/access checks retained. Five additional pagination/visibility boundaries use26 prepared reader fixtures. The later country_code=MZ response field is checked by the14 demo probes; the41 checks were not repeated.", + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "target_database_connected": false, + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "previous_demo_data_written": false, + "concurrent_compras_sources_written": false, + "public_rights_changed": false, + "purchasing_activated_at_destination": false, + "publication": false, + "checkpoint": false + }, + "limitations": [ + "Only the new, physically guarded QA composition is enabled. No general destination migration or deployment validation.", + "The supplied workbook is a versioned reference declared INE-validated by the user; its current legal/administrative vigency is not independently verified. Source issues remain blocked and visible.", + "CountryMZ and source identity/version are attached only after an explicit geographic selection. No canonical fiscal/delivery address or supplier eligibility is changed.", + "Client location is company-shared within the authorised module; supplier location uses an explicit native provider and current host unit binding. No cross-unit or cross-provider equivalence is inferred.", + "Segmentation reports explicit current-version locations only; they do not represent counts of all registered clients or suppliers.", + "Catalogue pages25, history pages15; cross-book supplier reports validate authorised names in bounded batches100 and expose up to25 entries with a cursor. Sustained-load capability is not validated.", + "No source-correction/version-publication workflow, historical-location migration, foreign-country catalogue or integration with unrelated financial reports is declared delivered.", + "Owner/runtime least privilege separation and visual review remain pending." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/geography-links-20261103.json b/docs/proofs/geography-links-20261103.json new file mode 100644 index 0000000..b83864f --- /dev/null +++ b/docs/proofs/geography-links-20261103.json @@ -0,0 +1,17 @@ +{ + "passed": true, + "checks": 8, + "names": [ + "company opens the shared selector", + "unit opens the shared selector", + "client opens the shared selector", + "disabled composition hides location link", + "absent capability hides location link", + "unsaved client has no location target", + "unrecognised entity cannot generate a target", + "noninteger record ID is refused" + ], + "source": "resources/js/GeographyLink.jsx", + "sha256": "1bad1cfbd2568cce7e9ee21e306f10465194f579a152b48187c6f6133533493a", + "visual_review": false +} diff --git a/docs/proofs/invoice-budget-writer-manifest-20261103.json b/docs/proofs/invoice-budget-writer-manifest-20261103.json new file mode 100644 index 0000000..9d38c1b --- /dev/null +++ b/docs/proofs/invoice-budget-writer-manifest-20261103.json @@ -0,0 +1,38 @@ +{ + "passed": true, + "kind": "source_copy_fingerprint_supplement", + "sources": [ + { + "name": "BudgetContext", + "file": "packages/budget-control/src/BudgetContext.php", + "sha256": "200b23fa560cc967bf6c9ccc1387ee9fefd9933f965811f8a4a0ab5f74f12e04" + }, + { + "name": "BudgetControl", + "file": "packages/budget-control/src/BudgetControl.php", + "sha256": "1349d1ab4ab58a83c9abbf43549ebe7e4ed77717ed5463a2defac748cf7b9a31" + }, + { + "name": "BudgetFailure", + "file": "packages/budget-control/src/BudgetFailure.php", + "sha256": "30ec4c7a5b45e5980ca517d167aa45e89f22a3429c76365fa1c1a94db5f4d8e0" + } + ], + "probes": [ + { + "source_copy_matches": true, + "runtime_reflection_verified": false + }, + { + "source_copy_matches": true, + "runtime_reflection_verified": false + } + ], + "runtime_probe_limit": "Standalone runtime reflection probe exceeded its30s limit; private diagnostics retained. No business commands were executed or repeated.", + "invoice_business_proof": { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec" + }, + "business_commands_repeated": false, + "financial_commands_executed": 0 +} diff --git a/docs/proofs/invoice-home-20261103.json b/docs/proofs/invoice-home-20261103.json new file mode 100644 index 0000000..8fb81f2 --- /dev/null +++ b/docs/proofs/invoice-home-20261103.json @@ -0,0 +1,15 @@ +{ + "passed": true, + "checks": 6, + "names": [ + "invoice view and capability expose link", + "missing right hides link", + "another unit right cannot expose link", + "disabled composition hides link", + "unit selection required", + "existing order and receipt navigation remains available" + ], + "source": "resources/js/PurchasingHome.jsx", + "sha256": "f34bf1060bf987bd1b22e999e6ca05d76a3004607b8f670f580de37ddd847bd0", + "visual_review": false +} diff --git a/docs/proofs/invoice-matching-progress-20261103.json b/docs/proofs/invoice-matching-progress-20261103.json new file mode 100644 index 0000000..4b2e188 --- /dev/null +++ b/docs/proofs/invoice-matching-progress-20261103.json @@ -0,0 +1,245 @@ +{ + "date": "2026-11-03T19:01:41.018Z", + "increment": "SGF-INVOICE-MATCHING-PROGRESS-QA-v1", + "passed": true, + "functional_code": true, + "checks": 47, + "tests": { + "available": { + "file": "private/invoice-progress-read-e286efd6035f/invoice-progress-read-result.json", + "sha256": "617a558ebdb78d15631fc5b482af3c609ee6c949840fbb9cd667d785eba3cc6a", + "checks": 14, + "result": { + "passed": true, + "checks": [ + "authorised order exposes one matching projection per original line", + "native source order and accepted physical quantity are preserved", + "accepted unbilled1UN is available without inventing invoice or reservation", + "procurement and warehouse cannot read economic matching projection", + "foreign or unknown order remains outside authorised origin", + "unmapped unit cannot reuse matching projection", + "obsolete context header cannot read matching projection", + "single observed state yields same original source revision before UI capability decoration", + "disabled projection preserves original revision and invoice display", + "pending70 does not reserve or consume remaining60 after validated40", + "remaining quantity cannot exceed frozen order even with extra accepted input", + "existing return and reversal facts reduce accepted matching capacity", + "read deficit is explicit and remaining quantity is not negative", + "all reused source tables and sequences unchanged by read projection" + ], + "variant": "available", + "order_id": 1, + "quantities": { + "line_id": 1, + "description": "Material recepcao QA", + "unit": "UN", + "ordered_milli": 1000, + "accepted_milli": 1000, + "returned_milli": 0, + "reversed_milli": 0, + "accepted_net_milli": 1000, + "validated_milli": 0, + "pending_milli": 0, + "remaining_milli": 1000, + "deficit_milli": 0 + }, + "financial_commands_repeated": 0, + "before_sha256": "a1e492f62b0dabc990a39c512bbff1be3a235c52b1301eeef81ef15d2979a1d7", + "after_sha256": "a1e492f62b0dabc990a39c512bbff1be3a235c52b1301eeef81ef15d2979a1d7", + "tables_checked": 142, + "new_right_names": [], + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "partial": { + "file": "private/invoice-progress-read-34534a38acd7/invoice-progress-read-result.json", + "sha256": "c8a53a904bd88f0e081f8955f3d3591566f33dbc43b043c5b1d0b81340ffcc72", + "checks": 16, + "result": { + "passed": true, + "checks": [ + "authorised order exposes one matching projection per original line", + "native source order and accepted physical quantity are preserved", + "validated40+60 exhaust1UN while incompatible pending70 remains separately visible", + "original pending document is neither hidden rewritten nor deducted as a reservation", + "read discrepancy does not replace original independent-review permission decision", + "procurement and warehouse cannot read economic matching projection", + "foreign or unknown order remains outside authorised origin", + "unmapped unit cannot reuse matching projection", + "obsolete context header cannot read matching projection", + "single observed state yields same original source revision before UI capability decoration", + "disabled projection preserves original revision and invoice display", + "pending70 does not reserve or consume remaining60 after validated40", + "remaining quantity cannot exceed frozen order even with extra accepted input", + "existing return and reversal facts reduce accepted matching capacity", + "read deficit is explicit and remaining quantity is not negative", + "all reused source tables and sequences unchanged by read projection" + ], + "variant": "partial", + "order_id": 2, + "quantities": { + "line_id": 2, + "description": "Material QA MAIN", + "unit": "UN", + "ordered_milli": 1000, + "accepted_milli": 1000, + "returned_milli": 0, + "reversed_milli": 0, + "accepted_net_milli": 1000, + "validated_milli": 1000, + "pending_milli": 700, + "remaining_milli": 0, + "deficit_milli": 0 + }, + "financial_commands_repeated": 0, + "before_sha256": "507ce4a1388db703972b546aa74bbe563ad3e7e484546f5296f71d513471abc9", + "after_sha256": "507ce4a1388db703972b546aa74bbe563ad3e7e484546f5296f71d513471abc9", + "tables_checked": 127, + "new_right_names": [], + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "ui": { + "file": "private/invoice-progress-read-34534a38acd7/invoice-progress-ui.json", + "sha256": "03a349940a85b771617fefcd0f63bce4a6473b111d7cef56d11788cc6e9ffa5b", + "checks": 11, + "result": { + "passed": true, + "checks": [ + "milli quantities render exact three decimals without floating rounding", + "unsafe or fractional milli quantities are refused in display", + "pending overlap warning compares original quantity with actual remaining quantity", + "validated invoice is not warned as a new pending claim", + "other pending documents do not reserve remaining quantity in UI", + "quantity deficit remains explicit without negative available value", + "real invoice module wires matching capacity next to explicit line choice", + "real invoice module shows overlap note without changing document state", + "remaining capacity does not prefill or choose invoice quantity", + "opening matching projection never registers validates or recognises a document", + "late invoice history response cannot overwrite latest requested page" + ], + "dom_simulation": true, + "business_commands": 0, + "visual_review": false + } + }, + "demo": { + "file": "private/receipt-composition-9ec0a8e493ea/invoice-progress-demo.json", + "sha256": "9171093f9b0b7815af155989f43331074018373f55d773443d9299009938197f", + "checks": 6, + "result": { + "passed": true, + "checks": [ + "new demo contains no main requests or invoices", + "native-authorised finance workspace remains available", + "empty invoice workspace invents no matching source", + "served matching module matches supplier-invoice-workspace.mjs", + "served matching module matches invoice-matching.mjs", + "demo probes preserve request invoice audit and permission data" + ], + "before": "253435d4c1d4231b4334eb3f66e200f15c93b7e85d0c61e74b882e552adae94c", + "after": "253435d4c1d4231b4334eb3f66e200f15c93b7e85d0c61e74b882e552adae94c", + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/InvoiceMatchingProgress.php", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e" + }, + { + "file": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4" + }, + { + "file": "config/receipt_qa.php", + "sha256": "37bbd9055f1fd289e69e7ab328b8be2b2f1d0a553678301788d4d8181464fbcc" + }, + { + "file": "public/invoice-matching.mjs", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c" + }, + { + "file": "public/supplier-invoice-workspace.mjs", + "sha256": "a05b4f56151b8bc9735a0ba2ce47b475e22623aabb8be99a98290860efd6ae9e" + } + ], + "pinned_native_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "authority": { + "new_right_names": [], + "new_writers": 0, + "native_validation_unchanged": true, + "state_definition_and_preview_confirmation_unchanged": true, + "source_revision_equivalent": true, + "pending_quantities_reserved": false, + "automatic_quantity_selection": false, + "original_pending_document_preserved": true + }, + "read_projection": { + "two_aggregate_queries_for_quantity_facts": true, + "physical_corrections_reused_from_original_state": true, + "display_state_observed_once": true, + "full_dependency_revision_still_materialises_source_state": true, + "invoice_history_latest_response_wins": true + }, + "regression": { + "completed_books_reused": true, + "financial_commands_repeated": 0, + "available_milli": 1000, + "after_validated40_60_remaining_milli": 0, + "pending70_milli": 700, + "all_source_tables_and_sequences_unchanged": true + }, + "demo": { + "port": 8081, + "entry": "http://127.0.0.1:8081/qa/enter/issuer?open=1", + "initial_main_requests": 0, + "initial_invoices": 0 + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/request-history-composition-20261103.json", + "sha256": "564e0fdbc6a7a1142e72dbf835a96dadf0363d3dc963fc4cdc0a40bd05b8c26e" + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec" + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "target_database_connected": false, + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "previous_demo_data_written": false, + "public_rights_changed": false, + "publication": false, + "checkpoint": false + }, + "limitations": [ + "The quantity projection is read-only. A review permission or warning is not a promise that native validation will succeed.", + "Pending document quantities are shown separately and do not reserve matching capacity. No rejection correction or credit note is introduced.", + "The full order dependency state remains materialised for its original revision. Removing a duplicate observation is not a load benchmark or complete pagination/memory optimisation.", + "Source books contain one order line and existing invoice cases. Larger order histories, query/time/memory benchmarks and indexes are not validated by this trial.", + "Return/reversal boundary arithmetic is checked without repeating physical correction commands; complete physical correction suites remain their own proof.", + "DOM tests are not browser rendering visual or accessibility review. The React/Vite build is unchanged; served static module hashes and syntax are checked.", + "Operational policy, deployment compatibility, sustained load and capacity remain pending." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/invoice-payable-flow-inspection-20261103.json b/docs/proofs/invoice-payable-flow-inspection-20261103.json new file mode 100644 index 0000000..76901dc --- /dev/null +++ b/docs/proofs/invoice-payable-flow-inspection-20261103.json @@ -0,0 +1,608 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "011ccd6ac148bbbeb8c9335af9c31c1b4e3f76ee29da0d3f9f1828d1c883a0b7", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "2c946b782a62e81b3ec637e2f72590ed6a6c0774f04a8082171f9c898d37c2db", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "4bfff0204e67f21a6ddd785d64e7c91bd63bf65742add42fc3aa7f943ab5a6e4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_screen", + "repository": "sgf", + "path": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "e359ab81d73ddcbf80117a6f3f1ec6b493da90c60cd2b42bf3648322baf47841", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_screen", + "repository": "sgf", + "path": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/invoice-payable-matrix-20261103.json b/docs/proofs/invoice-payable-matrix-20261103.json new file mode 100644 index 0000000..761e9da --- /dev/null +++ b/docs/proofs/invoice-payable-matrix-20261103.json @@ -0,0 +1,1620 @@ +{ + "date": "2026-11-03T13:12:50.997Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "011ccd6ac148bbbeb8c9335af9c31c1b4e3f76ee29da0d3f9f1828d1c883a0b7", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "4bfff0204e67f21a6ddd785d64e7c91bd63bf65742add42fc3aa7f943ab5a6e4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "2c946b782a62e81b3ec637e2f72590ed6a6c0774f04a8082171f9c898d37c2db", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_invoice_controller", + "file": "app/Modules/Purchasing/InvoiceController.php", + "repository": "sgf", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_invoice_screen", + "file": "resources/views/supplier-invoice-workspace.blade.php", + "repository": "sgf", + "sha256": "e359ab81d73ddcbf80117a6f3f1ec6b493da90c60cd2b42bf3648322baf47841", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53" + } + ], + "current_hash_has_matching_recorded_evidence": false + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_obligation_controller", + "file": "app/Modules/Purchasing/ObligationController.php", + "repository": "sgf", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_screen", + "file": "resources/views/supplier-obligation-workspace.blade.php", + "repository": "sgf", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 72 + } + ], + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/invoice-progress-flow-20261103.json b/docs/proofs/invoice-progress-flow-20261103.json new file mode 100644 index 0000000..c2718be --- /dev/null +++ b/docs/proofs/invoice-progress-flow-20261103.json @@ -0,0 +1,762 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "e1d670252e954d345ced9919b8b448d2d747e7a44ded3df4342d79499f9a3514", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_screen", + "repository": "sgf", + "path": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_screen", + "repository": "sgf", + "path": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "ce0dc4159d42efcff9e09ec99a2ce5a2d378a215d4a853a37417a0ebf5445506", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_workspace", + "repository": "sgf", + "path": "app/Modules/Purchasing/WorkspaceNavigation.php", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_navigation", + "repository": "sgf", + "path": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_picker", + "repository": "sgf", + "path": "public/supplier-picker-model.mjs", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_search_ui", + "repository": "sgf", + "path": "public/sourcing-workspace.mjs", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/DossierController.php", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_screen", + "repository": "sgf", + "path": "resources/views/purchasing-dossier.blade.php", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_ui", + "repository": "sgf", + "path": "public/purchasing-dossier.mjs", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_catalogue", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptCatalogue.php", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_workspace_ui", + "repository": "sgf", + "path": "public/receipt-workspace.mjs", + "sha256": "86421d30dc9868b10da2153f8bf0b50d9904ab5ccccbf9813464083ae1e20bd2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentsController.php", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_storage", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_ui", + "repository": "sgf", + "path": "public/supplier-documents.mjs", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_process_navigation", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessNavigation.php", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_focus", + "repository": "sgf", + "path": "public/purchasing-focus.mjs", + "sha256": "434319b8de23f5d6892666bd53232d463a0d458fe948cc6d7b476ad1228fafb6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stage_history", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessHistory.php", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_workspace_ui", + "repository": "sgf", + "path": "public/supplier-invoice-workspace.mjs", + "sha256": "a05b4f56151b8bc9735a0ba2ce47b475e22623aabb8be99a98290860efd6ae9e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_workspace_ui", + "repository": "sgf", + "path": "public/supplier-obligation-workspace.mjs", + "sha256": "c2608e3cab7cd1810437a3a978e6f6ccbf2600a83dd0a39bd38510db8249f551", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_history_ui", + "repository": "sgf", + "path": "public/request-history.mjs", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_workspace_ui", + "repository": "sgf", + "path": "public/request-workspace.mjs", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_matching_progress", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceMatchingProgress.php", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_matching_ui", + "repository": "sgf", + "path": "public/invoice-matching.mjs", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. A subsequent scope fix filters request/sourcing audit events in SQL before limits/counts/pages, closing an alternate downstream financial-history exposure without changing original audit or writers. Empty initial supplier searches now survive middleware normalisation while closed-award and permission guards remain. Completed canonical history book is reused read-only with142 tables/sequences intact. Demo8080 removes the direct request-history25-event cap using bounded cursor pages25/100, own-stage SQL filtering and encrypted request/actor/context/size-bound cursors with600-second lifetime. Initial page is reused; history refresh does not reset unsaved request fields.127 original event ids traverse once despite a new head note; refresh includes128. Audit-volume fixtures are not operational request revisions. An inherited100MZN order setup was preserved and removed from future history harness runs. This is not a persistent MVCC snapshot, visual acceptance, sustained-load or deployment validation." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Demo8079 fixes the actual form-to-picker binding and blank initial article search. DOM-to-real-HTTP proof selects an article, transmits its revision, previews, confirms1UN and recovers a deliberately lost response with201/200, one receipt/movement. This is not browser visual acceptance or a new concurrency/load trial. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8081 exposes per-line ordered/accepted/returned/reversed/validated/pending/remaining quantities using two aggregate fact queries and original correction values. Pending documents do not reserve quantity; overlap is a read warning, not a replacement for native validation. Two completed QA books are reused read-only with all tables/sequences unchanged. The display revision uses one original state observation before capability decoration; mutation/state definitions are unchanged. Full dependency materialisation, large invoice-history scaling, visual review, sustained load and deployment remain pending." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/invoice-progress-matrix-20261103.json b/docs/proofs/invoice-progress-matrix-20261103.json new file mode 100644 index 0000000..5a0e7c3 --- /dev/null +++ b/docs/proofs/invoice-progress-matrix-20261103.json @@ -0,0 +1,2432 @@ +{ + "date": "2026-11-03T19:02:33.871Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "e1d670252e954d345ced9919b8b448d2d747e7a44ded3df4342d79499f9a3514", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "1cb75d7bc03105e0df4211b4470bdc8837f4a659bc65318286228949779d9dc6" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_workspace", + "file": "app/Modules/Purchasing/WorkspaceNavigation.php", + "repository": "sgf", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1" + }, + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_navigation", + "file": "resources/views/partials/purchasing-navigation.blade.php", + "repository": "sgf", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_picker", + "file": "public/supplier-picker-model.mjs", + "repository": "sgf", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_search_ui", + "file": "public/sourcing-workspace.mjs", + "repository": "sgf", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "15ed768992dfd8858df65ce7fa41c733906875aec98b1c347169d83571cde52e" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_controller", + "file": "app/Modules/Purchasing/DossierController.php", + "repository": "sgf", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_screen", + "file": "resources/views/purchasing-dossier.blade.php", + "repository": "sgf", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_ui", + "file": "public/purchasing-dossier.mjs", + "repository": "sgf", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_documents", + "file": "app/Modules/Purchasing/SupplierDocumentsController.php", + "repository": "sgf", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_document_storage", + "file": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "repository": "sgf", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "a8c7fbe18d9ccd6a7e6fd27275e8827ac6a75f4b147ec02b06fabc30a15f29c8" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_document_ui", + "file": "public/supplier-documents.mjs", + "repository": "sgf", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "70e96bc60238efe6bb8a65297f7412fee9abb143dd96805713bb1deafc784820" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_process_navigation", + "file": "app/Modules/Purchasing/ProcessNavigation.php", + "repository": "sgf", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_focus", + "file": "public/purchasing-focus.mjs", + "repository": "sgf", + "sha256": "434319b8de23f5d6892666bd53232d463a0d458fe948cc6d7b476ad1228fafb6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "77a18d186c8ebb5065cf60816b7fd8d11a37fe801296a60f06ff0a6cf590b2e4" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "434319b8de23f5d6892666bd53232d463a0d458fe948cc6d7b476ad1228fafb6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stage_history", + "file": "app/Modules/Purchasing/ProcessHistory.php", + "repository": "sgf", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_history_ui", + "file": "public/request-history.mjs", + "repository": "sgf", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_workspace_ui", + "file": "public/request-workspace.mjs", + "repository": "sgf", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "e878fc3c7bc5ba24aa2b17fe41ffeda3267721b5beb2a1a3a0cb11f56d7dc93d" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "384c67310d2a7adab7a94273bab385dff74af76c293622bb3c0d087245d7e6d8" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-search-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 51 + } + ], + "sha256": "388e738da7e9b3e7f521c8d67f85dd4ef34869c74daf0c04c09067b9fbde5242", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 52 + } + ], + "sha256": "d5709128ee45b7ee1397695b06502b9386dccd13779203c13abbd54281552068", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-history-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 36 + } + ], + "sha256": "564e0fdbc6a7a1142e72dbf835a96dadf0363d3dc963fc4cdc0a40bd05b8c26e", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. A subsequent scope fix filters request/sourcing audit events in SQL before limits/counts/pages, closing an alternate downstream financial-history exposure without changing original audit or writers. Empty initial supplier searches now survive middleware normalisation while closed-award and permission guards remain. Completed canonical history book is reused read-only with142 tables/sequences intact. Demo8080 removes the direct request-history25-event cap using bounded cursor pages25/100, own-stage SQL filtering and encrypted request/actor/context/size-bound cursors with600-second lifetime. Initial page is reused; history refresh does not reset unsaved request fields.127 original event ids traverse once despite a new head note; refresh includes128. Audit-volume fixtures are not operational request revisions. An inherited100MZN order setup was preserved and removed from future history harness runs. This is not a persistent MVCC snapshot, visual acceptance, sustained-load or deployment validation.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "7ed4b9292e214b11c42af1eae3fb63d967a7e15f026648c957f8a5b54f211f69" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "51a0fa060fcce212646cf22332df352d90a5994cb7785eedc789585e02569616" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "40e7db8ac3d47b60f46fb5b8c623dec9ff9716bc9f2e1ea400d0751f0d0cf890" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_catalogue", + "file": "app/Modules/Purchasing/ReceiptCatalogue.php", + "repository": "sgf", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_workspace_ui", + "file": "public/receipt-workspace.mjs", + "repository": "sgf", + "sha256": "86421d30dc9868b10da2153f8bf0b50d9904ab5ccccbf9813464083ae1e20bd2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "f286a99bb0df5c6080e8104d501707e5a9e13046d5dd7144dec32bf0817a92a0" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "10b412a5ec6c973152f165b34caacc685e25bcf2eb0e6ba2f7f7e58df4e1f00a" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "a128926d876ae10eb2a17ec2410ba99282d782f03bb9642cbdcad93d548ce002" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "f0f242538e4131910d612da1f5b22e4955f3bdc58d4c4121d7b1242a5eb52df5" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "86421d30dc9868b10da2153f8bf0b50d9904ab5ccccbf9813464083ae1e20bd2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_documents", + "file": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "repository": "sgf", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-workspace-completion-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "59bb66df5d5e12f898045669a0ad24664c3d09f2d3ab6cf70f4f13d6a34c6548", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 58 + } + ], + "sha256": "b820a6b355450a79c9f244ce8eb6950e7c1cbe4427bf85bca772fb0fc5c085d2", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Demo8079 fixes the actual form-to-picker binding and blank initial article search. DOM-to-real-HTTP proof selects an article, transmits its revision, previews, confirms1UN and recovers a deliberately lost response with201/200, one receipt/movement. This is not browser visual acceptance or a new concurrency/load trial. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_invoice_controller", + "file": "app/Modules/Purchasing/InvoiceController.php", + "repository": "sgf", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa" + }, + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_invoice_screen", + "file": "resources/views/supplier-invoice-workspace.blade.php", + "repository": "sgf", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "396cea98bce6c2ccff510efd917e2f336ba29657ea5a8277116c41bd70c92e15" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_workspace_ui", + "file": "public/supplier-invoice-workspace.mjs", + "repository": "sgf", + "sha256": "a05b4f56151b8bc9735a0ba2ce47b475e22623aabb8be99a98290860efd6ae9e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "68671400153a97387f77ad0cddbc0f7f6367caeaebef8fc219d84fc8cf118eb3" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "5f0112c38e805fe9ed2e733053bae77f8dd4e3e1cb6b9cba8e4bc7bb469205d7" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "f767347371e2dc1573ec29a926509c87bcdea3ec09257a6b22395fc0cf01366f" + }, + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "a05b4f56151b8bc9735a0ba2ce47b475e22623aabb8be99a98290860efd6ae9e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_matching_progress", + "file": "app/Modules/Purchasing/InvoiceMatchingProgress.php", + "repository": "sgf", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_matching_ui", + "file": "public/invoice-matching.mjs", + "repository": "sgf", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/invoice-matching-progress-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 47 + } + ], + "sha256": "6920219ec33e09abc951c10d8d862e87495b99cd77162f3aea729dcca597b66c", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8081 exposes per-line ordered/accepted/returned/reversed/validated/pending/remaining quantities using two aggregate fact queries and original correction values. Pending documents do not reserve quantity; overlap is a read warning, not a replacement for native validation. Two completed QA books are reused read-only with all tables/sequences unchanged. The display revision uses one original state observation before capability decoration; mutation/state definitions are unchanged. Full dependency materialisation, large invoice-history scaling, visual review, sustained load and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_obligation_controller", + "file": "app/Modules/Purchasing/ObligationController.php", + "repository": "sgf", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_screen", + "file": "resources/views/supplier-obligation-workspace.blade.php", + "repository": "sgf", + "sha256": "ce0dc4159d42efcff9e09ec99a2ce5a2d378a215d4a853a37417a0ebf5445506", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "cbcef35273b6f54158f60b67f9c2b64c0a93e47cb01ca302b525479ce051e927" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "ce0dc4159d42efcff9e09ec99a2ce5a2d378a215d4a853a37417a0ebf5445506" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_workspace_ui", + "file": "public/supplier-obligation-workspace.mjs", + "repository": "sgf", + "sha256": "c2608e3cab7cd1810437a3a978e6f6ccbf2600a83dd0a39bd38510db8249f551", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "eeb450e38dad72d9c38538ed363202d0a6cfcec466c61171028108f1bc243837" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "8f5154636553130f950d09b46ff917f91250516e10a03e93971cbe537c67f082" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "c2608e3cab7cd1810437a3a978e6f6ccbf2600a83dd0a39bd38510db8249f551" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 72 + } + ], + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/ledger-receipt-recovery-20261103.json b/docs/proofs/ledger-receipt-recovery-20261103.json new file mode 100644 index 0000000..6ab0efa --- /dev/null +++ b/docs/proofs/ledger-receipt-recovery-20261103.json @@ -0,0 +1,127 @@ +{ + "increment": "LEDGER-RECEIPT-RECOVERY-v1", + "date": "2026-11-03T06:51:10.616Z", + "functional_code": true, + "checks": 29, + "private_evidence": [ + { + "file": "private/ledger-922dac0c0596/ledger-receipt-cases.json", + "sha256": "faba42dd362dfc884c2fd274e4c8acf374fee279177908bbed851c73c0385651", + "result": { + "passed": true, + "checks": 10, + "mode": { + "isolation": "repeatable read", + "read_only": "on" + }, + "writer_locks": 0, + "no_duplicate_or_write": true, + "source_rights_unchanged": true + } + }, + { + "file": "private/ledger-922dac0c0596/receipt-http-final.json", + "sha256": "56c3ef57beb52d4620b2868717f571bf172762ed484e697d7708548c4cb7fb7a", + "result": { + "passed": true, + "checks": 16, + "actual_http": true, + "no_business_commands": true, + "visual_review": false + } + }, + { + "file": "private/ledger-922dac0c0596/receipt-form.json", + "sha256": "b5a3ed4a80909b7563b3d5ec637be4affde6a938fa05bee16d1be02552f4d32c", + "result": { + "passed": true, + "checks": 3, + "all_rendered_scripts_compile": true, + "mock_get_only": true, + "actual_browser": false + } + } + ], + "previous_manifest": { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "private_artifacts_verified": 16 + }, + "sources": [ + { + "file": "packages/general-ledger/src/PayableJournal.php", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + }, + { + "file": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + }, + { + "file": "app/Modules/Accounting/GeneralLedgerController.php", + "sha256": "5e4e8ff9b47ad49a960be9332d275eb3e8e05aa3325f810efada6444af9363c5" + }, + { + "file": "routes/web.php", + "sha256": "fea1121bee65e36abbaf7947363a57d1f520a7b302939d861509724bea54d89d" + }, + { + "file": "scripts/ledger-cost-proof.php", + "sha256": "7669ba664da0b1697e39165b318f6e6a460ec1f695bbe183ebd4a2011959f8ad" + }, + { + "file": "scripts/ledger-receipt-proof.php", + "sha256": "ed32245f22b8f92dafe0caea0892eada6cc1380b60fe0eea5a215f608b3938ee" + }, + { + "file": "scripts/ledger-receipt-http.mjs", + "sha256": "aff5448633a098f8752fbd76a3c4e481dc87956cd8dc12d99b9db53f2c14b16e" + }, + { + "file": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "file": "resources/views/accounting/general-ledger.blade.php", + "sha256": "08c4a0ffb33ff1928843af486595f13b4a16d815e32a3dfb7e0f8a3de3893133" + }, + { + "file": "resources/views/accounting/cost-ledger.blade.php", + "sha256": "d4efd89e8c01639c195ff3839f1683733a05845b62fb6a917079729e92ee931f" + }, + { + "file": "resources/views/accounting/sales-ledger.blade.php", + "sha256": "073920e59860fe63a4dd251dd4fef0cec1182e56eb369fd16563583c22e74035" + }, + { + "file": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + }, + { + "file": "resources/views/accounting/ledger-composition.blade.php", + "sha256": "2f97c561f34c62f1e65e572298e01dcc4dd5f5bfa6ffa644ced690ea704e1bfb" + }, + { + "file": "docs/GENERAL_LEDGER_RECEIPT_RECOVERY_DELIVERY.md", + "sha256": "7a31c5312867f7bf2750d2136bce1aea393cf5e3f12df562b09607a49a9f66c5" + }, + { + "file": "README.md", + "sha256": "4da32de3fc35e7345dce0e8d1acb7f9ddaed0b912cb6c5259d04948ad126376c" + } + ], + "preservation": { + "old_demos_not_reset": true, + "six_records_untouched": true, + "blocked_cache_untouched": true, + "no_real_grants": true, + "no_migrations": true, + "no_publication": true, + "no_checkpoint": true + }, + "limits": { + "visual_review_pending": true, + "sustained_load_validated": false, + "deployment_capacity_validated": false, + "read_only_receipt_not_current_source_conference": true + } +} \ No newline at end of file diff --git a/docs/proofs/module-audit-preservation-20261103.json b/docs/proofs/module-audit-preservation-20261103.json new file mode 100644 index 0000000..93de5a8 --- /dev/null +++ b/docs/proofs/module-audit-preservation-20261103.json @@ -0,0 +1,7 @@ +{ + "passed": true, + "matrix_no_uncovered_known_hash_drift": true, + "association_consolidated_sources_unchanged": true, + "receipt_targeted_test_and_source_hashes_match": true, + "database_connections": 0 +} \ No newline at end of file diff --git a/docs/proofs/module-flow-complete-20261103.json b/docs/proofs/module-flow-complete-20261103.json new file mode 100644 index 0000000..3c1c2d2 --- /dev/null +++ b/docs/proofs/module-flow-complete-20261103.json @@ -0,0 +1,426 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "c9fd8ca531353566addf81b8ae091649b2f0f62ec0692a6790498714f239e2c2", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Requisition core exists in Compras; the SGF adapter/interface was installed only in isolated demonstration8039. This root source tree has no SGF requisition adapter. Do not confuse the demonstration with a generally installed composition or activate a candidate." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Native receipt workflow delegates once to the shared writer; SGF observes the actual movement in QA. Preparing/confirming receipts in the SGF interface and an installed procurement composition remain pending." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Shared paged reader works in both QA hosts, with source revisions and explicit bindings. Operational bindings/installation and stock valuation remain pending; missing source is not zero." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Authorised QA source effects use one writer: supplier recognition/settlement/correction, sales and receivable allocations/reversal, direct cost and its correction, industrial result1800 and its explicit atomic correction to1820 with residual300 excluded. New corrected SGF composition reconciles11 journals/23 lines and gross8725 with joint reviewed close. Real chart/tax policy, stock valuation, payroll, additional correction chains, reopening, historical/operational cutover and deployment remain excluded." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/module-flow-geography-20261103.json b/docs/proofs/module-flow-geography-20261103.json new file mode 100644 index 0000000..35c10ba --- /dev/null +++ b/docs/proofs/module-flow-geography-20261103.json @@ -0,0 +1,580 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "1e1f2114e4543a81344ec58bb889e426164c60e50922d2a197a170a85036bc7d", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "1ff96d8bdbae2a3fd44feaf9520d1c28edbb8e14728ef4c881b6187e41878d62", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "633933146ae8292f2bbc6da2b52ef8fbb9c820a853d27cf23f2783d3cfb159d6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "2c946b782a62e81b3ec637e2f72590ed6a6c0774f04a8082171f9c898d37c2db", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "eab95525462191f4895c3ffa91ce99ac824c5af541f7576fbae7527575559e9b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "4bfff0204e67f21a6ddd785d64e7c91bd63bf65742add42fc3aa7f943ab5a6e4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/module-flow-industrial-correction-update-20261103.json b/docs/proofs/module-flow-industrial-correction-update-20261103.json new file mode 100644 index 0000000..201840c --- /dev/null +++ b/docs/proofs/module-flow-industrial-correction-update-20261103.json @@ -0,0 +1,370 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "6f8270c0376b207bf592a405d6223f4b690d98b6b083194355df93cf256895f3", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "e9ffd3e870f68187b53dacd44e47be24165e4da63cea114f8b5ca312e900c353", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "6d090142dc4625a47d3cdeb09dcaa482a80bbc58c945d429e340888b792e3492", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Only basic requisitions demonstrated in 8039; full procurement composition not transferred." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "source_not_integrated", + "operational_integration_validated": false, + "gap": "No common SGF receipt/stock adapter demonstrated." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "source_not_integrated", + "operational_integration_validated": false, + "gap": "Common scoped reader, authoritative writer and SGF warehouse mapping pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Does not assume every purchase is stock; existing eligibility/partial receipt rules must be preserved." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Synthetic core exists; common operational composition and historical source mapping remain delimited." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Synthetic payments/allocations exist; no bank execution or complete bank reconciliation delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "planned", + "operational_integration_validated": false, + "gap": "Linking observed material to a physical movement is not implemented; do not replay old observations." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Test issuance exists; real fiscal issuance remains guarded. Direct service origins remain valid." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Synthetic receipts exist; fiscal receipt/bank reconciliation not presumed." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Authorised QA source effects use one writer: supplier recognition/settlement/correction, sales and receivable allocations/reversal, direct cost and its correction, industrial result1800 and its explicit atomic correction to1820 with residual300 excluded. New corrected SGF composition reconciles11 journals/23 lines and gross8725 with joint reviewed close. Real chart/tax policy, stock valuation, payroll, additional correction chains, reopening, historical/operational cutover and deployment remain excluded." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/module-flow-industrial-update-20261103.json b/docs/proofs/module-flow-industrial-update-20261103.json new file mode 100644 index 0000000..222c24a --- /dev/null +++ b/docs/proofs/module-flow-industrial-update-20261103.json @@ -0,0 +1,363 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "49c5c87cc1f7cbf63dadabdc81d92a8a04a98615d0c86d2acb6d097923c4c615", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "5a07462a3f4cc06776fce3da98b42b188f26f1f32c3c7cb4bc37d46408b3be17", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "cfd3f1c77c108b725e9328b5bfe4839483c6b27483ceb6182c1fdf66e36e0575", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "6d090142dc4625a47d3cdeb09dcaa482a80bbc58c945d429e340888b792e3492", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "c7bd6de3ad850dbfe655c06a3f1f2d27507460260b7faa658fce4231756e9ffc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "39cceb9ec129dc36ae272e5da07538a6e2d7be9bd536e48d4eed3c13a22045ad", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "615e993a66794ab54012c4f6b02106ce1309d31d4066437714275f064d0a68a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "7e72f7ed48dede5e8b719e906dc0ea104e1b19846f4b288632f65e4980c4662d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "d705d844582005cce3c777057075b38f8f97885b898463162163cd0d5300f90a", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "a8655379552022c561f25b519e1ba30841afac350aa66b585c237d36b78aa2be", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Only basic requisitions demonstrated in 8039; full procurement composition not transferred." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "source_not_integrated", + "operational_integration_validated": false, + "gap": "No common SGF receipt/stock adapter demonstrated." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "source_not_integrated", + "operational_integration_validated": false, + "gap": "Common scoped reader, authoritative writer and SGF warehouse mapping pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Does not assume every purchase is stock; existing eligibility/partial receipt rules must be preserved." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Synthetic core exists; common operational composition and historical source mapping remain delimited." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Synthetic payments/allocations exist; no bank execution or complete bank reconciliation delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "planned", + "operational_integration_validated": false, + "gap": "Linking observed material to a physical movement is not implemented; do not replay old observations." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Test issuance exists; real fiscal issuance remains guarded. Direct service origins remain valid." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Synthetic receipts exist; fiscal receipt/bank reconciliation not presumed." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Authorised QA source effects use one writer: supplier recognition/settlement/correction, sales and receivable allocations/reversal, direct cost and its correction, industrial result1800 with residual300 excluded. New SGF composition reconciles9 journals/19 lines and gross5105 with joint reviewed close. Real chart/tax policy, stock valuation, payroll, industrial correction, reopening, historical/operational cutover and deployment remain excluded." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/module-flow-ledger-cycle-update-20261102.json b/docs/proofs/module-flow-ledger-cycle-update-20261102.json new file mode 100644 index 0000000..33beadf --- /dev/null +++ b/docs/proofs/module-flow-ledger-cycle-update-20261102.json @@ -0,0 +1,342 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "bbc7a18306d961080db1957ddbe0a68710e8780cf06449f80522077ce95b5ab5", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "a7d956badfaa917d664cb88c3cf6afedbc1b09880c2a00ad4a98823a1cc590f7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "cfd3f1c77c108b725e9328b5bfe4839483c6b27483ceb6182c1fdf66e36e0575", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "6d090142dc4625a47d3cdeb09dcaa482a80bbc58c945d429e340888b792e3492", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "b6c10cb71c30361013f33a11ee8678bfa183737ed143186747793c95cd5eef95", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "2c63f6dcd23f751fb7dce363c415fcc2a44e7dfcb54203dc0e4af55c3e9dbf07", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "fb4aab2d47c4e9e5fb1115a44e796669402b891b56ff3623db725b21b4bcf714", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "ad688290605153e55ef64871b87b5501b7c22102e2a5d051324c04737f439825", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "f3c0994e75820919f0e008b3e532d00082ec18c531e5e10a77da565b08a0f667", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "0096c76526c4c67c49b7a1746c2351027ed478c23eb0454f4d4aa7274f256826", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "e86a54f359b428afe9f3352e80c69342bb24a2e389d3c6286323fbce226e0ffe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Only basic requisitions demonstrated in 8039; full procurement composition not transferred." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "source_not_integrated", + "operational_integration_validated": false, + "gap": "No common SGF receipt/stock adapter demonstrated." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "source_not_integrated", + "operational_integration_validated": false, + "gap": "Common scoped reader, authoritative writer and SGF warehouse mapping pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Does not assume every purchase is stock; existing eligibility/partial receipt rules must be preserved." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Synthetic core exists; common operational composition and historical source mapping remain delimited." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Synthetic payments/allocations exist; no bank execution or complete bank reconciliation delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "planned", + "operational_integration_validated": false, + "gap": "Linking observed material to a physical movement is not implemented; do not replay old observations." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Test issuance exists; real fiscal issuance remains guarded. Direct service origins remain valid." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Synthetic receipts exist; fiscal receipt/bank reconciliation not presumed." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Authorised synthetic cycle implemented in new SGF/SGC QA books: recognition60, confirmed allocation20 and reversal, atomic technical correction pair and reviewed QA period close. Real chart/tax policy, reopening, other source types, historical/operational cutover and deployment remain excluded." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/module-flow-ledger-update-20261102.json b/docs/proofs/module-flow-ledger-update-20261102.json new file mode 100644 index 0000000..f563c42 --- /dev/null +++ b/docs/proofs/module-flow-ledger-update-20261102.json @@ -0,0 +1,321 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "f1386de7b80c720fde48937face5551cd34eb74ef95f98adf041bf765cd8d025", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "4b4db26b7781ef63291e58065c5704324ff26afd48dfbed45ed9db9d54d115bf", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "a7d956badfaa917d664cb88c3cf6afedbc1b09880c2a00ad4a98823a1cc590f7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "cfd3f1c77c108b725e9328b5bfe4839483c6b27483ceb6182c1fdf66e36e0575", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "6d090142dc4625a47d3cdeb09dcaa482a80bbc58c945d429e340888b792e3492", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "b6c10cb71c30361013f33a11ee8678bfa183737ed143186747793c95cd5eef95", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "2c63f6dcd23f751fb7dce363c415fcc2a44e7dfcb54203dc0e4af55c3e9dbf07", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "fb4aab2d47c4e9e5fb1115a44e796669402b891b56ff3623db725b21b4bcf714", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "96f01292bea51228ce7ec317708147a7d5d6a14dc2a97254be9b19b0dbe7099b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "e455092f25ee58d1493219d6a5ea8051929d5f2940132777a476673bf7b2b9f7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "872a64e15d1788e4b1d68eccb3045c6b1d5df88c1e81058719a21d03bd298aa4", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Only basic requisitions demonstrated in 8039; full procurement composition not transferred." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "source_not_integrated", + "operational_integration_validated": false, + "gap": "No common SGF receipt/stock adapter demonstrated." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "source_not_integrated", + "operational_integration_validated": false, + "gap": "Common scoped reader, authoritative writer and SGF warehouse mapping pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Does not assume every purchase is stock; existing eligibility/partial receipt rules must be preserved." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Synthetic core exists; common operational composition and historical source mapping remain delimited." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Synthetic payments/allocations exist; no bank execution or complete bank reconciliation delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "planned", + "operational_integration_validated": false, + "gap": "Linking observed material to a physical movement is not implemented; do not replay old observations." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Test issuance exists; real fiscal issuance remains guarded. Direct service origins remain valid." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Synthetic receipts exist; fiscal receipt/bank reconciliation not presumed." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "First 60 MZN payable recognition journal and two-account extract implemented only in a new isolated SGF QA composition. Real accounting eligibility/chart, native composition, historical posting, correction, closing, full reports and deployment remain excluded." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/module-flow-reconciled-20261103.json b/docs/proofs/module-flow-reconciled-20261103.json new file mode 100644 index 0000000..06ddb9f --- /dev/null +++ b/docs/proofs/module-flow-reconciled-20261103.json @@ -0,0 +1,370 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "bfe30fc7040f9177beb88ab3d42115b96a075add8d30b1daa3fd8e3f5b20172a", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Only basic requisitions demonstrated in 8039; full procurement composition not transferred." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Native receipt workflow delegates once to the shared writer; SGF observes the actual movement in QA. Preparing/confirming receipts in the SGF interface and an installed procurement composition remain pending." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Shared paged reader works in both QA hosts, with source revisions and explicit bindings. Operational bindings/installation and stock valuation remain pending; missing source is not zero." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Authorised QA source effects use one writer: supplier recognition/settlement/correction, sales and receivable allocations/reversal, direct cost and its correction, industrial result1800 and its explicit atomic correction to1820 with residual300 excluded. New corrected SGF composition reconciles11 journals/23 lines and gross8725 with joint reviewed close. Real chart/tax policy, stock valuation, payroll, additional correction chains, reopening, historical/operational cutover and deployment remain excluded." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/module-flow-reconciled-final-20261103.json b/docs/proofs/module-flow-reconciled-final-20261103.json new file mode 100644 index 0000000..9ecdfbd --- /dev/null +++ b/docs/proofs/module-flow-reconciled-final-20261103.json @@ -0,0 +1,426 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "7fad410e844c276be3c86a02b1ac94260735ef99681b9e7c5fc007044df97d51", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Requisition core exists in Compras; the SGF adapter/interface was installed only in isolated demonstration8039. This root source tree has no SGF requisition adapter. Do not confuse the demonstration with a generally installed composition or activate a candidate." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Native receipt workflow delegates once to the shared writer; SGF observes the actual movement in QA. Preparing/confirming receipts in the SGF interface and an installed procurement composition remain pending." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Shared paged reader works in both QA hosts, with source revisions and explicit bindings. Operational bindings/installation and stock valuation remain pending; missing source is not zero." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Authorised QA source effects use one writer: supplier recognition/settlement/correction, sales and receivable allocations/reversal, direct cost and its correction, industrial result1800 and its explicit atomic correction to1820 with residual300 excluded. New corrected SGF composition reconciles11 journals/23 lines and gross8725 with joint reviewed close. Real chart/tax policy, stock valuation, payroll, additional correction chains, reopening, historical/operational cutover and deployment remain excluded." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/module-flow-requisition-composition-20261103.json b/docs/proofs/module-flow-requisition-composition-20261103.json new file mode 100644 index 0000000..9d669b8 --- /dev/null +++ b/docs/proofs/module-flow-requisition-composition-20261103.json @@ -0,0 +1,433 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "b0bd122ba084085e81ec9f74d1dfaa58351f71f4186af7cda996e51e0609ea8c", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "The root SGF composition now mounts the existing shared adapter and interface only in a pinned fresh QA database, with module ownership, context, scoped rights and a navigation link; request100 reserves once and is independently approved. Normal destination remains disabled and demonstration8039 is preserved. Receipt UI and generally installed procurement composition remain pending." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Native receipt workflow delegates once to the shared writer; SGF observes the actual movement in QA. Preparing/confirming receipts in the SGF interface and an installed procurement composition remain pending." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Shared paged reader works in both QA hosts, with source revisions and explicit bindings. Operational bindings/installation and stock valuation remain pending; missing source is not zero." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Authorised QA source effects use one writer: supplier recognition/settlement/correction, sales and receivable allocations/reversal, direct cost and its correction, industrial result1800 and its explicit atomic correction to1820 with residual300 excluded. New corrected SGF composition reconciles11 journals/23 lines and gross8725 with joint reviewed close. Real chart/tax policy, stock valuation, payroll, additional correction chains, reopening, historical/operational cutover and deployment remain excluded." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/module-flow-sgf-orders-20261103.json b/docs/proofs/module-flow-sgf-orders-20261103.json new file mode 100644 index 0000000..9184785 --- /dev/null +++ b/docs/proofs/module-flow-sgf-orders-20261103.json @@ -0,0 +1,510 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "bf3ff0932b8789ed5c6edcc9f869a7d803f8bc16a1156d96f0ed60ba437edaa1", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "84f9db1286058087ecb8cf08c64fcd3afc94c91d1509b985b634a3fcafd81295", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Shared requisition QA and single100MZN reservation remain delivered. A new SGF composition now confers/issues an order from an actually approved native award, records one100MZN source-budget commitment, and receives it through the original workflow and physical writer. Native supplier-selection/award interfaces in SGF and explicit handoff from SGF requisitions to that native source remain pending; no duplicated host budget, general installation or destination activation." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF preview/confirmation/history are delivered through the original receipt workflow. New demo8065 connects an actually SGF-issued order to warehouse receipt, with distinct functions, one canonical physical movement and immutable origin evidence. Demo8064 remains preserved. Full procurement installation, catalogue search, sustained load and deployment remain pending; the native award entry is a prepared QA source, not a new SGF selection/approval interface." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/module-flow-sgf-receipt-20261103.json b/docs/proofs/module-flow-sgf-receipt-20261103.json new file mode 100644 index 0000000..585e4e9 --- /dev/null +++ b/docs/proofs/module-flow-sgf-receipt-20261103.json @@ -0,0 +1,489 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "f6494465745f3a8e7d23edc5ef326568c144d2176b5140ed555e3ea87404bf98", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "The existing shared requisition adapter is mounted in a pinned fresh SGF QA composition, with scoped rights, navigation, single100MZN reservation and distinct approval. Receipt UI is now delivered separately through the original workflow. SGF order preparation/issuance and generally installed procurement composition remain pending; destination is disabled and8039 preserved." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now prepares an explicit preview and confirms through the original locally composed receipt workflow and shared writer, with canonical history, quality/cumulative limits, scoped rights, provenance, concurrency and recovery. New demo8064 remains unconsumed initially. General procurement installation, SGF order creation/issuance, full catalogue search, sustained load and deployment remain pending; no automatic context equivalence." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/module-flow-sgf-request-20261103.json b/docs/proofs/module-flow-sgf-request-20261103.json new file mode 100644 index 0000000..431c7c6 --- /dev/null +++ b/docs/proofs/module-flow-sgf-request-20261103.json @@ -0,0 +1,580 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "38f6ca566160d395b6bf49a93fc06ba48bd102eb915d1343d3fabb26ca7b861b", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "1ff96d8bdbae2a3fd44feaf9520d1c28edbb8e14728ef4c881b6187e41878d62", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "633933146ae8292f2bbc6da2b52ef8fbb9c820a853d27cf23f2783d3cfb159d6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "2c946b782a62e81b3ec637e2f72590ed6a6c0774f04a8082171f9c898d37c2db", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "eab95525462191f4895c3ffa91ce99ac824c5af541f7576fbae7527575559e9b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/module-flow-sgf-sourcing-20261103.json b/docs/proofs/module-flow-sgf-sourcing-20261103.json new file mode 100644 index 0000000..9b6cbca --- /dev/null +++ b/docs/proofs/module-flow-sgf-sourcing-20261103.json @@ -0,0 +1,538 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "8e15a9aa0d2d9adcfaaeee449831f2499c1a195ed0ff6877665e85cbf7cb29cf", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "84f9db1286058087ecb8cf08c64fcd3afc94c91d1509b985b634a3fcafd81295", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now registers proposals and individual evaluations, shows native comparison, requires explicit choice and distinct award approval, and continues to actual order/commitment and warehouse receipt in demo8066. Entry remains an approved native synthetic requisition and prepared supplier registry. Handoff from SGF internal requisitions with a single budget authority, SGF supplier registry/reviews, formal tender regimes and later corrections remain pending. No general destination activation or deployment validation." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/module-flow-sgf-supplier-20261103.json b/docs/proofs/module-flow-sgf-supplier-20261103.json new file mode 100644 index 0000000..4f26ebd --- /dev/null +++ b/docs/proofs/module-flow-sgf-supplier-20261103.json @@ -0,0 +1,559 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "ac437014465e0b809d7f7ab92fb4f9bdf331e3f2230ceb38abbc304bb65defbb", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "1c75c3fc47626d30e2fabf679a0ff725621ab794c92c8e89038ace4a3d14aae8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "84f9db1286058087ecb8cf08c64fcd3afc94c91d1509b985b634a3fcafd81295", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF supplier preparation/update and distinct review, activation/suspension, paged registry/history and original proposals-to-receipt selected path are delivered in isolated QA, with explicit company/unit origin and access checked again in the quotation API. Demo8067 adds supplier registration to the existing sourcing flow. Entry remains a native approved synthetic requisition. Handoff from SGF internal requisitions with a single budget authority, document attachments, sourcing selector beyond100, formal tender regimes and later corrections remain pending. No general activation or deployment validation." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/module-flow-stock-period-20261103.json b/docs/proofs/module-flow-stock-period-20261103.json new file mode 100644 index 0000000..6d87855 --- /dev/null +++ b/docs/proofs/module-flow-stock-period-20261103.json @@ -0,0 +1,468 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "f05d8bbbeed41698ec707e126b3fe9301b3ef85649905173390a161f92609cab", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "The root SGF composition now mounts the existing shared adapter and interface only in a pinned fresh QA database, with module ownership, context, scoped rights and a navigation link; request100 reserves once and is independently approved. Normal destination remains disabled and demonstration8039 is preserved. Receipt UI and generally installed procurement composition remain pending." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Native receipt workflow delegates once to the shared writer; SGF observes the actual movement in QA. Preparing/confirming receipts in the SGF interface and an installed procurement composition remain pending." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/module-flow-stock-prefix-20261103.json b/docs/proofs/module-flow-stock-prefix-20261103.json new file mode 100644 index 0000000..ace931c --- /dev/null +++ b/docs/proofs/module-flow-stock-prefix-20261103.json @@ -0,0 +1,468 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "517a581a4fa4e58371b9b33d3c57e707100a95d0b9aca2ce362c8f8b5aa0ba41", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "The root SGF composition now mounts the existing shared adapter and interface only in a pinned fresh QA database, with module ownership, context, scoped rights and a navigation link; request100 reserves once and is independently approved. Normal destination remains disabled and demonstration8039 is preserved. Receipt UI and generally installed procurement composition remain pending." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Native receipt workflow delegates once to the shared writer; SGF observes the actual movement in QA. Preparing/confirming receipts in the SGF interface and an installed procurement composition remain pending." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/module-flow-stock-valuation-20261103.json b/docs/proofs/module-flow-stock-valuation-20261103.json new file mode 100644 index 0000000..3792575 --- /dev/null +++ b/docs/proofs/module-flow-stock-valuation-20261103.json @@ -0,0 +1,468 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "30b5103279ac6a43732b48308436581cb2460f0df6abfe1e888e1f57b78932b1", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "The root SGF composition now mounts the existing shared adapter and interface only in a pinned fresh QA database, with module ownership, context, scoped rights and a navigation link; request100 reserves once and is independently approved. Normal destination remains disabled and demonstration8039 is preserved. Receipt UI and generally installed procurement composition remain pending." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Native receipt workflow delegates once to the shared writer; SGF observes the actual movement in QA. Preparing/confirming receipts in the SGF interface and an installed procurement composition remain pending." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/module-flow-supplier-invoice-20261103.json b/docs/proofs/module-flow-supplier-invoice-20261103.json new file mode 100644 index 0000000..95ea0d4 --- /dev/null +++ b/docs/proofs/module-flow-supplier-invoice-20261103.json @@ -0,0 +1,594 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "e18b9fb062ecdb58977c4d0d0f3d7b3f55047b0f0a6bc0c3f36942f5dbf77fea", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "980e5d67b5c1ac74fa958ca54af8151f58364ba97f20bb680af2dd20cc7116fe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "2c946b782a62e81b3ec637e2f72590ed6a6c0774f04a8082171f9c898d37c2db", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "4bfff0204e67f21a6ddd785d64e7c91bd63bf65742add42fc3aa7f943ab5a6e4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_screen", + "repository": "sgf", + "path": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/module-matrix-audit-20261103.json b/docs/proofs/module-matrix-audit-20261103.json new file mode 100644 index 0000000..553971c --- /dev/null +++ b/docs/proofs/module-matrix-audit-20261103.json @@ -0,0 +1,515 @@ +{ + "date": "2026-11-03T07:00:09.370Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "bfe30fc7040f9177beb88ab3d42115b96a075add8d30b1daa3fd8e3f5b20172a", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": 1, + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "recorded_proof_verified": true + } + ], + "remaining_gap": "Only basic requisitions demonstrated in 8039; full procurement composition not transferred.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "source_present_only": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": 3, + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native receipt workflow delegates once to the shared writer; SGF observes the actual movement in QA. Preparing/confirming receipts in the SGF interface and an installed procurement composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": 2, + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "recorded_proof_verified": true + } + ], + "remaining_gap": "Shared paged reader works in both QA hosts, with source revisions and explicit bindings. Operational bindings/installation and stock valuation remain pending; missing source is not zero.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "source_present_only": true + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": 1, + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": 1, + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": 2, + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": 2, + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": 2, + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": 2, + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": 2, + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": 1, + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": 2, + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2", + "source_present_only": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524", + "source_present_only": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": 2, + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": 1, + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "recorded_proof_verified": true + } + ], + "remaining_gap": "Authorised QA source effects use one writer: supplier recognition/settlement/correction, sales and receivable allocations/reversal, direct cost and its correction, industrial result1800 and its explicit atomic correction to1820 with residual300 excluded. New corrected SGF composition reconciles11 journals/23 lines and gross8725 with joint reviewed close. Real chart/tax policy, stock valuation, payroll, additional correction chains, reopening, historical/operational cutover and deployment remain excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/module-matrix-audit-complete-20261103.json b/docs/proofs/module-matrix-audit-complete-20261103.json new file mode 100644 index 0000000..72f520d --- /dev/null +++ b/docs/proofs/module-matrix-audit-complete-20261103.json @@ -0,0 +1,922 @@ +{ + "date": "2026-11-03T07:05:58.899Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "c9fd8ca531353566addf81b8ae091649b2f0f62ec0692a6790498714f239e2c2", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Requisition core exists in Compras; the SGF adapter/interface was installed only in isolated demonstration8039. This root source tree has no SGF requisition adapter. Do not confuse the demonstration with a generally installed composition or activate a candidate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native receipt workflow delegates once to the shared writer; SGF observes the actual movement in QA. Preparing/confirming receipts in the SGF interface and an installed procurement composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Shared paged reader works in both QA hosts, with source revisions and explicit bindings. Operational bindings/installation and stock valuation remain pending; missing source is not zero.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Authorised QA source effects use one writer: supplier recognition/settlement/correction, sales and receivable allocations/reversal, direct cost and its correction, industrial result1800 and its explicit atomic correction to1820 with residual300 excluded. New corrected SGF composition reconciles11 journals/23 lines and gross8725 with joint reviewed close. Real chart/tax policy, stock valuation, payroll, additional correction chains, reopening, historical/operational cutover and deployment remain excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/module-matrix-audit-final-20261103.json b/docs/proofs/module-matrix-audit-final-20261103.json new file mode 100644 index 0000000..7ba736e --- /dev/null +++ b/docs/proofs/module-matrix-audit-final-20261103.json @@ -0,0 +1,755 @@ +{ + "date": "2026-11-03T07:00:54.142Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "bfe30fc7040f9177beb88ab3d42115b96a075add8d30b1daa3fd8e3f5b20172a", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Only basic requisitions demonstrated in 8039; full procurement composition not transferred.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native receipt workflow delegates once to the shared writer; SGF observes the actual movement in QA. Preparing/confirming receipts in the SGF interface and an installed procurement composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Shared paged reader works in both QA hosts, with source revisions and explicit bindings. Operational bindings/installation and stock valuation remain pending; missing source is not zero.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Authorised QA source effects use one writer: supplier recognition/settlement/correction, sales and receivable allocations/reversal, direct cost and its correction, industrial result1800 and its explicit atomic correction to1820 with residual300 excluded. New corrected SGF composition reconciles11 journals/23 lines and gross8725 with joint reviewed close. Real chart/tax policy, stock valuation, payroll, additional correction chains, reopening, historical/operational cutover and deployment remain excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/module-matrix-audit-reconciled-20261103.json b/docs/proofs/module-matrix-audit-reconciled-20261103.json new file mode 100644 index 0000000..2021e27 --- /dev/null +++ b/docs/proofs/module-matrix-audit-reconciled-20261103.json @@ -0,0 +1,906 @@ +{ + "date": "2026-11-03T07:04:12.408Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "7fad410e844c276be3c86a02b1ac94260735ef99681b9e7c5fc007044df97d51", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Requisition core exists in Compras; the SGF adapter/interface was installed only in isolated demonstration8039. This root source tree has no SGF requisition adapter. Do not confuse the demonstration with a generally installed composition or activate a candidate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native receipt workflow delegates once to the shared writer; SGF observes the actual movement in QA. Preparing/confirming receipts in the SGF interface and an installed procurement composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + } + ], + "current_hash_has_matching_recorded_evidence": false + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Shared paged reader works in both QA hosts, with source revisions and explicit bindings. Operational bindings/installation and stock valuation remain pending; missing source is not zero.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Authorised QA source effects use one writer: supplier recognition/settlement/correction, sales and receivable allocations/reversal, direct cost and its correction, industrial result1800 and its explicit atomic correction to1820 with residual300 excluded. New corrected SGF composition reconciles11 journals/23 lines and gross8725 with joint reviewed close. Real chart/tax policy, stock valuation, payroll, additional correction chains, reopening, historical/operational cutover and deployment remain excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/module-matrix-audit-tests-20261103.json b/docs/proofs/module-matrix-audit-tests-20261103.json new file mode 100644 index 0000000..79692ca --- /dev/null +++ b/docs/proofs/module-matrix-audit-tests-20261103.json @@ -0,0 +1,8 @@ +{ + "passed": true, + "checks": 12, + "missing_failed_and_skipped_evidence_refused": true, + "historical_failure_not_counted_when_unselected": true, + "invalid_origin_paths_refused": true, + "databases_used": 0 +} \ No newline at end of file diff --git a/docs/proofs/module-matrix-geography-20261103.json b/docs/proofs/module-matrix-geography-20261103.json new file mode 100644 index 0000000..38638d3 --- /dev/null +++ b/docs/proofs/module-matrix-geography-20261103.json @@ -0,0 +1,1532 @@ +{ + "date": "2026-11-03T12:21:29.215Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "1e1f2114e4543a81344ec58bb889e426164c60e50922d2a197a170a85036bc7d", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "eab95525462191f4895c3ffa91ce99ac824c5af541f7576fbae7527575559e9b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "4bfff0204e67f21a6ddd785d64e7c91bd63bf65742add42fc3aa7f943ab5a6e4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "1ff96d8bdbae2a3fd44feaf9520d1c28edbb8e14728ef4c881b6187e41878d62", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "633933146ae8292f2bbc6da2b52ef8fbb9c820a853d27cf23f2783d3cfb159d6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "2c946b782a62e81b3ec637e2f72590ed6a6c0774f04a8082171f9c898d37c2db", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/module-matrix-requisition-composition-20261103.json b/docs/proofs/module-matrix-requisition-composition-20261103.json new file mode 100644 index 0000000..14c7f11 --- /dev/null +++ b/docs/proofs/module-matrix-requisition-composition-20261103.json @@ -0,0 +1,957 @@ +{ + "date": "2026-11-03T07:17:41.486Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "b0bd122ba084085e81ec9f74d1dfaa58351f71f4186af7cda996e51e0609ea8c", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "The root SGF composition now mounts the existing shared adapter and interface only in a pinned fresh QA database, with module ownership, context, scoped rights and a navigation link; request100 reserves once and is independently approved. Normal destination remains disabled and demonstration8039 is preserved. Receipt UI and generally installed procurement composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native receipt workflow delegates once to the shared writer; SGF observes the actual movement in QA. Preparing/confirming receipts in the SGF interface and an installed procurement composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Shared paged reader works in both QA hosts, with source revisions and explicit bindings. Operational bindings/installation and stock valuation remain pending; missing source is not zero.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Authorised QA source effects use one writer: supplier recognition/settlement/correction, sales and receivable allocations/reversal, direct cost and its correction, industrial result1800 and its explicit atomic correction to1820 with residual300 excluded. New corrected SGF composition reconciles11 journals/23 lines and gross8725 with joint reviewed close. Real chart/tax policy, stock valuation, payroll, additional correction chains, reopening, historical/operational cutover and deployment remain excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/module-matrix-sgf-orders-20261103.json b/docs/proofs/module-matrix-sgf-orders-20261103.json new file mode 100644 index 0000000..bab81ca --- /dev/null +++ b/docs/proofs/module-matrix-sgf-orders-20261103.json @@ -0,0 +1,1314 @@ +{ + "date": "2026-11-03T10:12:35.186Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "bf3ff0932b8789ed5c6edcc9f869a7d803f8bc16a1156d96f0ed60ba437edaa1", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "84f9db1286058087ecb8cf08c64fcd3afc94c91d1509b985b634a3fcafd81295", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Shared requisition QA and single100MZN reservation remain delivered. A new SGF composition now confers/issues an order from an actually approved native award, records one100MZN source-budget commitment, and receives it through the original workflow and physical writer. Native supplier-selection/award interfaces in SGF and explicit handoff from SGF requisitions to that native source remain pending; no duplicated host budget, general installation or destination activation.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF preview/confirmation/history are delivered through the original receipt workflow. New demo8065 connects an actually SGF-issued order to warehouse receipt, with distinct functions, one canonical physical movement and immutable origin evidence. Demo8064 remains preserved. Full procurement installation, catalogue search, sustained load and deployment remain pending; the native award entry is a prepared QA source, not a new SGF selection/approval interface.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/module-matrix-sgf-receipt-20261103.json b/docs/proofs/module-matrix-sgf-receipt-20261103.json new file mode 100644 index 0000000..8395d92 --- /dev/null +++ b/docs/proofs/module-matrix-sgf-receipt-20261103.json @@ -0,0 +1,1237 @@ +{ + "date": "2026-11-03T09:31:20.795Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "f6494465745f3a8e7d23edc5ef326568c144d2176b5140ed555e3ea87404bf98", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "The existing shared requisition adapter is mounted in a pinned fresh SGF QA composition, with scoped rights, navigation, single100MZN reservation and distinct approval. Receipt UI is now delivered separately through the original workflow. SGF order preparation/issuance and generally installed procurement composition remain pending; destination is disabled and8039 preserved.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now prepares an explicit preview and confirms through the original locally composed receipt workflow and shared writer, with canonical history, quality/cumulative limits, scoped rights, provenance, concurrency and recovery. New demo8064 remains unconsumed initially. General procurement installation, SGF order creation/issuance, full catalogue search, sustained load and deployment remain pending; no automatic context equivalence.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/module-matrix-sgf-request-20261103.json b/docs/proofs/module-matrix-sgf-request-20261103.json new file mode 100644 index 0000000..9482683 --- /dev/null +++ b/docs/proofs/module-matrix-sgf-request-20261103.json @@ -0,0 +1,1532 @@ +{ + "date": "2026-11-03T11:51:43.382Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "38f6ca566160d395b6bf49a93fc06ba48bd102eb915d1343d3fabb26ca7b861b", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "eab95525462191f4895c3ffa91ce99ac824c5af541f7576fbae7527575559e9b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "1ff96d8bdbae2a3fd44feaf9520d1c28edbb8e14728ef4c881b6187e41878d62", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "633933146ae8292f2bbc6da2b52ef8fbb9c820a853d27cf23f2783d3cfb159d6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "2c946b782a62e81b3ec637e2f72590ed6a6c0774f04a8082171f9c898d37c2db", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/module-matrix-sgf-sourcing-20261103.json b/docs/proofs/module-matrix-sgf-sourcing-20261103.json new file mode 100644 index 0000000..1c4e456 --- /dev/null +++ b/docs/proofs/module-matrix-sgf-sourcing-20261103.json @@ -0,0 +1,1400 @@ +{ + "date": "2026-11-03T10:58:26.455Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "8e15a9aa0d2d9adcfaaeee449831f2499c1a195ed0ff6877665e85cbf7cb29cf", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "84f9db1286058087ecb8cf08c64fcd3afc94c91d1509b985b634a3fcafd81295", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now registers proposals and individual evaluations, shows native comparison, requires explicit choice and distinct award approval, and continues to actual order/commitment and warehouse receipt in demo8066. Entry remains an approved native synthetic requisition and prepared supplier registry. Handoff from SGF internal requisitions with a single budget authority, SGF supplier registry/reviews, formal tender regimes and later corrections remain pending. No general destination activation or deployment validation.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/module-matrix-sgf-supplier-20261103.json b/docs/proofs/module-matrix-sgf-supplier-20261103.json new file mode 100644 index 0000000..297499b --- /dev/null +++ b/docs/proofs/module-matrix-sgf-supplier-20261103.json @@ -0,0 +1,1466 @@ +{ + "date": "2026-11-03T11:18:06.567Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "ac437014465e0b809d7f7ab92fb4f9bdf331e3f2230ceb38abbc304bb65defbb", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "84f9db1286058087ecb8cf08c64fcd3afc94c91d1509b985b634a3fcafd81295", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF supplier preparation/update and distinct review, activation/suspension, paged registry/history and original proposals-to-receipt selected path are delivered in isolated QA, with explicit company/unit origin and access checked again in the quotation API. Demo8067 adds supplier registration to the existing sourcing flow. Entry remains a native approved synthetic requisition. Handoff from SGF internal requisitions with a single budget authority, document attachments, sourcing selector beyond100, formal tender regimes and later corrections remain pending. No general activation or deployment validation.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "1c75c3fc47626d30e2fabf679a0ff725621ab794c92c8e89038ace4a3d14aae8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/module-matrix-stock-period-20261103.json b/docs/proofs/module-matrix-stock-period-20261103.json new file mode 100644 index 0000000..cda85cb --- /dev/null +++ b/docs/proofs/module-matrix-stock-period-20261103.json @@ -0,0 +1,1147 @@ +{ + "date": "2026-11-03T09:02:15.816Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "f05d8bbbeed41698ec707e126b3fe9301b3ef85649905173390a161f92609cab", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "The root SGF composition now mounts the existing shared adapter and interface only in a pinned fresh QA database, with module ownership, context, scoped rights and a navigation link; request100 reserves once and is independently approved. Normal destination remains disabled and demonstration8039 is preserved. Receipt UI and generally installed procurement composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native receipt workflow delegates once to the shared writer; SGF observes the actual movement in QA. Preparing/confirming receipts in the SGF interface and an installed procurement composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/module-matrix-stock-prefix-20261103.json b/docs/proofs/module-matrix-stock-prefix-20261103.json new file mode 100644 index 0000000..c36e863 --- /dev/null +++ b/docs/proofs/module-matrix-stock-prefix-20261103.json @@ -0,0 +1,1111 @@ +{ + "date": "2026-11-03T08:53:39.603Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "517a581a4fa4e58371b9b33d3c57e707100a95d0b9aca2ce362c8f8b5aa0ba41", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "The root SGF composition now mounts the existing shared adapter and interface only in a pinned fresh QA database, with module ownership, context, scoped rights and a navigation link; request100 reserves once and is independently approved. Normal destination remains disabled and demonstration8039 is preserved. Receipt UI and generally installed procurement composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native receipt workflow delegates once to the shared writer; SGF observes the actual movement in QA. Preparing/confirming receipts in the SGF interface and an installed procurement composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/module-matrix-stock-valuation-20261103.json b/docs/proofs/module-matrix-stock-valuation-20261103.json new file mode 100644 index 0000000..f92e1f9 --- /dev/null +++ b/docs/proofs/module-matrix-stock-valuation-20261103.json @@ -0,0 +1,1075 @@ +{ + "date": "2026-11-03T07:59:53.563Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "30b5103279ac6a43732b48308436581cb2460f0df6abfe1e888e1f57b78932b1", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "The root SGF composition now mounts the existing shared adapter and interface only in a pinned fresh QA database, with module ownership, context, scoped rights and a navigation link; request100 reserves once and is independently approved. Normal destination remains disabled and demonstration8039 is preserved. Receipt UI and generally installed procurement composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native receipt workflow delegates once to the shared writer; SGF observes the actual movement in QA. Preparing/confirming receipts in the SGF interface and an installed procurement composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Native verified invoice participates in common payable QA; SGF history remains a controlled receipt, not a live historical adapter. Real fiscal policy and installed procurement composition remain separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/module-matrix-supplier-invoice-20261103.json b/docs/proofs/module-matrix-supplier-invoice-20261103.json new file mode 100644 index 0000000..51d1b17 --- /dev/null +++ b/docs/proofs/module-matrix-supplier-invoice-20261103.json @@ -0,0 +1,1576 @@ +{ + "date": "2026-11-03T12:44:40.097Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "e18b9fb062ecdb58977c4d0d0f3d7b3f55047b0f0a6bc0c3f36942f5dbf77fea", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "4bfff0204e67f21a6ddd785d64e7c91bd63bf65742add42fc3aa7f943ab5a6e4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "980e5d67b5c1ac74fa958ca54af8151f58364ba97f20bb680af2dd20cc7116fe", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "2c946b782a62e81b3ec637e2f72590ed6a6c0774f04a8082171f9c898d37c2db", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_invoice_controller", + "file": "app/Modules/Purchasing/InvoiceController.php", + "repository": "sgf", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_invoice_screen", + "file": "resources/views/supplier-invoice-workspace.blade.php", + "repository": "sgf", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common recognition, controlled history, report and receipt lookup are implemented in QA. Due date stays unknown when absent; operational history responsibility/source mapping and cutover remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/native-payable-paged-read-20261102.json b/docs/proofs/native-payable-paged-read-20261102.json new file mode 100644 index 0000000..29a3f7f --- /dev/null +++ b/docs/proofs/native-payable-paged-read-20261102.json @@ -0,0 +1,509 @@ +{ + "increment": "NATIVE-PAYABLE-PAGED-READ-SIM-v1", + "date": "2026-11-02", + "synthetic_only": true, + "tests": { + "new": { + "cases": 9, + "assertions": 113 + }, + "affected_compatibility": { + "distinct_cases": 26, + "assertions": 183, + "consolidation": "25 passing initial cases and one corrected target; failed/empty diagnostic runs excluded" + } + }, + "http": { + "kind": "native_financial_page_actual_http", + "checks": 18, + "passed": true, + "documents": 10000, + "invoice_filter_preserved": true, + "live_native_history": true, + "read_role_write_refused": true, + "csrf_enforced": true, + "visual_review": false, + "browser_interactions_tested": false + }, + "preservation": { + "read_only": true, + "native_workflow_invoice_preserved": true, + "originals_sha256": "ce35f40046aaee85931aa9e26b094c73cbd48aa09c6800270320675e62258a39", + "original_source_stock_and_budget_unchanged": true, + "one_obligation": true, + "principal_minor": 6000, + "confirmed_minor": 3000, + "statuses": [ + "confirmed", + "pending", + "rejected" + ], + "invoices": 10000, + "new_paged_read_default": false + }, + "concurrency": { + "reader_completed_before_writer_release": true, + "uncommitted_audit_not_observed": true, + "balance_minor": 3000, + "reader_time_ms": 287.022125 + }, + "query_shape": { + "documents": 51, + "page_sizes": [ + 25, + 100 + ], + "page25_queries": 76, + "page100_queries": 78, + "extra_queries_reason": "Proposal/event data SELECTs skipped by paginator for empty evidence windows.", + "audit_selects": 2, + "payment_selects": 1, + "no_writer_lock": true + }, + "analysis": { + "tool": "phpstan", + "result": "passed", + "errors": 0 + }, + "measurements": [ + { + "volume": 1000, + "strategies": { + "legacy": { + "volume": 1000, + "strategy": "legacy", + "time_ms": 17059.737, + "queries": 8060, + "php_heap_baseline_bytes": 29360128, + "php_heap_peak_bytes": 33554432, + "documents": 1000, + "obligations": 1, + "document_fingerprints": { + "25": "a874bb3175a134e17dc273d37de023ca6bec120501ea9865cda097f469e70981", + "100": "d12811368fa727f5afc549c6c0053eb1b35568b043d250794b9c2df528dd67ac" + }, + "original_position_fingerprint": "404586a57f4da12f502a0a1ff13d9abfe0b1e439d2f669ebc079c6fb55c11a7b", + "original_balance_minor": 3000, + "php": "8.4.27", + "independent_php_process": true, + "indices_added": false, + "not_deployment_capacity": true + }, + "page25": { + "volume": 1000, + "strategy": "page25", + "time_ms": 171.758, + "queries": 76, + "php_heap_baseline_bytes": 29360128, + "php_heap_peak_bytes": 29360128, + "documents": 25, + "obligations": 0, + "document_fingerprints": { + "25": "a874bb3175a134e17dc273d37de023ca6bec120501ea9865cda097f469e70981" + }, + "original_position_fingerprint": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "original_balance_minor": null, + "php": "8.4.27", + "independent_php_process": true, + "indices_added": false, + "not_deployment_capacity": true + }, + "page100": { + "volume": 1000, + "strategy": "page100", + "time_ms": 192.259, + "queries": 76, + "php_heap_baseline_bytes": 29360128, + "php_heap_peak_bytes": 29360128, + "documents": 100, + "obligations": 0, + "document_fingerprints": { + "100": "d12811368fa727f5afc549c6c0053eb1b35568b043d250794b9c2df528dd67ac" + }, + "original_position_fingerprint": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "original_balance_minor": null, + "php": "8.4.27", + "independent_php_process": true, + "indices_added": false, + "not_deployment_capacity": true + }, + "invoice": { + "volume": 1000, + "strategy": "invoice", + "time_ms": 113.647, + "queries": 79, + "php_heap_baseline_bytes": 29360128, + "php_heap_peak_bytes": 29360128, + "documents": 1, + "obligations": 1, + "document_fingerprints": [], + "original_position_fingerprint": "404586a57f4da12f502a0a1ff13d9abfe0b1e439d2f669ebc079c6fb55c11a7b", + "original_balance_minor": 3000, + "php": "8.4.27", + "independent_php_process": true, + "indices_added": false, + "not_deployment_capacity": true + } + } + }, + { + "volume": 5000, + "strategies": { + "legacy": { + "volume": 5000, + "strategy": "legacy", + "time_ms": 74118.294, + "queries": 40060, + "php_heap_baseline_bytes": 29360128, + "php_heap_peak_bytes": 50331648, + "documents": 5000, + "obligations": 1, + "document_fingerprints": { + "25": "96e54e0dc6663962273d2f6a9862a2ed074ebb30c243d14bf1727c802007a572", + "100": "7531a6a1d3b57d03c98e40fbfb8501bbad1333c6c5ca33fcd71321a3a2f7f9e2" + }, + "original_position_fingerprint": "404586a57f4da12f502a0a1ff13d9abfe0b1e439d2f669ebc079c6fb55c11a7b", + "original_balance_minor": 3000, + "php": "8.4.27", + "independent_php_process": true, + "indices_added": false, + "not_deployment_capacity": true + }, + "page25": { + "volume": 5000, + "strategy": "page25", + "time_ms": 124.051, + "queries": 76, + "php_heap_baseline_bytes": 29360128, + "php_heap_peak_bytes": 29360128, + "documents": 25, + "obligations": 0, + "document_fingerprints": { + "25": "96e54e0dc6663962273d2f6a9862a2ed074ebb30c243d14bf1727c802007a572" + }, + "original_position_fingerprint": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "original_balance_minor": null, + "php": "8.4.27", + "independent_php_process": true, + "indices_added": false, + "not_deployment_capacity": true + }, + "page100": { + "volume": 5000, + "strategy": "page100", + "time_ms": 127.19, + "queries": 76, + "php_heap_baseline_bytes": 29360128, + "php_heap_peak_bytes": 29360128, + "documents": 100, + "obligations": 0, + "document_fingerprints": { + "100": "7531a6a1d3b57d03c98e40fbfb8501bbad1333c6c5ca33fcd71321a3a2f7f9e2" + }, + "original_position_fingerprint": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "original_balance_minor": null, + "php": "8.4.27", + "independent_php_process": true, + "indices_added": false, + "not_deployment_capacity": true + }, + "invoice": { + "volume": 5000, + "strategy": "invoice", + "time_ms": 91.986, + "queries": 79, + "php_heap_baseline_bytes": 29360128, + "php_heap_peak_bytes": 29360128, + "documents": 1, + "obligations": 1, + "document_fingerprints": [], + "original_position_fingerprint": "404586a57f4da12f502a0a1ff13d9abfe0b1e439d2f669ebc079c6fb55c11a7b", + "original_balance_minor": 3000, + "php": "8.4.27", + "independent_php_process": true, + "indices_added": false, + "not_deployment_capacity": true + } + } + }, + { + "volume": 10000, + "strategies": { + "legacy": { + "volume": 10000, + "strategy": "legacy", + "time_ms": 122903.707, + "queries": 80060, + "php_heap_baseline_bytes": 29360128, + "php_heap_peak_bytes": 65011712, + "documents": 10000, + "obligations": 1, + "document_fingerprints": { + "25": "88c6690d723ebd87593c92f83cdf2ad5a97954128f9120f7c4e57bcdbce0e4e7", + "100": "cb4c2c49228263bbe079f4a8683a8804b04f8930f547410863ae3093b6158c2f" + }, + "original_position_fingerprint": "404586a57f4da12f502a0a1ff13d9abfe0b1e439d2f669ebc079c6fb55c11a7b", + "original_balance_minor": 3000, + "php": "8.4.27", + "independent_php_process": true, + "indices_added": false, + "not_deployment_capacity": true + }, + "page25": { + "volume": 10000, + "strategy": "page25", + "time_ms": 75.117, + "queries": 76, + "php_heap_baseline_bytes": 29360128, + "php_heap_peak_bytes": 29360128, + "documents": 25, + "obligations": 0, + "document_fingerprints": { + "25": "88c6690d723ebd87593c92f83cdf2ad5a97954128f9120f7c4e57bcdbce0e4e7" + }, + "original_position_fingerprint": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "original_balance_minor": null, + "php": "8.4.27", + "independent_php_process": true, + "indices_added": false, + "not_deployment_capacity": true + }, + "page100": { + "volume": 10000, + "strategy": "page100", + "time_ms": 91.089, + "queries": 76, + "php_heap_baseline_bytes": 29360128, + "php_heap_peak_bytes": 29360128, + "documents": 100, + "obligations": 0, + "document_fingerprints": { + "100": "cb4c2c49228263bbe079f4a8683a8804b04f8930f547410863ae3093b6158c2f" + }, + "original_position_fingerprint": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "original_balance_minor": null, + "php": "8.4.27", + "independent_php_process": true, + "indices_added": false, + "not_deployment_capacity": true + }, + "invoice": { + "volume": 10000, + "strategy": "invoice", + "time_ms": 72.009, + "queries": 79, + "php_heap_baseline_bytes": 29360128, + "php_heap_peak_bytes": 29360128, + "documents": 1, + "obligations": 1, + "document_fingerprints": [], + "original_position_fingerprint": "404586a57f4da12f502a0a1ff13d9abfe0b1e439d2f669ebc079c6fb55c11a7b", + "original_balance_minor": 3000, + "php": "8.4.27", + "independent_php_process": true, + "indices_added": false, + "not_deployment_capacity": true + } + } + } + ], + "conditions": { + "php": "8.4.27", + "memory_limit": "512M", + "independent_php_process_per_strategy": true, + "same_point_invoice_warmup": true, + "samples_per_strategy": 1, + "strategy_order": [ + "legacy", + "page25", + "page100", + "invoice" + ], + "new_indices": false, + "workload": "One actual native workflow invoice with recognised obligation and three historical payments; remaining invoices are explicit unrecognised clones with one line and validation audit. First pages exclude oldest original; exact invoice lookup proves positive financial parity.", + "memory": "PHP allocated heap peak; not process RSS", + "deployment_capacity_validated": false, + "visual_review": false + }, + "deployment": { + "native_default_flag": false, + "installed_native_package_unchanged": true, + "canonical_common_package_used_only_by_owned_QA": true, + "old_package_paging_request": "503", + "new_rights_or_real_migrations": false + }, + "sources": [ + { + "repository": "compras", + "file": "app/Services/SupplierPayables.php", + "sha256": "1f6afc26040f3a4dd583c3489292351358d213ff743c96f9fb2fd007f770ae0d" + }, + { + "repository": "compras", + "file": "app/Services/SupplierPayablePage.php", + "sha256": "eaf57f4501b473485b7cf641d535f36f287e675206d812ec32cf5013cbb32f3c" + }, + { + "repository": "compras", + "file": "app/Http/Controllers/SupplierPayablesController.php", + "sha256": "ce6c7f73a79b46dad8b1ca6e7c9f6bd59ec09b90eb3749697063c9bd7b2e1459" + }, + { + "repository": "compras", + "file": "config/common-payables.php", + "sha256": "181179b763ff779dcb2d2204111823be50695c25214653e526eece70da78a3df" + }, + { + "repository": "compras", + "file": "tests/Feature/NativePayablePageTest.php", + "sha256": "6467f18187e6d22f40d702da5ad5608e8856f0aa33b7f5a25347128ef1ea2b84" + }, + { + "repository": "compras", + "file": "tests/Support/native-payable-page-worker.php", + "sha256": "2d9f9488cca56b02c22e240f3c84af0cd2b8fa0b190dfd94eb1886119678650e" + }, + { + "repository": "compras", + "file": "tests/Feature/SupplierPayableIntegrationTest.php", + "sha256": "f0aafed7e07a2b4142a6e17bd99930646f9a0632af859857da14f5ebf563ae40" + }, + { + "repository": "sgf-tempo", + "file": "packages/payables/ui/page.php", + "sha256": "81f0fc4ecef7793f198c610287b0b0d3c4b6fb01e4091bd929c9f7b4cbec8335" + }, + { + "repository": "sgf-tempo", + "file": "scripts/native-payable-page-run.mjs", + "sha256": "491c96285c187d3228e4a0dd2708ee9f01bd72d8ed5b6517f085b99f65e28a5b" + }, + { + "repository": "sgf-tempo", + "file": "scripts/native-payable-page-proof.php", + "sha256": "4f5a145347f8f8b9004782a50b7cd47a6a5d1d14408311fe47b8c6092f2de7ca" + }, + { + "repository": "sgf-tempo", + "file": "scripts/native-payable-page-load.mjs", + "sha256": "e8037292a747400f2a3821823d460dc2c052522732fdf1464d1b69d793a18c04" + }, + { + "repository": "sgf-tempo", + "file": "scripts/native-payable-page-http.mjs", + "sha256": "4c31585ea7b5fa86a170be47b17e657676529106b231fc1aa1a874771d8147b2" + }, + { + "repository": "sgf-tempo", + "file": "scripts/native-payable-page-http-router.php", + "sha256": "3c315e4174ce0293ee6270bec6269710a5876ca1a11d1c4a1c175a832cbd132b" + }, + { + "repository": "sgf-tempo", + "file": "scripts/native-payable-page-analyze.mjs", + "sha256": "7bf0615762b2f73dc98c007cf35157c236b525fdd82b015cd339135568e703bf" + }, + { + "repository": "sgf-tempo", + "file": "scripts/payable-history-sgf-proof.php", + "sha256": "4fc1138090c668393077883487da8a657a0544e524d36ea4c2f3a18c1d7cff9a" + }, + { + "repository": "sgf-tempo", + "file": "scripts/stock-receipt-composition.mjs", + "sha256": "b0759b80809b3413e7e7597ab727dbe89a3f8ba13de6ebcc9e42e304b507deea" + } + ], + "previous": [ + { + "file": "docs/proofs/sgf-payable-paged-read-20261102.json", + "sha256": "98ddb85c4819ad6e071ab69df3a19244c04e71c0d2e17539eac3c41a2d155b0b" + }, + { + "file": "docs/proofs/module-association-http-lock-summary-20261102.json", + "sha256": "67547007f8f9df853639751983c5a6fd0841044cb0e04a7628db04c4b67692c6" + } + ], + "evidence": [ + { + "file": "private/payable-history-bf3c4eba3d11/native-page-http.json", + "sha256": "3dadec166238047805028e6c786c0fadc81b6341e7ce53ea5b7a251544cad253" + }, + { + "file": "private/payable-history-bf3c4eba3d11/native-page-post.json", + "sha256": "91d11dd40d5dd342315556c2e485473b4b6cc466e97adc0bd48a143549a9a69d" + }, + { + "file": "private/stock-receipt-5b28d5dfd6a9/native-page-concurrency.json", + "sha256": "fa54caaf70e0d2ee6ddfbead1ddef065b008188c79b6ede9794c3b2d73536c5e" + }, + { + "file": "private/stock-receipt-5b28d5dfd6a9/native-page-query.json", + "sha256": "9b3a532a8bb7ff7d3439101a7f9a82f0c3dc6873a75334a57da8312019c78ab5" + }, + { + "file": "private/stock-receipt-5b28d5dfd6a9/native-payable-page-phpstan.json", + "sha256": "1997495ca8f04c2ec09798d55607d1a2f85e3338b772f258666465bf658032d2" + }, + { + "file": "private/stock-receipt-5b28d5dfd6a9/native-payable-page-1793646797175-junit.xml", + "sha256": "e39ea3e048b193e127cc451565a023644603949aa75dc62ba89f9834769ab727" + }, + { + "file": "private/stock-receipt-1d076320ce39/native-payable-compat-junit.xml", + "sha256": "8efcb5a35c08292f43c4a00581103c5116fe5689ff59783cce943ec4f419bfc4" + }, + { + "file": "private/stock-receipt-3732cd3cf3c7/native-payable-compat-junit.xml", + "sha256": "5887c7c94eb1691c79c948cac4d6990f4b2bc2ee18985ed1b0b57b5eb7cbf7e4" + }, + { + "file": "private/payable-history-bf3c4eba3d11/native-bench-1000-legacy.json", + "sha256": "bdc573ac6ae229b7763c6da6c0e5c0fba61d16a9d3064489f4dbd256b16dd748" + }, + { + "file": "private/payable-history-bf3c4eba3d11/native-bench-1000-page25.json", + "sha256": "f6087909b1dfe85937cac827bee47fadca017605636903450aefa4385fbbf910" + }, + { + "file": "private/payable-history-bf3c4eba3d11/native-bench-1000-page100.json", + "sha256": "c9acf6a6adf2bc247aabfcea6839a438175b0837d3772e50753925a951d9d67c" + }, + { + "file": "private/payable-history-bf3c4eba3d11/native-bench-1000-invoice.json", + "sha256": "b0bc9ff909e174edea64e9230725b7fb3db691d9d8c502aecf32c55f973ce4a5" + }, + { + "file": "private/payable-history-bf3c4eba3d11/native-bench-5000-legacy.json", + "sha256": "69b7f6c9d66d00102d9df49eef7995f590bb1b4046230c9b6b8b6d21e6ede6d6" + }, + { + "file": "private/payable-history-bf3c4eba3d11/native-bench-5000-page25.json", + "sha256": "c0be1aa23309cc5f0157828a2a194911405414c293468c8cc5e57c0d9025a2df" + }, + { + "file": "private/payable-history-bf3c4eba3d11/native-bench-5000-page100.json", + "sha256": "0a6efe29d1aec820fe378f07bcca901177279d019d92059ad85cc5cd89ebc12a" + }, + { + "file": "private/payable-history-bf3c4eba3d11/native-bench-5000-invoice.json", + "sha256": "81e28df932974feee5442721b571abde8653f8f43ee299233aef75f22e552292" + }, + { + "file": "private/payable-history-bf3c4eba3d11/native-bench-10000-legacy.json", + "sha256": "c633f9247a5a71f62633c4636d5465532727e7bff352d852e3a55048b3146920" + }, + { + "file": "private/payable-history-bf3c4eba3d11/native-bench-10000-page25.json", + "sha256": "a9bbd29151d4d6e45d264d8d505e8088c3a35aeb7bc27c485a99a13ec4b7fb0f" + }, + { + "file": "private/payable-history-bf3c4eba3d11/native-bench-10000-page100.json", + "sha256": "af79aa4c847be1eeff645377ddeaa7e96a16c11efb79387d14c95ac86230a49b" + }, + { + "file": "private/payable-history-bf3c4eba3d11/native-bench-10000-invoice.json", + "sha256": "0d2c1f1843b046fe80376f456b7308fe4892c50b3e34caf7b2d723b91548e07c" + } + ] +} diff --git a/docs/proofs/obligation-evidence-flow-20261103.json b/docs/proofs/obligation-evidence-flow-20261103.json new file mode 100644 index 0000000..d895df2 --- /dev/null +++ b/docs/proofs/obligation-evidence-flow-20261103.json @@ -0,0 +1,769 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "73274c6ab4f080d2d9dcdadd16390bb544d7dfb07bc91a95ffed675c78b42ee0", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_screen", + "repository": "sgf", + "path": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_screen", + "repository": "sgf", + "path": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "73a73bc3f33fede454d40ab7506274ec5128c317e4fc0cbc38fa3808bc6be074", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_workspace", + "repository": "sgf", + "path": "app/Modules/Purchasing/WorkspaceNavigation.php", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_navigation", + "repository": "sgf", + "path": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_picker", + "repository": "sgf", + "path": "public/supplier-picker-model.mjs", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_search_ui", + "repository": "sgf", + "path": "public/sourcing-workspace.mjs", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/DossierController.php", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_screen", + "repository": "sgf", + "path": "resources/views/purchasing-dossier.blade.php", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_ui", + "repository": "sgf", + "path": "public/purchasing-dossier.mjs", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_catalogue", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptCatalogue.php", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_workspace_ui", + "repository": "sgf", + "path": "public/receipt-workspace.mjs", + "sha256": "86421d30dc9868b10da2153f8bf0b50d9904ab5ccccbf9813464083ae1e20bd2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentsController.php", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_storage", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_ui", + "repository": "sgf", + "path": "public/supplier-documents.mjs", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_process_navigation", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessNavigation.php", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_focus", + "repository": "sgf", + "path": "public/purchasing-focus.mjs", + "sha256": "434319b8de23f5d6892666bd53232d463a0d458fe948cc6d7b476ad1228fafb6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stage_history", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessHistory.php", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_workspace_ui", + "repository": "sgf", + "path": "public/supplier-invoice-workspace.mjs", + "sha256": "a05b4f56151b8bc9735a0ba2ce47b475e22623aabb8be99a98290860efd6ae9e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_workspace_ui", + "repository": "sgf", + "path": "public/supplier-obligation-workspace.mjs", + "sha256": "7f5c8ca11ad603e55c408356c7fb2a46782662d0107caffedcd9d4966a9163e7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_history_ui", + "repository": "sgf", + "path": "public/request-history.mjs", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_workspace_ui", + "repository": "sgf", + "path": "public/request-workspace.mjs", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_matching_progress", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceMatchingProgress.php", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_matching_ui", + "repository": "sgf", + "path": "public/invoice-matching.mjs", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_evidence_ui", + "repository": "sgf", + "path": "public/obligation-evidence.mjs", + "sha256": "c47a75e69d8ea767bc7e07e6fe5fa924fcc4fbd1bd1a90f526ecf255eb2e6fb5", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. A subsequent scope fix filters request/sourcing audit events in SQL before limits/counts/pages, closing an alternate downstream financial-history exposure without changing original audit or writers. Empty initial supplier searches now survive middleware normalisation while closed-award and permission guards remain. Completed canonical history book is reused read-only with142 tables/sequences intact. Demo8080 removes the direct request-history25-event cap using bounded cursor pages25/100, own-stage SQL filtering and encrypted request/actor/context/size-bound cursors with600-second lifetime. Initial page is reused; history refresh does not reset unsaved request fields.127 original event ids traverse once despite a new head note; refresh includes128. Audit-volume fixtures are not operational request revisions. An inherited100MZN order setup was preserved and removed from future history harness runs. This is not a persistent MVCC snapshot, visual acceptance, sustained-load or deployment validation." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Demo8079 fixes the actual form-to-picker binding and blank initial article search. DOM-to-real-HTTP proof selects an article, transmits its revision, previews, confirms1UN and recovers a deliberately lost response with201/200, one receipt/movement. This is not browser visual acceptance or a new concurrency/load trial. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8081 exposes per-line ordered/accepted/returned/reversed/validated/pending/remaining quantities using two aggregate fact queries and original correction values. Pending documents do not reserve quantity; overlap is a read warning, not a replacement for native validation. Two completed QA books are reused read-only with all tables/sequences unchanged. The display revision uses one original state observation before capability decoration; mutation/state definitions are unchanged. Full dependency materialisation, large invoice-history scaling, visual review, sustained load and deployment remain pending." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8082 separates evidence browsing from an explicitly selected proposal decision. Reason and preview survive pagination; changed observed source/actor/permissions invalidate old forms, and late reads/previews cannot reactivate them. Temporary read failure preserves the form; in-flight operations prevent selection changes.26 new simulated-UI/demo checks reuse72 native authority checks without repetition. Controller/runtime/kernel and legacy evidence branch are unchanged. No new real confirmation, financial writer, backend pagination protocol, visual/load or deployment validation." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/obligation-evidence-matrix-20261103.json b/docs/proofs/obligation-evidence-matrix-20261103.json new file mode 100644 index 0000000..272f7c7 --- /dev/null +++ b/docs/proofs/obligation-evidence-matrix-20261103.json @@ -0,0 +1,2470 @@ +{ + "date": "2026-11-03T19:30:30.108Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "73274c6ab4f080d2d9dcdadd16390bb544d7dfb07bc91a95ffed675c78b42ee0", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "1cb75d7bc03105e0df4211b4470bdc8837f4a659bc65318286228949779d9dc6" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_workspace", + "file": "app/Modules/Purchasing/WorkspaceNavigation.php", + "repository": "sgf", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1" + }, + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_navigation", + "file": "resources/views/partials/purchasing-navigation.blade.php", + "repository": "sgf", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_picker", + "file": "public/supplier-picker-model.mjs", + "repository": "sgf", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_search_ui", + "file": "public/sourcing-workspace.mjs", + "repository": "sgf", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "15ed768992dfd8858df65ce7fa41c733906875aec98b1c347169d83571cde52e" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_controller", + "file": "app/Modules/Purchasing/DossierController.php", + "repository": "sgf", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_screen", + "file": "resources/views/purchasing-dossier.blade.php", + "repository": "sgf", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_ui", + "file": "public/purchasing-dossier.mjs", + "repository": "sgf", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_documents", + "file": "app/Modules/Purchasing/SupplierDocumentsController.php", + "repository": "sgf", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_document_storage", + "file": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "repository": "sgf", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "a8c7fbe18d9ccd6a7e6fd27275e8827ac6a75f4b147ec02b06fabc30a15f29c8" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_document_ui", + "file": "public/supplier-documents.mjs", + "repository": "sgf", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "70e96bc60238efe6bb8a65297f7412fee9abb143dd96805713bb1deafc784820" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_process_navigation", + "file": "app/Modules/Purchasing/ProcessNavigation.php", + "repository": "sgf", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_focus", + "file": "public/purchasing-focus.mjs", + "repository": "sgf", + "sha256": "434319b8de23f5d6892666bd53232d463a0d458fe948cc6d7b476ad1228fafb6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "77a18d186c8ebb5065cf60816b7fd8d11a37fe801296a60f06ff0a6cf590b2e4" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "434319b8de23f5d6892666bd53232d463a0d458fe948cc6d7b476ad1228fafb6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stage_history", + "file": "app/Modules/Purchasing/ProcessHistory.php", + "repository": "sgf", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_history_ui", + "file": "public/request-history.mjs", + "repository": "sgf", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_workspace_ui", + "file": "public/request-workspace.mjs", + "repository": "sgf", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "e878fc3c7bc5ba24aa2b17fe41ffeda3267721b5beb2a1a3a0cb11f56d7dc93d" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "384c67310d2a7adab7a94273bab385dff74af76c293622bb3c0d087245d7e6d8" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-search-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 51 + } + ], + "sha256": "388e738da7e9b3e7f521c8d67f85dd4ef34869c74daf0c04c09067b9fbde5242", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 52 + } + ], + "sha256": "d5709128ee45b7ee1397695b06502b9386dccd13779203c13abbd54281552068", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-history-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 36 + } + ], + "sha256": "564e0fdbc6a7a1142e72dbf835a96dadf0363d3dc963fc4cdc0a40bd05b8c26e", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. A subsequent scope fix filters request/sourcing audit events in SQL before limits/counts/pages, closing an alternate downstream financial-history exposure without changing original audit or writers. Empty initial supplier searches now survive middleware normalisation while closed-award and permission guards remain. Completed canonical history book is reused read-only with142 tables/sequences intact. Demo8080 removes the direct request-history25-event cap using bounded cursor pages25/100, own-stage SQL filtering and encrypted request/actor/context/size-bound cursors with600-second lifetime. Initial page is reused; history refresh does not reset unsaved request fields.127 original event ids traverse once despite a new head note; refresh includes128. Audit-volume fixtures are not operational request revisions. An inherited100MZN order setup was preserved and removed from future history harness runs. This is not a persistent MVCC snapshot, visual acceptance, sustained-load or deployment validation.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "7ed4b9292e214b11c42af1eae3fb63d967a7e15f026648c957f8a5b54f211f69" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "51a0fa060fcce212646cf22332df352d90a5994cb7785eedc789585e02569616" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "40e7db8ac3d47b60f46fb5b8c623dec9ff9716bc9f2e1ea400d0751f0d0cf890" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_catalogue", + "file": "app/Modules/Purchasing/ReceiptCatalogue.php", + "repository": "sgf", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_workspace_ui", + "file": "public/receipt-workspace.mjs", + "repository": "sgf", + "sha256": "86421d30dc9868b10da2153f8bf0b50d9904ab5ccccbf9813464083ae1e20bd2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "f286a99bb0df5c6080e8104d501707e5a9e13046d5dd7144dec32bf0817a92a0" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "10b412a5ec6c973152f165b34caacc685e25bcf2eb0e6ba2f7f7e58df4e1f00a" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "a128926d876ae10eb2a17ec2410ba99282d782f03bb9642cbdcad93d548ce002" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "f0f242538e4131910d612da1f5b22e4955f3bdc58d4c4121d7b1242a5eb52df5" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "86421d30dc9868b10da2153f8bf0b50d9904ab5ccccbf9813464083ae1e20bd2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_documents", + "file": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "repository": "sgf", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-workspace-completion-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "59bb66df5d5e12f898045669a0ad24664c3d09f2d3ab6cf70f4f13d6a34c6548", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 58 + } + ], + "sha256": "b820a6b355450a79c9f244ce8eb6950e7c1cbe4427bf85bca772fb0fc5c085d2", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Demo8079 fixes the actual form-to-picker binding and blank initial article search. DOM-to-real-HTTP proof selects an article, transmits its revision, previews, confirms1UN and recovers a deliberately lost response with201/200, one receipt/movement. This is not browser visual acceptance or a new concurrency/load trial. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_invoice_controller", + "file": "app/Modules/Purchasing/InvoiceController.php", + "repository": "sgf", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa" + }, + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_invoice_screen", + "file": "resources/views/supplier-invoice-workspace.blade.php", + "repository": "sgf", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "396cea98bce6c2ccff510efd917e2f336ba29657ea5a8277116c41bd70c92e15" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_workspace_ui", + "file": "public/supplier-invoice-workspace.mjs", + "repository": "sgf", + "sha256": "a05b4f56151b8bc9735a0ba2ce47b475e22623aabb8be99a98290860efd6ae9e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "68671400153a97387f77ad0cddbc0f7f6367caeaebef8fc219d84fc8cf118eb3" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "5f0112c38e805fe9ed2e733053bae77f8dd4e3e1cb6b9cba8e4bc7bb469205d7" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "f767347371e2dc1573ec29a926509c87bcdea3ec09257a6b22395fc0cf01366f" + }, + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "a05b4f56151b8bc9735a0ba2ce47b475e22623aabb8be99a98290860efd6ae9e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_matching_progress", + "file": "app/Modules/Purchasing/InvoiceMatchingProgress.php", + "repository": "sgf", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_matching_ui", + "file": "public/invoice-matching.mjs", + "repository": "sgf", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/invoice-matching-progress-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 47 + } + ], + "sha256": "6920219ec33e09abc951c10d8d862e87495b99cd77162f3aea729dcca597b66c", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8081 exposes per-line ordered/accepted/returned/reversed/validated/pending/remaining quantities using two aggregate fact queries and original correction values. Pending documents do not reserve quantity; overlap is a read warning, not a replacement for native validation. Two completed QA books are reused read-only with all tables/sequences unchanged. The display revision uses one original state observation before capability decoration; mutation/state definitions are unchanged. Full dependency materialisation, large invoice-history scaling, visual review, sustained load and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_obligation_controller", + "file": "app/Modules/Purchasing/ObligationController.php", + "repository": "sgf", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_screen", + "file": "resources/views/supplier-obligation-workspace.blade.php", + "repository": "sgf", + "sha256": "73a73bc3f33fede454d40ab7506274ec5128c317e4fc0cbc38fa3808bc6be074", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "cbcef35273b6f54158f60b67f9c2b64c0a93e47cb01ca302b525479ce051e927" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "ce0dc4159d42efcff9e09ec99a2ce5a2d378a215d4a853a37417a0ebf5445506" + }, + { + "proof": "docs/proofs/obligation-evidence-workspace-20261103.json", + "sha256": "73a73bc3f33fede454d40ab7506274ec5128c317e4fc0cbc38fa3808bc6be074" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_workspace_ui", + "file": "public/supplier-obligation-workspace.mjs", + "repository": "sgf", + "sha256": "7f5c8ca11ad603e55c408356c7fb2a46782662d0107caffedcd9d4966a9163e7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "eeb450e38dad72d9c38538ed363202d0a6cfcec466c61171028108f1bc243837" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "8f5154636553130f950d09b46ff917f91250516e10a03e93971cbe537c67f082" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "c2608e3cab7cd1810437a3a978e6f6ccbf2600a83dd0a39bd38510db8249f551" + }, + { + "proof": "docs/proofs/obligation-evidence-workspace-20261103.json", + "sha256": "7f5c8ca11ad603e55c408356c7fb2a46782662d0107caffedcd9d4966a9163e7" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_evidence_ui", + "file": "public/obligation-evidence.mjs", + "repository": "sgf", + "sha256": "c47a75e69d8ea767bc7e07e6fe5fa924fcc4fbd1bd1a90f526ecf255eb2e6fb5", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/obligation-evidence-workspace-20261103.json", + "sha256": "c47a75e69d8ea767bc7e07e6fe5fa924fcc4fbd1bd1a90f526ecf255eb2e6fb5" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 72 + } + ], + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/obligation-evidence-workspace-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 26 + } + ], + "sha256": "fa510ee89931c34d6d9483a6d8f362055a953567f2087ebb1c97ad6bb4c2e117", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8082 separates evidence browsing from an explicitly selected proposal decision. Reason and preview survive pagination; changed observed source/actor/permissions invalidate old forms, and late reads/previews cannot reactivate them. Temporary read failure preserves the form; in-flight operations prevent selection changes.26 new simulated-UI/demo checks reuse72 native authority checks without repetition. Controller/runtime/kernel and legacy evidence branch are unchanged. No new real confirmation, financial writer, backend pagination protocol, visual/load or deployment validation.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/obligation-evidence-workspace-20261103.json b/docs/proofs/obligation-evidence-workspace-20261103.json new file mode 100644 index 0000000..7aa91f5 --- /dev/null +++ b/docs/proofs/obligation-evidence-workspace-20261103.json @@ -0,0 +1,154 @@ +{ + "date": "2026-11-03T19:29:33.147Z", + "increment": "SGF-OBLIGATION-EVIDENCE-WORKSPACE-QA-v1", + "passed": true, + "functional_code": true, + "checks": 26, + "tests": { + "ui": { + "file": "private/receipt-composition-f3ce5f53dab4/obligation-evidence-ui.json", + "sha256": "20c3628bb007cd9eef64cd6be20da227ad113a51c5bffbe8c7f3874db395dc64", + "checks": 20, + "result": { + "passed": true, + "checks": [ + "initial evidence lists proposals without selecting or preparing a decision", + "explicit proposal choice creates one separate decision area", + "choosing same proposal preserves original form and preview", + "event pagination preserves unsaved reason and prepared preview", + "proposal pagination preserves selected decision while keeping other pane page", + "explicit selection of another proposal starts a distinct decision", + "source refresh remains explicit", + "concurrent pane requests retain latest desired page pair", + "late page response cannot move another pane backwards", + "changed source revision disables former evidence actions", + "changed permission snapshot requires refreshed conference even if source revision is unchanged", + "permission refusal invalidates current decision presentation", + "temporary read failure preserves decision for retry", + "preparer cannot select own proposal for independent recognition", + "recognised obligation offers no duplicate-recognition proposal action", + "in-flight operation prevents switching decision selection", + "actual workspace creates no recognition form or command before explicit proposal selection", + "actual preview carries individually selected proposal id and action", + "actual source change disables form while preserving written reason", + "late preview cannot reactivate or confirm obsolete decision" + ], + "dom_simulation": true, + "business_confirmations": 0, + "visual_review": false + } + }, + "demo": { + "file": "private/receipt-composition-f3ce5f53dab4/obligation-evidence-demo.json", + "sha256": "d2db9113bf31801fcc04ad877e111bee0d689f80760ad76229d277fcfd6ef1e4", + "checks": 6, + "result": { + "passed": true, + "checks": [ + "fresh evidence demo contains no main operations proposals or obligations", + "authorised obligation screen enables independent evidence navigation", + "empty demonstration invents no invoice or selected proposal", + "served evidence module matches supplier-obligation-workspace.mjs", + "served evidence module matches obligation-evidence.mjs", + "demo probes preserve proposals obligations events audit and grants" + ], + "before": "19ca587721bd7baafd7b8a4269a25e669b08977e062d27503537ba4d994e524c", + "after": "19ca587721bd7baafd7b8a4269a25e669b08977e062d27503537ba4d994e524c", + "visual_review": false + } + } + }, + "sources": [ + { + "file": "public/obligation-evidence.mjs", + "sha256": "c47a75e69d8ea767bc7e07e6fe5fa924fcc4fbd1bd1a90f526ecf255eb2e6fb5" + }, + { + "file": "public/supplier-obligation-workspace.mjs", + "sha256": "7f5c8ca11ad603e55c408356c7fb2a46782662d0107caffedcd9d4966a9163e7" + }, + { + "file": "config/receipt_qa.php", + "sha256": "e760dbf2e8a06650bdc09fe821ddf7eece530871c6a4b2ed8244b0ea3142b187" + }, + { + "file": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "73a73bc3f33fede454d40ab7506274ec5128c317e4fc0cbc38fa3808bc6be074" + } + ], + "unchanged_authority": [ + { + "file": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + }, + { + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + }, + { + "file": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d" + } + ], + "pinned_native_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "behaviour": { + "explicit_proposal_selection": true, + "reason_and_preview_survive_evidence_pagination": true, + "source_or_permission_change_requires_refresh": true, + "late_preview_cannot_reactivate_stale_form": true, + "temporary_read_failure_preserves_form": true, + "in_flight_decision_prevents_selection_switch": true, + "original_legacy_evidence_branch_preserved": true + }, + "demo": { + "port": 8082, + "entry": "http://127.0.0.1:8082/qa/enter/issuer?open=1", + "initial_main_requests": 0, + "initial_proposals": 0, + "initial_obligations": 0 + }, + "reused_native_proof": { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "checks": 72, + "repeated": false + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "6920219ec33e09abc951c10d8d862e87495b99cd77162f3aea729dcca597b66c" + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "new_right_names": [], + "target_database_connected": false, + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "previous_demo_data_written": false, + "public_rights_changed": false, + "publication": false, + "checkpoint": false + }, + "limitations": [ + "Decision persistence and stale-response tests use simulated DOM/API responses. No new real financial confirmation is claimed.", + "Native preparation/recognition/idempotency/authority proof is reused with unchanged controller/runtime/kernel;72 prior checks are not included in the26 new checks.", + "Source refresh is explicit and starts new conferences; choosing another proposal intentionally replaces the selected decision form.", + "Source/permission checks in the interface use newly observed revision/actor/permission values. The native confirmation remains authoritative for complete current context and source revalidation.", + "The legacy display remains when the flag is disabled. No new pagination protocol or backend load optimisation is introduced.", + "Visual review, accessibility, sustained load, installation and deployment capacity remain pending." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/obligation-home-20261103.json b/docs/proofs/obligation-home-20261103.json new file mode 100644 index 0000000..8aa7b00 --- /dev/null +++ b/docs/proofs/obligation-home-20261103.json @@ -0,0 +1,15 @@ +{ + "passed": true, + "checks": 6, + "names": [ + "obligation view and capability expose link", + "missing right hides link", + "another unit right cannot expose link", + "disabled composition hides link", + "unit selection required", + "existing order and receipt navigation remains available" + ], + "source": "resources/js/PurchasingHome.jsx", + "sha256": "b835535130c04a4ab6b69a4be92cfcd178ea7d2b5bb39bfa3f02ad090b84bcbb", + "visual_review": false +} diff --git a/docs/proofs/order-composition-20261103.json b/docs/proofs/order-composition-20261103.json new file mode 100644 index 0000000..994c9be --- /dev/null +++ b/docs/proofs/order-composition-20261103.json @@ -0,0 +1,286 @@ +{ + "date": "2026-11-03T10:08:43.984Z", + "increment": "SGF-ORDER-TO-RECEIPT-QA-v1", + "functional_code": true, + "passed": true, + "checks": 49, + "tests": { + "workflow": { + "file": "private/receipt-composition-f4a9b4e1ef34/order-result.json", + "sha256": "e34a4e09eb1721dc844325e990088a97fdfb1b59465144d7a63c71728b6cfeaa", + "checks": 28, + "result": { + "passed": true, + "checks": [ + "new composition starts before order issuance and receipt", + "SGF lists only the explicitly mapped approved award", + "functional SGF order workspace is mounted", + "procurement profile can confer an unissued approved award", + "warehouse profile cannot issue an order", + "another tenant award cannot enter the bound unit", + "read-only order right cannot prepare issuance", + "preview describes approved data without downstream effects", + "preview creates no order", + "tampered issuance preview is refused", + "changed agreed source requires a new conference", + "SGF issue permission is revalidated after preview", + "native procurement eligibility is revalidated on issuance", + "final approver must remain eligible in the original workflow", + "failure of SGF provenance prevents a successful issuance response", + "order lines budget commitment and original audit roll back together", + "two independent workers recover one canonical issuance", + "concurrent requests never create a second order", + "original common budget records exactly one100MZN commitment", + "original issuance and SGF provenance are each recorded once", + "order issuance does not receive stock or create an invoice", + "issued original document replaces the issue action", + "order becomes visible to warehouse through explicit source requisition binding", + "issuing and receiving functions remain distinct", + "SGF-issued order receives once through the original receipt workflow", + "receipt history traces back to the actually issued SGF order", + "complete approved order-to-receipt path reaches completion", + "receipt creates neither supplier invoice nor budget consumption" + ], + "orders": 1, + "commit_minor": 10000, + "receipts": 1, + "movements": 1, + "physical_milli": 1000, + "order_to_receipt_complete": true, + "original_workflows": true, + "concurrency_statuses": [ + 200, + 201 + ], + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "guards": { + "file": "private/receipt-composition-f4a9b4e1ef34/order-guards.json", + "sha256": "f39422d27c05dac5e69aaec0ab6ec27214ae657c45a9aa2485a81c274938cbc5", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "disabled order runtime refuses before SQL", + "disabled order endpoint refuses before SQL", + "production cannot activate QA issuance" + ], + "database_queries": 0, + "business_writes": 0 + } + }, + "demonstration": { + "file": "private/receipt-composition-dc8a83df6a24/order-demo-smoke.json", + "sha256": "e82561c35dcad21c0946d0110996c9b75ec6dfe38ec0dda30f9d71cdc48ac987", + "checks": 9, + "result": { + "passed": true, + "checks": [ + "new demonstration preserves unconsumed order and receipt decisions", + "demo has exact order authority for actor", + "order workspace is live", + "demo has exact order authority for issuer", + "demo has exact order authority for validator", + "warehouse waits for issued orders in the same composition", + "served order interface matches source", + "read-only demonstration smoke creates no commitment", + "all initial canonical evidence remains unchanged" + ], + "before": "5e900986891e6686df70c53d9e2bb64121ac2365ff3b53de4aaa3e8280293252", + "after": "5e900986891e6686df70c53d9e2bb64121ac2365ff3b53de4aaa3e8280293252", + "orders": 0, + "receipts": 0, + "movements": 0, + "commitments": 0, + "visual_review": false + } + }, + "assets": { + "file": "private/receipt-composition-dc8a83df6a24/order-demo-assets.json", + "sha256": "91b034db4e5b013eaac5a8c7f0a9cea6fb7473b6f35eb1bdd09cb0baf4b13614", + "checks": 3, + "result": { + "passed": true, + "checks": 3, + "assets": [ + { + "file": "assets/app-BxyAGH3A.js", + "sha256": "ac29aa5dad2da3a74165f2637d65df0076f6f87a2ac11eb30c77cc104e806bd7" + }, + { + "file": "assets/app-BLSNCrO7.css", + "sha256": "ad7650d0b0f7cc40783126a677d419b058f9f1494ae25f194c6d4b32f87ce657" + } + ], + "root_status": 200, + "visual_review": false + } + }, + "navigation": { + "file": "docs/proofs/order-home-20261103.json", + "sha256": "cf952b4d466fea9ff30ffa0b076b173841fea77b507137feee059faa7daf3757", + "checks": 6, + "result": { + "passed": true, + "checks": 6, + "names": [ + "explicit capability right and unit expose order workspace", + "absent order right hides link", + "wrong unit right hides link", + "disabled order capability hides link", + "unit selection required", + "existing receipt link remains available" + ], + "source": "resources/js/PurchasingHome.jsx", + "sha256": "635ee0728b26d0341212552c07430200d17386278af33444d7fee3bdda4d371b", + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/OrderController.php", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "file": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + }, + { + "file": "config/receipt_qa.php", + "sha256": "4bd963b4c59400edfaac136a23d1822e56e8b1dfb39c1112326e62efe32cc4be" + }, + { + "file": "routes/web.php", + "sha256": "e0d77fcbe854e2e218cf257d4ba57fae300e12fc75cb319f2ad8000579099797" + }, + { + "file": "app/Shared/Context/ModuleNavigation.php", + "sha256": "76dcd8ca4f3c39c8db183a5db5eff523d78dd18da1b21e09745f4a488865514c" + }, + { + "file": "app/Modules/Identity/Services/IdentityWorkflow.php", + "sha256": "9cf56b0b1ac4d85448fce9865d90fa60d6dd3f3004b6d5343d4244eccf22fa86" + }, + { + "file": "resources/js/PurchasingHome.jsx", + "sha256": "635ee0728b26d0341212552c07430200d17386278af33444d7fee3bdda4d371b" + }, + { + "file": "resources/views/order-workspace.blade.php", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + }, + { + "file": "public/order-workspace.mjs", + "sha256": "a17bcf3dbf77495c26b19113a0fa3a455ae69e64ea7fe28f83b1e9e1aea3d8fc" + }, + { + "file": "scripts/order-native-setup.php", + "sha256": "66ffb007b20c95a9aa128424c2dcc21fad98a0568330174a12e0fe24a0024139" + }, + { + "file": "scripts/order-host-setup.php", + "sha256": "fb79f2edaa828cdfa3640a1dc86f40f412280ac9b4d8f06450472c52a86e044d" + }, + { + "file": "scripts/order-composition-proof.php", + "sha256": "32a1c29350b94f968e8cd9d2a87690933e662c2588988543add5c3237baa8fd7" + }, + { + "file": "scripts/order-guard-proof.php", + "sha256": "ba8022caf7d2f93db63ec9a309133b4e5301c8a018594e088be3739f926ee37f" + }, + { + "file": "scripts/order-demo-smoke.php", + "sha256": "82886eebc3a16ca9fe20a14802fbee7c9e76c3c0aba79950eb9b3c31f030222f" + }, + { + "file": "scripts/receipt-composition-run.mjs", + "sha256": "ee434e708d4e6ffe0d087e27a420f984f530d4730d149b559e90991ffba6e65e" + }, + { + "file": "scripts/receipt-composition-http.php", + "sha256": "41f5fd174fe77a75ea1c3e156afddbb25f2fc312c2d86fc2d30518311f1cb631" + } + ], + "bundled": { + "receipt-composition-f4a9b4e1ef34": { + "native_manifest_sha256": "abbd12edb596e517924caf6f09dda29a3d1e786aaa47992a08625419d9d7aec6", + "economic_manifest_sha256": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "purchase_workflow_original_sha256": "84f9db1286058087ecb8cf08c64fcd3afc94c91d1509b985b634a3fcafd81295", + "receipt_workflow_original_sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + }, + "receipt-composition-dc8a83df6a24": { + "native_manifest_sha256": "abbd12edb596e517924caf6f09dda29a3d1e786aaa47992a08625419d9d7aec6", + "economic_manifest_sha256": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "purchase_workflow_original_sha256": "84f9db1286058087ecb8cf08c64fcd3afc94c91d1509b985b634a3fcafd81295", + "receipt_workflow_original_sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + }, + "approved_source_created_by_native_select_and_distinct_decide": true, + "qa_rights": [ + "purchasing_orders.view", + "purchasing_orders.issue" + ], + "demo": { + "url": "http://127.0.0.1:8065/qa/enter/actor?open=1", + "warehouse_url": "http://127.0.0.1:8065/qa/enter/validator?open=1", + "review_url": "http://127.0.0.1:8065/qa/enter/issuer?open=1", + "initial_orders": 0, + "initial_receipts": 0, + "initial_movements": 0, + "initial_commitments": 0, + "initial_reserved_minor": 10000, + "port": 8065 + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/receipt-composition-20261103.json", + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e" + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "previous_receipt_demo_manifest_sha256": "5035f3e5c2ad5f5813604c3c3fe5342e784c8e8f22df3b4dea2379254d51879c", + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "existing_demos_written": false, + "real_rights_changed": false, + "purchasing_activated_at_destination": false, + "publication": false, + "checkpoint": false + }, + "diagnostics": { + "initial_attempt_preserved": true, + "reason": "ProposalComparison requires original ProposalScoring/QuotationPricing; those exact files are now pinned and loaded separately from the unchanged installed module." + }, + "limitations": [ + "Entry is an already approved native synthetic award, not yet a supplier-selection/award interface in SGF.", + "No implicit bridge or duplicated budget between SGF requisitions and native awards; the selected source budget alone receives the commitment.", + "Original native snapshot retains legacy budget_checked=false alongside its actual budget_control evidence.", + "One-unit100MZN/zero-tax selected scenario; no real tax or commercial policy validation.", + "New QA roles own their databases; installation/owner-runtime separation and long-lived worker deployment remain unvalidated.", + "No publication, purchasing destination activation, financial settlement, accounting or change of protected real associations.", + "Visual review, sustained load and deployment capacity remain separate." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/order-home-20261103.json b/docs/proofs/order-home-20261103.json new file mode 100644 index 0000000..421ad05 --- /dev/null +++ b/docs/proofs/order-home-20261103.json @@ -0,0 +1,15 @@ +{ + "passed": true, + "checks": 6, + "names": [ + "explicit capability right and unit expose order workspace", + "absent order right hides link", + "wrong unit right hides link", + "disabled order capability hides link", + "unit selection required", + "existing receipt link remains available" + ], + "source": "resources/js/PurchasingHome.jsx", + "sha256": "635ee0728b26d0341212552c07430200d17386278af33444d7fee3bdda4d371b", + "visual_review": false +} diff --git a/docs/proofs/purchasing-completion-20261104.json b/docs/proofs/purchasing-completion-20261104.json new file mode 100644 index 0000000..a2f9f16 --- /dev/null +++ b/docs/proofs/purchasing-completion-20261104.json @@ -0,0 +1,418 @@ +{ + "date": "2026-11-04", + "increment": "SGF-PURCHASING-SINGLE-INSTALLATION-COMPLETE-v1", + "passed": true, + "checks": 59, + "criteria": { + "C01": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C02": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C03": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C04": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C05": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C06": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C07": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C08": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C09": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C10": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + } + }, + "installation": { + "id": "cc50a276c10c", + "entry": "http://127.0.0.1:8085/compras", + "port": 8085, + "reuses_existing_application_and_books": true, + "new_database": false, + "new_role": false, + "new_port": false, + "new_demonstration": false + }, + "tests": { + "flow": { + "file": "private/receipt-composition-cc50a276c10c/completion-flow-result.json", + "sha256": "d7a5f7d0067b319f410fefbca0317bb733327868d0a2d70359010c2ceb552332", + "checks": 13, + "result": { + "passed": true, + "installation": "cc50a276c10c", + "port": 8085, + "checks": [ + "C02 fornecedor novo criado pelo formulário real", + "C02 revisão distinta activa o fornecedor na mesma instalação", + "C03 necessidade criada pelo formulário sem preparar outra demonstração", + "C03 submissão e aprovação pela chefia usam a mesma necessidade", + "C04 três propostas incluem o fornecedor criado e revisto nesta instalação", + "C04 seis avaliações individuais por duas identidades no mesmo processo", + "C05 adjudicação fundamentada recebe aprovação distinta", + "C05 ordem emitida pelo botão real a partir da adjudicação aprovada", + "C06 recepção pelo formulário cria um movimento e recupera resposta perdida sem duplicar", + "C07 documento recebido registado e validado por outra identidade", + "C08 obrigação reconhecida por revisão distinta na mesma instalação", + "C08 documento reconhecido deixa de oferecer nova preparação", + "C08 vencimento ausente fica explícito sem data inventada" + ], + "source_ids": { + "supplier": 8, + "request": 3, + "award": 2, + "order": 1, + "receipt": 1, + "movement": 1, + "invoice": 2, + "proposal": 2, + "obligation": 2 + }, + "actual_workspace_modules": true, + "real_http": true, + "dom_simulation": true, + "new_database": false, + "new_server": false, + "new_demonstration": false, + "payments_created": 0, + "visual_review": false + } + }, + "reads": { + "file": "private/receipt-composition-cc50a276c10c/completion-read-result.json", + "sha256": "02d237debb2e87714fd69d443001a4f03861ddf9af81cc9a1bc3d2b203513446", + "checks": 22, + "result": { + "passed": true, + "checks": [ + "C09 suppliers conserva o documento exacto para trocar de função", + "C09 suppliers abre o documento real da mesma compra", + "C09 requests conserva o documento exacto para trocar de função", + "C09 requests abre o documento real da mesma compra", + "C09 sourcing conserva o documento exacto para trocar de função", + "C09 sourcing abre o documento real da mesma compra", + "C09 orders conserva o documento exacto para trocar de função", + "C09 orders abre o documento real da mesma compra", + "C09 receipts conserva o documento exacto para trocar de função", + "C09 receipts abre o documento real da mesma compra", + "C09 invoices conserva o documento exacto para trocar de função", + "C09 invoices abre o documento real da mesma compra", + "C09 obligations conserva o documento exacto para trocar de função", + "C09 obligations abre o documento real da mesma compra", + "C08 principal e saldo100MZN com origem coerente e vencimento desconhecido", + "C01 entrada recusa função inexistente", + "C01 entrada recusa etapa sem direito", + "C01 entrada recusa destino externo", + "C01 entrada recusa origem ambígua", + "C01 entrada recusa origens misturadas", + "C01 escolha de função exige CSRF", + "C09 painel único consulta documentos autorizados existentes" + ], + "principal_minor": 10000, + "balance_minor": 10000, + "source_conflict": false, + "new_business_commands": 0, + "role_selection_posts": true, + "real_http": true, + "dom_simulation": true, + "visual_review": false + } + }, + "client": { + "file": "private/receipt-composition-cc50a276c10c/completion-client-result.json", + "sha256": "0f58fda6de5e5c0755641a2a68d04876167f699d5f5b10bafc2693f232d386fc", + "checks": 10, + "result": { + "passed": true, + "checks": [ + "C09 prévia legível conserva montantes quantidades estado e pendências", + "C09 dados recebidos são texto e não instruções HTML", + "C09 designações não são confundidas com propriedades de objectos", + "C09 carregamento automático de selectores não marca formulários vazios como alterados", + "C09 cancelar a saída conserva campos por confirmar", + "C09 descarte só ocorre após escolha explícita", + "C09 operação em curso impede mudar função e editar a confirmação", + "C09 confirmação íntegra liberta navegação e restaura controlos", + "C09 resposta incerta mantém campos para recuperação manual", + "C09 fechar a página avisa de campos ainda por confirmar" + ], + "dom_simulation": true, + "business_commands": 0, + "visual_review": false + } + }, + "canonical": { + "file": "private/receipt-composition-cc50a276c10c/completion-data-result.json", + "sha256": "335fc6f7a66be092fd6543aec92933cba76afd4296fcf7d0c5984ac710cf520b", + "checks": 12, + "result": { + "passed": true, + "checks": [ + "C10 requisição adjudicação e ordem pertencem ao mesmo processo nativo", + "C10 três propostas e seis avaliações permanecem gravadas", + "C10 proposta 4 tem dois avaliadores distintos", + "C10 proposta 6 tem dois avaliadores distintos", + "C10 proposta 2 tem dois avaliadores distintos", + "C10 reserva compromisso e consumo100MZN únicos no orçamento nativo", + "C10 uma recepção por identidade distinta do emissor", + "C10 um único movimento físico1UN depois da recuperação da resposta", + "C10 uma factura validada por identidade distinta", + "C10 principal100MZN único e reconhecimento por identidade distinta", + "C10 nenhum pagamento criado no percurso", + "C10 decisões e avaliações mantêm auditoria dos comandos originais" + ], + "facts": { + "request_number": "REQ-2026-000003", + "order_number": "OC-2026-000001", + "invoice_number": "FACT-COMPRA-COMPLETA-20261104", + "principal_minor": 10000, + "physical_milli": 1000 + }, + "source_ids": { + "supplier": 8, + "request": 3, + "award": 2, + "order": 1, + "receipt": 1, + "movement": 1, + "invoice": 2, + "proposal": 2, + "obligation": 2 + }, + "read_only_verification": true, + "new_database": false, + "new_rights": false, + "visual_review": false + } + }, + "preservation": { + "file": "private/receipt-composition-cc50a276c10c/completion-preservation-result.json", + "sha256": "7d4cc9b6ba9c249fdd192ba997a3c1129259cf394062aafb39f54cc4af875635", + "checks": 2, + "result": { + "passed": true, + "checks": [ + "C10 nenhuma concessão alterada durante a conclusão", + "C10 orçamento do host intacto sem autoridade concorrente" + ], + "tables": { + "permission_grants": { + "rows": 65, + "before_sha256": "4299820077d92fc6e9d0d52380bca6e6131aba387f9cf79dbffb58cbacee3f12", + "after_sha256": "4299820077d92fc6e9d0d52380bca6e6131aba387f9cf79dbffb58cbacee3f12" + }, + "cb_budget_entries": { + "rows": 0, + "before_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "after_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + "baseline": "private pre-flow backup", + "database_writes": false, + "restored_database": false, + "new_database": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/PurchasingEntry.php", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25" + }, + { + "file": "resources/views/purchasing-entry.blade.php", + "sha256": "4b65deb9b17af7eb7e512bf64117fb99ea14fb2ebc5b49b2d425fcbad13e3291" + }, + { + "file": "resources/views/purchasing-workspace.blade.php", + "sha256": "23bf96eeb90e006df58d260eee70494441d3954c0c390aa9ae043c8bdcff1115" + }, + { + "file": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "b1b4e8a4aed0c2fc4020a34f430ebe76a6e3a13e137cd6179c6c6cd872f272c2" + }, + { + "file": "resources/views/supplier-workspace.blade.php", + "sha256": "7931bd3cde587a021fbc260186702f701098080e3c61296efd48d1855c745355" + }, + { + "file": "resources/js/PurchasingHome.jsx", + "sha256": "8021d78e6188ce2586bb0d48d50e2b42cc210dff862a307106b065803951ffe6" + }, + { + "file": "public/purchasing-exit.mjs", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4" + }, + { + "file": "public/purchasing-board.mjs", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971" + }, + { + "file": "public/purchasing-presenter.mjs", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389" + }, + { + "file": "public/purchasing-focus.mjs", + "sha256": "804854fbcf066be1688f2d4f15dc13c986dcb44ab30f9fbcbc56d6428c60d21c" + }, + { + "file": "public/request-workspace.mjs", + "sha256": "35875cff6b4cdba1be080896c986a799b59a08fd5e8f956d0b587e11731dbbb7" + }, + { + "file": "public/sourcing-workspace.mjs", + "sha256": "a39889528688affa974f48d3e74994339d0692ea478264a7ab79520db9c8fcd5" + }, + { + "file": "public/order-workspace.mjs", + "sha256": "7658d7b55180e634a71998dad44ba707e0def3c06471a5e1cae1b29381d650f4" + }, + { + "file": "public/receipt-workspace.mjs", + "sha256": "c8e06b575d66a4e160516eff151fd4bc2d901fa68da6e120dbd6673f06f8e18a" + }, + { + "file": "public/supplier-workspace.mjs", + "sha256": "0b0e5e4ccc6f7fe1232c7129045063890e493c56431899e7590ebb5872155516" + }, + { + "file": "public/supplier-invoice-workspace.mjs", + "sha256": "cd84dc3d40546f18f4e091fbe94473405f658fe7cdbafc4e44aee9a9460ddf32" + }, + { + "file": "public/supplier-obligation-workspace.mjs", + "sha256": "d33c2e8426885036b63cd8ce9a6001ae17aab42b775d6a7930eedf721d539bda" + }, + { + "file": "public/obligation-evidence.mjs", + "sha256": "4d9aeac1b404275accf15a3a6ef0d392175cd7afbc02a4e891f19a6a1131f4b3" + } + ], + "unchanged_business_authority": [ + { + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + }, + { + "file": "app/Modules/Purchasing/RequestController.php", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca" + }, + { + "file": "app/Modules/Purchasing/SupplierController.php", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048" + }, + { + "file": "app/Modules/Purchasing/SourcingController.php", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17" + }, + { + "file": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + }, + { + "file": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df" + }, + { + "file": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4" + }, + { + "file": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + }, + { + "file": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d" + }, + { + "file": "resources/js/context-transition.js", + "sha256": "3d76e21eca185ae97c1a6a6f5965ab33c242a28391c8c50f5af30dfc0a4a3c6a" + }, + { + "file": "app/Shared/Context/ModuleNavigation.php", + "sha256": "397d7a4af7d16547ff60ea20a6733aa994d98a6ecf0cbca4b1437da14c3c55a1" + } + ], + "pinned_native_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "pre_navigation_flow_sources": { + "captured_after_success_before_navigation_changes": true, + "files": { + "public/request-workspace.mjs": "1190836eb4397d3dbdd6d655e22d80bf32564bcf579f46b3d7066d3aa211eec7", + "public/supplier-workspace.mjs": "179d2d41d764262d952f67cf5ddec3f5001a5aedb3f876fd427d8f16893bb4d7", + "public/sourcing-workspace.mjs": "a8cb7f90453a914cf1419267197919d51ca57b4d2f0e70400c18df0272039295", + "public/order-workspace.mjs": "3b0192130b600f891e9f9bbd00fe60ee24e8cde5a82d4f79cd9065b2c279334b", + "public/receipt-workspace.mjs": "c99e668d1b55bf233531e2dd90898b21a890bd0b8653cc3fcc7d23de1ee13a0e", + "public/supplier-invoice-workspace.mjs": "4b7868ab73d4da67e161ca8d8565e7e4d5e5c15a81b1c2acc62626428609fc4c", + "public/supplier-obligation-workspace.mjs": "19d5b7778e904e5e6d80aeccd06406472414c29737868c3826370fd35f19dcc0" + } + }, + "build": { + "manifest_sha256": "398b42a158488d42c64e74bc76e59053d19d15089ad7d4f36c1efe4c25c512c5", + "entry_sha256": "1a12c21ebd42d09624e2af87e0132ea0e73c4343193636be10e6548a2ea5decb" + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/stock-period-report-20261103.json", + "sha256": "0ab25af6ffbff7d8ecb651df833771b082bf92d52f97eca4278fcac3fd5ea53b" + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "other_demo_instances_changed": false, + "target_database_connected": false, + "new_public_or_real_rights": false, + "permission_grants_unchanged": true, + "host_budget_unchanged": true, + "activation_of_candidates": false, + "publication": false, + "checkpoint": false + }, + "functional_scope": "Existing local synthetic purchasing acquisition from new supplier and requisition through independently recognised payable. One persistent installation, normal native workflows and UI modules, no replay of completed commands.", + "limits": [ + "The main path uses actual workspace modules/forms and HTTP on8085 with a simulated DOM, not a browser visual/accessibility acceptance.", + "After the successful business flow, document-retention navigation and exit guards were improved;22 read/entry checks and10 client checks cover those changes without repeating the business operations.", + "The final SQL check is READ ONLY and checks canonical state, distinct identities, unique effects and audit. An initial verifier used the wrong evaluation-table name; corrected to the existing proposal_evaluations without replaying any command.", + "The initial host/native database dumps and code-update backups are private and excluded from the repository. Backup extraction comparison proves permissions and host-budget rows unchanged; no restore was executed.", + "8085 is now the continuing working installation with a completed100MZN example, superseding its earlier empty-demo state. Other demos and their historical proofs are preserved.", + "Real operations, payments, accounting of this new origin, fiscal issuance, historical responsibility migration, deployment and publication remain outside this completion.", + "Visual review, sustained load, deployment capability and full operating-system restart have not been validated. The start command was checked against the already running installation and does not provision a new one." + ], + "acceptance_presumed": false +} diff --git a/docs/proofs/purchasing-completion-final-20261104-r2.json b/docs/proofs/purchasing-completion-final-20261104-r2.json new file mode 100644 index 0000000..2b809af --- /dev/null +++ b/docs/proofs/purchasing-completion-final-20261104-r2.json @@ -0,0 +1,472 @@ +{ + "date": "2026-11-04", + "increment": "SGF-PURCHASING-SINGLE-INSTALLATION-COMPLETE-v1", + "passed": true, + "checks": 63, + "criteria": { + "C01": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C02": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C03": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C04": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C05": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C06": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md", + "stock_observation": true + }, + "C07": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C08": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C09": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C10": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + } + }, + "installation": { + "id": "cc50a276c10c", + "entry": "http://127.0.0.1:8085/compras", + "port": 8085, + "reuses_existing_application_and_books": true, + "new_database": false, + "new_role": false, + "new_port": false, + "new_demonstration": false + }, + "tests": { + "flow": { + "file": "private/receipt-composition-cc50a276c10c/completion-flow-result.json", + "sha256": "d7a5f7d0067b319f410fefbca0317bb733327868d0a2d70359010c2ceb552332", + "checks": 13, + "result": { + "passed": true, + "installation": "cc50a276c10c", + "port": 8085, + "checks": [ + "C02 fornecedor novo criado pelo formulário real", + "C02 revisão distinta activa o fornecedor na mesma instalação", + "C03 necessidade criada pelo formulário sem preparar outra demonstração", + "C03 submissão e aprovação pela chefia usam a mesma necessidade", + "C04 três propostas incluem o fornecedor criado e revisto nesta instalação", + "C04 seis avaliações individuais por duas identidades no mesmo processo", + "C05 adjudicação fundamentada recebe aprovação distinta", + "C05 ordem emitida pelo botão real a partir da adjudicação aprovada", + "C06 recepção pelo formulário cria um movimento e recupera resposta perdida sem duplicar", + "C07 documento recebido registado e validado por outra identidade", + "C08 obrigação reconhecida por revisão distinta na mesma instalação", + "C08 documento reconhecido deixa de oferecer nova preparação", + "C08 vencimento ausente fica explícito sem data inventada" + ], + "source_ids": { + "supplier": 8, + "request": 3, + "award": 2, + "order": 1, + "receipt": 1, + "movement": 1, + "invoice": 2, + "proposal": 2, + "obligation": 2 + }, + "actual_workspace_modules": true, + "real_http": true, + "dom_simulation": true, + "new_database": false, + "new_server": false, + "new_demonstration": false, + "payments_created": 0, + "visual_review": false + } + }, + "reads": { + "file": "private/receipt-composition-cc50a276c10c/completion-read-result.json", + "sha256": "02d237debb2e87714fd69d443001a4f03861ddf9af81cc9a1bc3d2b203513446", + "checks": 22, + "result": { + "passed": true, + "checks": [ + "C09 suppliers conserva o documento exacto para trocar de função", + "C09 suppliers abre o documento real da mesma compra", + "C09 requests conserva o documento exacto para trocar de função", + "C09 requests abre o documento real da mesma compra", + "C09 sourcing conserva o documento exacto para trocar de função", + "C09 sourcing abre o documento real da mesma compra", + "C09 orders conserva o documento exacto para trocar de função", + "C09 orders abre o documento real da mesma compra", + "C09 receipts conserva o documento exacto para trocar de função", + "C09 receipts abre o documento real da mesma compra", + "C09 invoices conserva o documento exacto para trocar de função", + "C09 invoices abre o documento real da mesma compra", + "C09 obligations conserva o documento exacto para trocar de função", + "C09 obligations abre o documento real da mesma compra", + "C08 principal e saldo100MZN com origem coerente e vencimento desconhecido", + "C01 entrada recusa função inexistente", + "C01 entrada recusa etapa sem direito", + "C01 entrada recusa destino externo", + "C01 entrada recusa origem ambígua", + "C01 entrada recusa origens misturadas", + "C01 escolha de função exige CSRF", + "C09 painel único consulta documentos autorizados existentes" + ], + "principal_minor": 10000, + "balance_minor": 10000, + "source_conflict": false, + "new_business_commands": 0, + "role_selection_posts": true, + "real_http": true, + "dom_simulation": true, + "visual_review": false + } + }, + "client": { + "file": "private/receipt-composition-cc50a276c10c/completion-client-result.json", + "sha256": "0f58fda6de5e5c0755641a2a68d04876167f699d5f5b10bafc2693f232d386fc", + "checks": 10, + "result": { + "passed": true, + "checks": [ + "C09 prévia legível conserva montantes quantidades estado e pendências", + "C09 dados recebidos são texto e não instruções HTML", + "C09 designações não são confundidas com propriedades de objectos", + "C09 carregamento automático de selectores não marca formulários vazios como alterados", + "C09 cancelar a saída conserva campos por confirmar", + "C09 descarte só ocorre após escolha explícita", + "C09 operação em curso impede mudar função e editar a confirmação", + "C09 confirmação íntegra liberta navegação e restaura controlos", + "C09 resposta incerta mantém campos para recuperação manual", + "C09 fechar a página avisa de campos ainda por confirmar" + ], + "dom_simulation": true, + "business_commands": 0, + "visual_review": false + } + }, + "canonical": { + "file": "private/receipt-composition-cc50a276c10c/completion-data-result.json", + "sha256": "335fc6f7a66be092fd6543aec92933cba76afd4296fcf7d0c5984ac710cf520b", + "checks": 12, + "result": { + "passed": true, + "checks": [ + "C10 requisição adjudicação e ordem pertencem ao mesmo processo nativo", + "C10 três propostas e seis avaliações permanecem gravadas", + "C10 proposta 4 tem dois avaliadores distintos", + "C10 proposta 6 tem dois avaliadores distintos", + "C10 proposta 2 tem dois avaliadores distintos", + "C10 reserva compromisso e consumo100MZN únicos no orçamento nativo", + "C10 uma recepção por identidade distinta do emissor", + "C10 um único movimento físico1UN depois da recuperação da resposta", + "C10 uma factura validada por identidade distinta", + "C10 principal100MZN único e reconhecimento por identidade distinta", + "C10 nenhum pagamento criado no percurso", + "C10 decisões e avaliações mantêm auditoria dos comandos originais" + ], + "facts": { + "request_number": "REQ-2026-000003", + "order_number": "OC-2026-000001", + "invoice_number": "FACT-COMPRA-COMPLETA-20261104", + "principal_minor": 10000, + "physical_milli": 1000 + }, + "source_ids": { + "supplier": 8, + "request": 3, + "award": 2, + "order": 1, + "receipt": 1, + "movement": 1, + "invoice": 2, + "proposal": 2, + "obligation": 2 + }, + "read_only_verification": true, + "new_database": false, + "new_rights": false, + "visual_review": false + } + }, + "preservation": { + "file": "private/receipt-composition-cc50a276c10c/completion-preservation-result.json", + "sha256": "7d4cc9b6ba9c249fdd192ba997a3c1129259cf394062aafb39f54cc4af875635", + "checks": 2, + "result": { + "passed": true, + "checks": [ + "C10 nenhuma concessão alterada durante a conclusão", + "C10 orçamento do host intacto sem autoridade concorrente" + ], + "tables": { + "permission_grants": { + "rows": 65, + "before_sha256": "4299820077d92fc6e9d0d52380bca6e6131aba387f9cf79dbffb58cbacee3f12", + "after_sha256": "4299820077d92fc6e9d0d52380bca6e6131aba387f9cf79dbffb58cbacee3f12" + }, + "cb_budget_entries": { + "rows": 0, + "before_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "after_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + "baseline": "private pre-flow backup", + "database_writes": false, + "restored_database": false, + "new_database": false + } + }, + "stock": { + "file": "private/receipt-composition-cc50a276c10c/completion-stock-result.json", + "sha256": "b9cabd84f5cdc40b04e04bcbe3bcf2aad9a0bc86f25b1ef6b2118cdce45ed8b6", + "checks": 1, + "result": { + "passed": true, + "checks": [ + "C06 Stock consulta na mesma instalação o movimento1UN criado pela recepção do percurso completo" + ], + "movement_id": 1, + "physical_milli": "1000", + "new_business_commands": 0, + "same_installation": true, + "visual_review": false + } + }, + "handoffs": { + "file": "private/receipt-composition-cc50a276c10c/completion-handoffs-result.json", + "sha256": "47319261f758304bedf309e5c01a8295b4fe1ba8ff860ee094bfb376545c5c0a", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "C09 requester continua para a próxima etapa por escolha explícita da função, sem403 nem copiar IDs", + "C09 validator continua para a próxima etapa por escolha explícita da função, sem403 nem copiar IDs", + "C09 instalações anteriores sem a entrada única conservam os links restritos pelo menu" + ], + "sources": [ + { + "file": "public/purchasing-focus.mjs", + "sha256": "8b3000f6f52f19d7ed9ea5886491c10549b29b41d45eba4ab60893e7bee10d84" + }, + { + "file": "public/request-workspace.mjs", + "sha256": "ae1aa47cecc60269b596b6cca6351713f2c087f4d623bb2e9b5864aa913c7235" + } + ], + "business_commands": 0, + "same_installation": true, + "dom_simulation": true, + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/PurchasingEntry.php", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25" + }, + { + "file": "resources/views/purchasing-entry.blade.php", + "sha256": "4b65deb9b17af7eb7e512bf64117fb99ea14fb2ebc5b49b2d425fcbad13e3291" + }, + { + "file": "resources/views/purchasing-workspace.blade.php", + "sha256": "23bf96eeb90e006df58d260eee70494441d3954c0c390aa9ae043c8bdcff1115" + }, + { + "file": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "b1b4e8a4aed0c2fc4020a34f430ebe76a6e3a13e137cd6179c6c6cd872f272c2" + }, + { + "file": "resources/views/supplier-workspace.blade.php", + "sha256": "7931bd3cde587a021fbc260186702f701098080e3c61296efd48d1855c745355" + }, + { + "file": "resources/js/PurchasingHome.jsx", + "sha256": "8021d78e6188ce2586bb0d48d50e2b42cc210dff862a307106b065803951ffe6" + }, + { + "file": "public/purchasing-exit.mjs", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4" + }, + { + "file": "public/purchasing-board.mjs", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971" + }, + { + "file": "public/purchasing-presenter.mjs", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389" + }, + { + "file": "public/purchasing-focus.mjs", + "sha256": "8b3000f6f52f19d7ed9ea5886491c10549b29b41d45eba4ab60893e7bee10d84" + }, + { + "file": "public/request-workspace.mjs", + "sha256": "ae1aa47cecc60269b596b6cca6351713f2c087f4d623bb2e9b5864aa913c7235" + }, + { + "file": "public/sourcing-workspace.mjs", + "sha256": "a39889528688affa974f48d3e74994339d0692ea478264a7ab79520db9c8fcd5" + }, + { + "file": "public/order-workspace.mjs", + "sha256": "7658d7b55180e634a71998dad44ba707e0def3c06471a5e1cae1b29381d650f4" + }, + { + "file": "public/receipt-workspace.mjs", + "sha256": "c8e06b575d66a4e160516eff151fd4bc2d901fa68da6e120dbd6673f06f8e18a" + }, + { + "file": "public/supplier-workspace.mjs", + "sha256": "0b0e5e4ccc6f7fe1232c7129045063890e493c56431899e7590ebb5872155516" + }, + { + "file": "public/supplier-invoice-workspace.mjs", + "sha256": "cd84dc3d40546f18f4e091fbe94473405f658fe7cdbafc4e44aee9a9460ddf32" + }, + { + "file": "public/supplier-obligation-workspace.mjs", + "sha256": "d33c2e8426885036b63cd8ce9a6001ae17aab42b775d6a7930eedf721d539bda" + }, + { + "file": "public/obligation-evidence.mjs", + "sha256": "4d9aeac1b404275accf15a3a6ef0d392175cd7afbc02a4e891f19a6a1131f4b3" + } + ], + "unchanged_business_authority": [ + { + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + }, + { + "file": "app/Modules/Purchasing/RequestController.php", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca" + }, + { + "file": "app/Modules/Purchasing/SupplierController.php", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048" + }, + { + "file": "app/Modules/Purchasing/SourcingController.php", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17" + }, + { + "file": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + }, + { + "file": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df" + }, + { + "file": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4" + }, + { + "file": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + }, + { + "file": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d" + }, + { + "file": "resources/js/context-transition.js", + "sha256": "3d76e21eca185ae97c1a6a6f5965ab33c242a28391c8c50f5af30dfc0a4a3c6a" + }, + { + "file": "app/Shared/Context/ModuleNavigation.php", + "sha256": "397d7a4af7d16547ff60ea20a6733aa994d98a6ecf0cbca4b1437da14c3c55a1" + } + ], + "pinned_native_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "pre_navigation_flow_sources": { + "captured_after_success_before_navigation_changes": true, + "files": { + "public/request-workspace.mjs": "1190836eb4397d3dbdd6d655e22d80bf32564bcf579f46b3d7066d3aa211eec7", + "public/supplier-workspace.mjs": "179d2d41d764262d952f67cf5ddec3f5001a5aedb3f876fd427d8f16893bb4d7", + "public/sourcing-workspace.mjs": "a8cb7f90453a914cf1419267197919d51ca57b4d2f0e70400c18df0272039295", + "public/order-workspace.mjs": "3b0192130b600f891e9f9bbd00fe60ee24e8cde5a82d4f79cd9065b2c279334b", + "public/receipt-workspace.mjs": "c99e668d1b55bf233531e2dd90898b21a890bd0b8653cc3fcc7d23de1ee13a0e", + "public/supplier-invoice-workspace.mjs": "4b7868ab73d4da67e161ca8d8565e7e4d5e5c15a81b1c2acc62626428609fc4c", + "public/supplier-obligation-workspace.mjs": "19d5b7778e904e5e6d80aeccd06406472414c29737868c3826370fd35f19dcc0" + } + }, + "build": { + "manifest_sha256": "398b42a158488d42c64e74bc76e59053d19d15089ad7d4f36c1efe4c25c512c5", + "entry_sha256": "1a12c21ebd42d09624e2af87e0132ea0e73c4343193636be10e6548a2ea5decb" + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/stock-period-report-20261103.json", + "sha256": "0ab25af6ffbff7d8ecb651df833771b082bf92d52f97eca4278fcac3fd5ea53b" + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "other_demo_instances_changed": false, + "target_database_connected": false, + "new_public_or_real_rights": false, + "permission_grants_unchanged": true, + "host_budget_unchanged": true, + "activation_of_candidates": false, + "publication": false, + "checkpoint": false + }, + "functional_scope": "Existing local synthetic purchasing acquisition from new supplier and requisition through independently recognised payable. One persistent installation, normal native workflows and UI modules, no replay of completed commands.", + "limits": [ + "The main path uses actual workspace modules/forms and HTTP on8085 with a simulated DOM, not a browser visual/accessibility acceptance.", + "After the successful business flow, document-retention navigation and exit guards were improved;22 read/entry checks and10 client checks cover those changes without repeating the business operations.", + "The final SQL check is READ ONLY and checks canonical state, distinct identities, unique effects and audit. An initial verifier used the wrong evaluation-table name; corrected to the existing proposal_evaluations without replaying any command.", + "The initial host/native database dumps and code-update backups are private and excluded from the repository. Backup extraction comparison proves permissions and host-budget rows unchanged; no restore was executed.", + "8085 is now the continuing working installation with a completed100MZN example, superseding its earlier empty-demo state. Other demos and their historical proofs are preserved.", + "Real operations, payments, accounting of this new origin, fiscal issuance, historical responsibility migration, deployment and publication remain outside this completion.", + "Visual review, sustained load, deployment capability and full operating-system restart have not been validated. The start command was checked against the already running installation and does not provision a new one.", + "Three additional read-only UI checks cover the final explicit function handoffs from request and receipt; the completed business commands were not replayed." + ], + "acceptance_presumed": false, + "initial_summary_preserved": { + "file": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "60b73e7691fd7a7dc6fd222658390d15c0c7020193b03bc3ab8ad22ba8b1eded" + }, + "final_summary": true, + "previous_final_preserved": { + "file": "docs/proofs/purchasing-completion-final-20261104.json", + "sha256": "2b0b4630820e2adf04fbadebac04ba2d6c8293df722b3ea99ea04c614254f1cf" + } +} diff --git a/docs/proofs/purchasing-completion-final-20261104.json b/docs/proofs/purchasing-completion-final-20261104.json new file mode 100644 index 0000000..228ea8c --- /dev/null +++ b/docs/proofs/purchasing-completion-final-20261104.json @@ -0,0 +1,440 @@ +{ + "date": "2026-11-04", + "increment": "SGF-PURCHASING-SINGLE-INSTALLATION-COMPLETE-v1", + "passed": true, + "checks": 60, + "criteria": { + "C01": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C02": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C03": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C04": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C05": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C06": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md", + "stock_observation": true + }, + "C07": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C08": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C09": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + }, + "C10": { + "passed": true, + "definition": "docs/PURCHASING_COMPLETION.md" + } + }, + "installation": { + "id": "cc50a276c10c", + "entry": "http://127.0.0.1:8085/compras", + "port": 8085, + "reuses_existing_application_and_books": true, + "new_database": false, + "new_role": false, + "new_port": false, + "new_demonstration": false + }, + "tests": { + "flow": { + "file": "private/receipt-composition-cc50a276c10c/completion-flow-result.json", + "sha256": "d7a5f7d0067b319f410fefbca0317bb733327868d0a2d70359010c2ceb552332", + "checks": 13, + "result": { + "passed": true, + "installation": "cc50a276c10c", + "port": 8085, + "checks": [ + "C02 fornecedor novo criado pelo formulário real", + "C02 revisão distinta activa o fornecedor na mesma instalação", + "C03 necessidade criada pelo formulário sem preparar outra demonstração", + "C03 submissão e aprovação pela chefia usam a mesma necessidade", + "C04 três propostas incluem o fornecedor criado e revisto nesta instalação", + "C04 seis avaliações individuais por duas identidades no mesmo processo", + "C05 adjudicação fundamentada recebe aprovação distinta", + "C05 ordem emitida pelo botão real a partir da adjudicação aprovada", + "C06 recepção pelo formulário cria um movimento e recupera resposta perdida sem duplicar", + "C07 documento recebido registado e validado por outra identidade", + "C08 obrigação reconhecida por revisão distinta na mesma instalação", + "C08 documento reconhecido deixa de oferecer nova preparação", + "C08 vencimento ausente fica explícito sem data inventada" + ], + "source_ids": { + "supplier": 8, + "request": 3, + "award": 2, + "order": 1, + "receipt": 1, + "movement": 1, + "invoice": 2, + "proposal": 2, + "obligation": 2 + }, + "actual_workspace_modules": true, + "real_http": true, + "dom_simulation": true, + "new_database": false, + "new_server": false, + "new_demonstration": false, + "payments_created": 0, + "visual_review": false + } + }, + "reads": { + "file": "private/receipt-composition-cc50a276c10c/completion-read-result.json", + "sha256": "02d237debb2e87714fd69d443001a4f03861ddf9af81cc9a1bc3d2b203513446", + "checks": 22, + "result": { + "passed": true, + "checks": [ + "C09 suppliers conserva o documento exacto para trocar de função", + "C09 suppliers abre o documento real da mesma compra", + "C09 requests conserva o documento exacto para trocar de função", + "C09 requests abre o documento real da mesma compra", + "C09 sourcing conserva o documento exacto para trocar de função", + "C09 sourcing abre o documento real da mesma compra", + "C09 orders conserva o documento exacto para trocar de função", + "C09 orders abre o documento real da mesma compra", + "C09 receipts conserva o documento exacto para trocar de função", + "C09 receipts abre o documento real da mesma compra", + "C09 invoices conserva o documento exacto para trocar de função", + "C09 invoices abre o documento real da mesma compra", + "C09 obligations conserva o documento exacto para trocar de função", + "C09 obligations abre o documento real da mesma compra", + "C08 principal e saldo100MZN com origem coerente e vencimento desconhecido", + "C01 entrada recusa função inexistente", + "C01 entrada recusa etapa sem direito", + "C01 entrada recusa destino externo", + "C01 entrada recusa origem ambígua", + "C01 entrada recusa origens misturadas", + "C01 escolha de função exige CSRF", + "C09 painel único consulta documentos autorizados existentes" + ], + "principal_minor": 10000, + "balance_minor": 10000, + "source_conflict": false, + "new_business_commands": 0, + "role_selection_posts": true, + "real_http": true, + "dom_simulation": true, + "visual_review": false + } + }, + "client": { + "file": "private/receipt-composition-cc50a276c10c/completion-client-result.json", + "sha256": "0f58fda6de5e5c0755641a2a68d04876167f699d5f5b10bafc2693f232d386fc", + "checks": 10, + "result": { + "passed": true, + "checks": [ + "C09 prévia legível conserva montantes quantidades estado e pendências", + "C09 dados recebidos são texto e não instruções HTML", + "C09 designações não são confundidas com propriedades de objectos", + "C09 carregamento automático de selectores não marca formulários vazios como alterados", + "C09 cancelar a saída conserva campos por confirmar", + "C09 descarte só ocorre após escolha explícita", + "C09 operação em curso impede mudar função e editar a confirmação", + "C09 confirmação íntegra liberta navegação e restaura controlos", + "C09 resposta incerta mantém campos para recuperação manual", + "C09 fechar a página avisa de campos ainda por confirmar" + ], + "dom_simulation": true, + "business_commands": 0, + "visual_review": false + } + }, + "canonical": { + "file": "private/receipt-composition-cc50a276c10c/completion-data-result.json", + "sha256": "335fc6f7a66be092fd6543aec92933cba76afd4296fcf7d0c5984ac710cf520b", + "checks": 12, + "result": { + "passed": true, + "checks": [ + "C10 requisição adjudicação e ordem pertencem ao mesmo processo nativo", + "C10 três propostas e seis avaliações permanecem gravadas", + "C10 proposta 4 tem dois avaliadores distintos", + "C10 proposta 6 tem dois avaliadores distintos", + "C10 proposta 2 tem dois avaliadores distintos", + "C10 reserva compromisso e consumo100MZN únicos no orçamento nativo", + "C10 uma recepção por identidade distinta do emissor", + "C10 um único movimento físico1UN depois da recuperação da resposta", + "C10 uma factura validada por identidade distinta", + "C10 principal100MZN único e reconhecimento por identidade distinta", + "C10 nenhum pagamento criado no percurso", + "C10 decisões e avaliações mantêm auditoria dos comandos originais" + ], + "facts": { + "request_number": "REQ-2026-000003", + "order_number": "OC-2026-000001", + "invoice_number": "FACT-COMPRA-COMPLETA-20261104", + "principal_minor": 10000, + "physical_milli": 1000 + }, + "source_ids": { + "supplier": 8, + "request": 3, + "award": 2, + "order": 1, + "receipt": 1, + "movement": 1, + "invoice": 2, + "proposal": 2, + "obligation": 2 + }, + "read_only_verification": true, + "new_database": false, + "new_rights": false, + "visual_review": false + } + }, + "preservation": { + "file": "private/receipt-composition-cc50a276c10c/completion-preservation-result.json", + "sha256": "7d4cc9b6ba9c249fdd192ba997a3c1129259cf394062aafb39f54cc4af875635", + "checks": 2, + "result": { + "passed": true, + "checks": [ + "C10 nenhuma concessão alterada durante a conclusão", + "C10 orçamento do host intacto sem autoridade concorrente" + ], + "tables": { + "permission_grants": { + "rows": 65, + "before_sha256": "4299820077d92fc6e9d0d52380bca6e6131aba387f9cf79dbffb58cbacee3f12", + "after_sha256": "4299820077d92fc6e9d0d52380bca6e6131aba387f9cf79dbffb58cbacee3f12" + }, + "cb_budget_entries": { + "rows": 0, + "before_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "after_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + "baseline": "private pre-flow backup", + "database_writes": false, + "restored_database": false, + "new_database": false + } + }, + "stock": { + "file": "private/receipt-composition-cc50a276c10c/completion-stock-result.json", + "sha256": "b9cabd84f5cdc40b04e04bcbe3bcf2aad9a0bc86f25b1ef6b2118cdce45ed8b6", + "checks": 1, + "result": { + "passed": true, + "checks": [ + "C06 Stock consulta na mesma instalação o movimento1UN criado pela recepção do percurso completo" + ], + "movement_id": 1, + "physical_milli": "1000", + "new_business_commands": 0, + "same_installation": true, + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/PurchasingEntry.php", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25" + }, + { + "file": "resources/views/purchasing-entry.blade.php", + "sha256": "4b65deb9b17af7eb7e512bf64117fb99ea14fb2ebc5b49b2d425fcbad13e3291" + }, + { + "file": "resources/views/purchasing-workspace.blade.php", + "sha256": "23bf96eeb90e006df58d260eee70494441d3954c0c390aa9ae043c8bdcff1115" + }, + { + "file": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "b1b4e8a4aed0c2fc4020a34f430ebe76a6e3a13e137cd6179c6c6cd872f272c2" + }, + { + "file": "resources/views/supplier-workspace.blade.php", + "sha256": "7931bd3cde587a021fbc260186702f701098080e3c61296efd48d1855c745355" + }, + { + "file": "resources/js/PurchasingHome.jsx", + "sha256": "8021d78e6188ce2586bb0d48d50e2b42cc210dff862a307106b065803951ffe6" + }, + { + "file": "public/purchasing-exit.mjs", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4" + }, + { + "file": "public/purchasing-board.mjs", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971" + }, + { + "file": "public/purchasing-presenter.mjs", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389" + }, + { + "file": "public/purchasing-focus.mjs", + "sha256": "804854fbcf066be1688f2d4f15dc13c986dcb44ab30f9fbcbc56d6428c60d21c" + }, + { + "file": "public/request-workspace.mjs", + "sha256": "35875cff6b4cdba1be080896c986a799b59a08fd5e8f956d0b587e11731dbbb7" + }, + { + "file": "public/sourcing-workspace.mjs", + "sha256": "a39889528688affa974f48d3e74994339d0692ea478264a7ab79520db9c8fcd5" + }, + { + "file": "public/order-workspace.mjs", + "sha256": "7658d7b55180e634a71998dad44ba707e0def3c06471a5e1cae1b29381d650f4" + }, + { + "file": "public/receipt-workspace.mjs", + "sha256": "c8e06b575d66a4e160516eff151fd4bc2d901fa68da6e120dbd6673f06f8e18a" + }, + { + "file": "public/supplier-workspace.mjs", + "sha256": "0b0e5e4ccc6f7fe1232c7129045063890e493c56431899e7590ebb5872155516" + }, + { + "file": "public/supplier-invoice-workspace.mjs", + "sha256": "cd84dc3d40546f18f4e091fbe94473405f658fe7cdbafc4e44aee9a9460ddf32" + }, + { + "file": "public/supplier-obligation-workspace.mjs", + "sha256": "d33c2e8426885036b63cd8ce9a6001ae17aab42b775d6a7930eedf721d539bda" + }, + { + "file": "public/obligation-evidence.mjs", + "sha256": "4d9aeac1b404275accf15a3a6ef0d392175cd7afbc02a4e891f19a6a1131f4b3" + } + ], + "unchanged_business_authority": [ + { + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + }, + { + "file": "app/Modules/Purchasing/RequestController.php", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca" + }, + { + "file": "app/Modules/Purchasing/SupplierController.php", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048" + }, + { + "file": "app/Modules/Purchasing/SourcingController.php", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17" + }, + { + "file": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + }, + { + "file": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df" + }, + { + "file": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4" + }, + { + "file": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + }, + { + "file": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d" + }, + { + "file": "resources/js/context-transition.js", + "sha256": "3d76e21eca185ae97c1a6a6f5965ab33c242a28391c8c50f5af30dfc0a4a3c6a" + }, + { + "file": "app/Shared/Context/ModuleNavigation.php", + "sha256": "397d7a4af7d16547ff60ea20a6733aa994d98a6ecf0cbca4b1437da14c3c55a1" + } + ], + "pinned_native_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "pre_navigation_flow_sources": { + "captured_after_success_before_navigation_changes": true, + "files": { + "public/request-workspace.mjs": "1190836eb4397d3dbdd6d655e22d80bf32564bcf579f46b3d7066d3aa211eec7", + "public/supplier-workspace.mjs": "179d2d41d764262d952f67cf5ddec3f5001a5aedb3f876fd427d8f16893bb4d7", + "public/sourcing-workspace.mjs": "a8cb7f90453a914cf1419267197919d51ca57b4d2f0e70400c18df0272039295", + "public/order-workspace.mjs": "3b0192130b600f891e9f9bbd00fe60ee24e8cde5a82d4f79cd9065b2c279334b", + "public/receipt-workspace.mjs": "c99e668d1b55bf233531e2dd90898b21a890bd0b8653cc3fcc7d23de1ee13a0e", + "public/supplier-invoice-workspace.mjs": "4b7868ab73d4da67e161ca8d8565e7e4d5e5c15a81b1c2acc62626428609fc4c", + "public/supplier-obligation-workspace.mjs": "19d5b7778e904e5e6d80aeccd06406472414c29737868c3826370fd35f19dcc0" + } + }, + "build": { + "manifest_sha256": "398b42a158488d42c64e74bc76e59053d19d15089ad7d4f36c1efe4c25c512c5", + "entry_sha256": "1a12c21ebd42d09624e2af87e0132ea0e73c4343193636be10e6548a2ea5decb" + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/stock-period-report-20261103.json", + "sha256": "0ab25af6ffbff7d8ecb651df833771b082bf92d52f97eca4278fcac3fd5ea53b" + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "other_demo_instances_changed": false, + "target_database_connected": false, + "new_public_or_real_rights": false, + "permission_grants_unchanged": true, + "host_budget_unchanged": true, + "activation_of_candidates": false, + "publication": false, + "checkpoint": false + }, + "functional_scope": "Existing local synthetic purchasing acquisition from new supplier and requisition through independently recognised payable. One persistent installation, normal native workflows and UI modules, no replay of completed commands.", + "limits": [ + "The main path uses actual workspace modules/forms and HTTP on8085 with a simulated DOM, not a browser visual/accessibility acceptance.", + "After the successful business flow, document-retention navigation and exit guards were improved;22 read/entry checks and10 client checks cover those changes without repeating the business operations.", + "The final SQL check is READ ONLY and checks canonical state, distinct identities, unique effects and audit. An initial verifier used the wrong evaluation-table name; corrected to the existing proposal_evaluations without replaying any command.", + "The initial host/native database dumps and code-update backups are private and excluded from the repository. Backup extraction comparison proves permissions and host-budget rows unchanged; no restore was executed.", + "8085 is now the continuing working installation with a completed100MZN example, superseding its earlier empty-demo state. Other demos and their historical proofs are preserved.", + "Real operations, payments, accounting of this new origin, fiscal issuance, historical responsibility migration, deployment and publication remain outside this completion.", + "Visual review, sustained load, deployment capability and full operating-system restart have not been validated. The start command was checked against the already running installation and does not provision a new one." + ], + "acceptance_presumed": false, + "initial_summary_preserved": { + "file": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "60b73e7691fd7a7dc6fd222658390d15c0c7020193b03bc3ab8ad22ba8b1eded" + }, + "final_summary": true +} diff --git a/docs/proofs/purchasing-completion-flow-20261104.json b/docs/proofs/purchasing-completion-flow-20261104.json new file mode 100644 index 0000000..888f75f --- /dev/null +++ b/docs/proofs/purchasing-completion-flow-20261104.json @@ -0,0 +1,846 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "a7c7183ebffccdb3b81ba6138852b5f00e121871ebbca12efb30fc4e9464aede", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "fd02da1a69f76bf1412f86f43095a0a476de49fbb7d2676a51fe3b29ec66e298", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "7931bd3cde587a021fbc260186702f701098080e3c61296efd48d1855c745355", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_screen", + "repository": "sgf", + "path": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_screen", + "repository": "sgf", + "path": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "73a73bc3f33fede454d40ab7506274ec5128c317e4fc0cbc38fa3808bc6be074", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_workspace", + "repository": "sgf", + "path": "app/Modules/Purchasing/WorkspaceNavigation.php", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_navigation", + "repository": "sgf", + "path": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "b1b4e8a4aed0c2fc4020a34f430ebe76a6e3a13e137cd6179c6c6cd872f272c2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_picker", + "repository": "sgf", + "path": "public/supplier-picker-model.mjs", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_search_ui", + "repository": "sgf", + "path": "public/sourcing-workspace.mjs", + "sha256": "a39889528688affa974f48d3e74994339d0692ea478264a7ab79520db9c8fcd5", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/DossierController.php", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_screen", + "repository": "sgf", + "path": "resources/views/purchasing-dossier.blade.php", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_ui", + "repository": "sgf", + "path": "public/purchasing-dossier.mjs", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_catalogue", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptCatalogue.php", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_workspace_ui", + "repository": "sgf", + "path": "public/receipt-workspace.mjs", + "sha256": "c8e06b575d66a4e160516eff151fd4bc2d901fa68da6e120dbd6673f06f8e18a", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentsController.php", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_storage", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_ui", + "repository": "sgf", + "path": "public/supplier-documents.mjs", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_process_navigation", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessNavigation.php", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_focus", + "repository": "sgf", + "path": "public/purchasing-focus.mjs", + "sha256": "804854fbcf066be1688f2d4f15dc13c986dcb44ab30f9fbcbc56d6428c60d21c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stage_history", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessHistory.php", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_workspace_ui", + "repository": "sgf", + "path": "public/supplier-invoice-workspace.mjs", + "sha256": "cd84dc3d40546f18f4e091fbe94473405f658fe7cdbafc4e44aee9a9460ddf32", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_workspace_ui", + "repository": "sgf", + "path": "public/supplier-obligation-workspace.mjs", + "sha256": "d33c2e8426885036b63cd8ce9a6001ae17aab42b775d6a7930eedf721d539bda", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_history_ui", + "repository": "sgf", + "path": "public/request-history.mjs", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_workspace_ui", + "repository": "sgf", + "path": "public/request-workspace.mjs", + "sha256": "35875cff6b4cdba1be080896c986a799b59a08fd5e8f956d0b587e11731dbbb7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_matching_progress", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceMatchingProgress.php", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_matching_ui", + "repository": "sgf", + "path": "public/invoice-matching.mjs", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_evidence_ui", + "repository": "sgf", + "path": "public/obligation-evidence.mjs", + "sha256": "4d9aeac1b404275accf15a3a6ef0d392175cd7afbc02a4e891f19a6a1131f4b3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_composed_stock_read", + "repository": "sgf", + "path": "app/Modules/Inventory/CompositionStockRead.php", + "sha256": "01c558457df290879bdf6c7f8de8cd9efccad81b940731f0aaf2489cf02bfcf7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_receipt_trace", + "repository": "sgf", + "path": "app/Modules/Purchasing/StockReceiptTraceController.php", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_receipt_transition", + "repository": "sgf", + "path": "resources/js/stock-receipt-trace.js", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_receipt_focus", + "repository": "sgf", + "path": "public/stock-receipt-focus.mjs", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_period_projection", + "repository": "sgf", + "path": "app/Modules/Inventory/StockPeriodReport.php", + "sha256": "d491541c6c60bc0c661dc442b8db8ce2e757f1d63dfc4982a3631f820cfb7a06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_period_ui", + "repository": "sgf", + "path": "resources/js/StockPeriodReportWorkspace.jsx", + "sha256": "a03fa2fde5f7cc17cff4349d87feffe465888cea77bc0dfa62029bc92755ccbd", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_period_request", + "repository": "sgf", + "path": "resources/js/stock-period-request.js", + "sha256": "bfa2644100ee89e83c005c339b5110ce41cb090c843423b356e8098b76baebda", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_entry", + "repository": "sgf", + "path": "app/Modules/Purchasing/PurchasingEntry.php", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_board", + "repository": "sgf", + "path": "public/purchasing-board.mjs", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_presenter", + "repository": "sgf", + "path": "public/purchasing-presenter.mjs", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_exit_guard", + "repository": "sgf", + "path": "public/purchasing-exit.mjs", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. A subsequent scope fix filters request/sourcing audit events in SQL before limits/counts/pages, closing an alternate downstream financial-history exposure without changing original audit or writers. Empty initial supplier searches now survive middleware normalisation while closed-award and permission guards remain. Completed canonical history book is reused read-only with142 tables/sequences intact. Demo8080 removes the direct request-history25-event cap using bounded cursor pages25/100, own-stage SQL filtering and encrypted request/actor/context/size-bound cursors with600-second lifetime. Initial page is reused; history refresh does not reset unsaved request fields.127 original event ids traverse once despite a new head note; refresh includes128. Audit-volume fixtures are not operational request revisions. An inherited100MZN order setup was preserved and removed from future history harness runs. This is not a persistent MVCC snapshot, visual acceptance, sustained-load or deployment validation. On04/11 the agreed local acquisition-to-payable journey was completed through actual UI modules and HTTP in the existing8085 installation, including a new reviewed supplier and distinct decisions. One entry /compras, document retention, readable previews and exit protection; no new database, port, isolated demo or business-engine copy. This does not validate real deployment, payments/accounting of this origin or visual acceptance." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Demo8079 fixes the actual form-to-picker binding and blank initial article search. DOM-to-real-HTTP proof selects an article, transmits its revision, previews, confirms1UN and recovers a deliberately lost response with201/200, one receipt/movement. This is not browser visual acceptance or a new concurrency/load trial. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. On04/11 the agreed local acquisition-to-payable journey was completed through actual UI modules and HTTP in the existing8085 installation, including a new reviewed supplier and distinct decisions. One entry /compras, document retention, readable previews and exit protection; no new database, port, isolated demo or business-engine copy. This does not validate real deployment, payments/accounting of this origin or visual acceptance." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending. The integrated Purchasing QA host now observes the same physical book through a SELECT-only Stock role, explicit warehouse mapping and existing React reader (demo8083). Operational installation and real bindings remain pending; no additional valuation or availability is supplied. Demo8084 adds explicit Stock-to-Purchasing receipt evidence navigation for current receipt_in movements. The server resolves actual parent ids, current rights and scope; no inferred historical origin, business command or wider Stock reader grants. Existing Purchasing runtime locks remain; no new load/deployment claim. Demo8085 delivers a UTC-registration-period physical quantity report with opening/incoming/outgoing/closing per article/warehouse, exact numeric/text quantities, explicit dates and25/100 SQL pages. Five projection SELECTs at either page size;105 pairs are SQL fixtures, not workflow operations. No cross-unit total, valuation, availability, full export, sustained-load or deployment claim." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8081 exposes per-line ordered/accepted/returned/reversed/validated/pending/remaining quantities using two aggregate fact queries and original correction values. Pending documents do not reserve quantity; overlap is a read warning, not a replacement for native validation. Two completed QA books are reused read-only with all tables/sequences unchanged. The display revision uses one original state observation before capability decoration; mutation/state definitions are unchanged. Full dependency materialisation, large invoice-history scaling, visual review, sustained load and deployment remain pending. On04/11 the agreed local acquisition-to-payable journey was completed through actual UI modules and HTTP in the existing8085 installation, including a new reviewed supplier and distinct decisions. One entry /compras, document retention, readable previews and exit protection; no new database, port, isolated demo or business-engine copy. This does not validate real deployment, payments/accounting of this origin or visual acceptance." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8082 separates evidence browsing from an explicitly selected proposal decision. Reason and preview survive pagination; changed observed source/actor/permissions invalidate old forms, and late reads/previews cannot reactivate them. Temporary read failure preserves the form; in-flight operations prevent selection changes.26 new simulated-UI/demo checks reuse72 native authority checks without repetition. Controller/runtime/kernel and legacy evidence branch are unchanged. No new real confirmation, financial writer, backend pagination protocol, visual/load or deployment validation. On04/11 the agreed local acquisition-to-payable journey was completed through actual UI modules and HTTP in the existing8085 installation, including a new reviewed supplier and distinct decisions. One entry /compras, document retention, readable previews and exit protection; no new database, port, isolated demo or business-engine copy. This does not validate real deployment, payments/accounting of this origin or visual acceptance." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/purchasing-completion-flow-final-20261104.json b/docs/proofs/purchasing-completion-flow-final-20261104.json new file mode 100644 index 0000000..8808610 --- /dev/null +++ b/docs/proofs/purchasing-completion-flow-final-20261104.json @@ -0,0 +1,846 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "aca72375ec18e6ad00376f6d113452a4871e47f9154563dadd6a00b33f1d3361", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "fd02da1a69f76bf1412f86f43095a0a476de49fbb7d2676a51fe3b29ec66e298", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "7931bd3cde587a021fbc260186702f701098080e3c61296efd48d1855c745355", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_screen", + "repository": "sgf", + "path": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_screen", + "repository": "sgf", + "path": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "73a73bc3f33fede454d40ab7506274ec5128c317e4fc0cbc38fa3808bc6be074", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_workspace", + "repository": "sgf", + "path": "app/Modules/Purchasing/WorkspaceNavigation.php", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_navigation", + "repository": "sgf", + "path": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "b1b4e8a4aed0c2fc4020a34f430ebe76a6e3a13e137cd6179c6c6cd872f272c2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_picker", + "repository": "sgf", + "path": "public/supplier-picker-model.mjs", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_search_ui", + "repository": "sgf", + "path": "public/sourcing-workspace.mjs", + "sha256": "a39889528688affa974f48d3e74994339d0692ea478264a7ab79520db9c8fcd5", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/DossierController.php", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_screen", + "repository": "sgf", + "path": "resources/views/purchasing-dossier.blade.php", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_ui", + "repository": "sgf", + "path": "public/purchasing-dossier.mjs", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_catalogue", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptCatalogue.php", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_workspace_ui", + "repository": "sgf", + "path": "public/receipt-workspace.mjs", + "sha256": "c8e06b575d66a4e160516eff151fd4bc2d901fa68da6e120dbd6673f06f8e18a", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentsController.php", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_storage", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_ui", + "repository": "sgf", + "path": "public/supplier-documents.mjs", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_process_navigation", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessNavigation.php", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_focus", + "repository": "sgf", + "path": "public/purchasing-focus.mjs", + "sha256": "8b3000f6f52f19d7ed9ea5886491c10549b29b41d45eba4ab60893e7bee10d84", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stage_history", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessHistory.php", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_workspace_ui", + "repository": "sgf", + "path": "public/supplier-invoice-workspace.mjs", + "sha256": "cd84dc3d40546f18f4e091fbe94473405f658fe7cdbafc4e44aee9a9460ddf32", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_workspace_ui", + "repository": "sgf", + "path": "public/supplier-obligation-workspace.mjs", + "sha256": "d33c2e8426885036b63cd8ce9a6001ae17aab42b775d6a7930eedf721d539bda", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_history_ui", + "repository": "sgf", + "path": "public/request-history.mjs", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_workspace_ui", + "repository": "sgf", + "path": "public/request-workspace.mjs", + "sha256": "ae1aa47cecc60269b596b6cca6351713f2c087f4d623bb2e9b5864aa913c7235", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_matching_progress", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceMatchingProgress.php", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_matching_ui", + "repository": "sgf", + "path": "public/invoice-matching.mjs", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_evidence_ui", + "repository": "sgf", + "path": "public/obligation-evidence.mjs", + "sha256": "4d9aeac1b404275accf15a3a6ef0d392175cd7afbc02a4e891f19a6a1131f4b3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_composed_stock_read", + "repository": "sgf", + "path": "app/Modules/Inventory/CompositionStockRead.php", + "sha256": "01c558457df290879bdf6c7f8de8cd9efccad81b940731f0aaf2489cf02bfcf7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_receipt_trace", + "repository": "sgf", + "path": "app/Modules/Purchasing/StockReceiptTraceController.php", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_receipt_transition", + "repository": "sgf", + "path": "resources/js/stock-receipt-trace.js", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_receipt_focus", + "repository": "sgf", + "path": "public/stock-receipt-focus.mjs", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_period_projection", + "repository": "sgf", + "path": "app/Modules/Inventory/StockPeriodReport.php", + "sha256": "d491541c6c60bc0c661dc442b8db8ce2e757f1d63dfc4982a3631f820cfb7a06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_period_ui", + "repository": "sgf", + "path": "resources/js/StockPeriodReportWorkspace.jsx", + "sha256": "a03fa2fde5f7cc17cff4349d87feffe465888cea77bc0dfa62029bc92755ccbd", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_period_request", + "repository": "sgf", + "path": "resources/js/stock-period-request.js", + "sha256": "bfa2644100ee89e83c005c339b5110ce41cb090c843423b356e8098b76baebda", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_entry", + "repository": "sgf", + "path": "app/Modules/Purchasing/PurchasingEntry.php", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_board", + "repository": "sgf", + "path": "public/purchasing-board.mjs", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_presenter", + "repository": "sgf", + "path": "public/purchasing-presenter.mjs", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_exit_guard", + "repository": "sgf", + "path": "public/purchasing-exit.mjs", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. A subsequent scope fix filters request/sourcing audit events in SQL before limits/counts/pages, closing an alternate downstream financial-history exposure without changing original audit or writers. Empty initial supplier searches now survive middleware normalisation while closed-award and permission guards remain. Completed canonical history book is reused read-only with142 tables/sequences intact. Demo8080 removes the direct request-history25-event cap using bounded cursor pages25/100, own-stage SQL filtering and encrypted request/actor/context/size-bound cursors with600-second lifetime. Initial page is reused; history refresh does not reset unsaved request fields.127 original event ids traverse once despite a new head note; refresh includes128. Audit-volume fixtures are not operational request revisions. An inherited100MZN order setup was preserved and removed from future history harness runs. This is not a persistent MVCC snapshot, visual acceptance, sustained-load or deployment validation. On04/11 the agreed local acquisition-to-payable journey was completed through actual UI modules and HTTP in the existing8085 installation, including a new reviewed supplier and distinct decisions. One entry /compras, document retention, readable previews and exit protection; no new database, port, isolated demo or business-engine copy. This does not validate real deployment, payments/accounting of this origin or visual acceptance." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Demo8079 fixes the actual form-to-picker binding and blank initial article search. DOM-to-real-HTTP proof selects an article, transmits its revision, previews, confirms1UN and recovers a deliberately lost response with201/200, one receipt/movement. This is not browser visual acceptance or a new concurrency/load trial. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. On04/11 the agreed local acquisition-to-payable journey was completed through actual UI modules and HTTP in the existing8085 installation, including a new reviewed supplier and distinct decisions. One entry /compras, document retention, readable previews and exit protection; no new database, port, isolated demo or business-engine copy. This does not validate real deployment, payments/accounting of this origin or visual acceptance." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending. The integrated Purchasing QA host now observes the same physical book through a SELECT-only Stock role, explicit warehouse mapping and existing React reader (demo8083). Operational installation and real bindings remain pending; no additional valuation or availability is supplied. Demo8084 adds explicit Stock-to-Purchasing receipt evidence navigation for current receipt_in movements. The server resolves actual parent ids, current rights and scope; no inferred historical origin, business command or wider Stock reader grants. Existing Purchasing runtime locks remain; no new load/deployment claim. Demo8085 delivers a UTC-registration-period physical quantity report with opening/incoming/outgoing/closing per article/warehouse, exact numeric/text quantities, explicit dates and25/100 SQL pages. Five projection SELECTs at either page size;105 pairs are SQL fixtures, not workflow operations. No cross-unit total, valuation, availability, full export, sustained-load or deployment claim." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8081 exposes per-line ordered/accepted/returned/reversed/validated/pending/remaining quantities using two aggregate fact queries and original correction values. Pending documents do not reserve quantity; overlap is a read warning, not a replacement for native validation. Two completed QA books are reused read-only with all tables/sequences unchanged. The display revision uses one original state observation before capability decoration; mutation/state definitions are unchanged. Full dependency materialisation, large invoice-history scaling, visual review, sustained load and deployment remain pending. On04/11 the agreed local acquisition-to-payable journey was completed through actual UI modules and HTTP in the existing8085 installation, including a new reviewed supplier and distinct decisions. One entry /compras, document retention, readable previews and exit protection; no new database, port, isolated demo or business-engine copy. This does not validate real deployment, payments/accounting of this origin or visual acceptance." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8082 separates evidence browsing from an explicitly selected proposal decision. Reason and preview survive pagination; changed observed source/actor/permissions invalidate old forms, and late reads/previews cannot reactivate them. Temporary read failure preserves the form; in-flight operations prevent selection changes.26 new simulated-UI/demo checks reuse72 native authority checks without repetition. Controller/runtime/kernel and legacy evidence branch are unchanged. No new real confirmation, financial writer, backend pagination protocol, visual/load or deployment validation. On04/11 the agreed local acquisition-to-payable journey was completed through actual UI modules and HTTP in the existing8085 installation, including a new reviewed supplier and distinct decisions. One entry /compras, document retention, readable previews and exit protection; no new database, port, isolated demo or business-engine copy. This does not validate real deployment, payments/accounting of this origin or visual acceptance." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/purchasing-completion-matrix-20261104.json b/docs/proofs/purchasing-completion-matrix-20261104.json new file mode 100644 index 0000000..85e2a6f --- /dev/null +++ b/docs/proofs/purchasing-completion-matrix-20261104.json @@ -0,0 +1,3048 @@ +{ + "date": "2026-11-04T06:54:51.933Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "a7c7183ebffccdb3b81ba6138852b5f00e121871ebbca12efb30fc4e9464aede", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "7931bd3cde587a021fbc260186702f701098080e3c61296efd48d1855c745355", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b" + }, + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "7931bd3cde587a021fbc260186702f701098080e3c61296efd48d1855c745355" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "1cb75d7bc03105e0df4211b4470bdc8837f4a659bc65318286228949779d9dc6" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_workspace", + "file": "app/Modules/Purchasing/WorkspaceNavigation.php", + "repository": "sgf", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1" + }, + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_navigation", + "file": "resources/views/partials/purchasing-navigation.blade.php", + "repository": "sgf", + "sha256": "b1b4e8a4aed0c2fc4020a34f430ebe76a6e3a13e137cd6179c6c6cd872f272c2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50" + }, + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "b1b4e8a4aed0c2fc4020a34f430ebe76a6e3a13e137cd6179c6c6cd872f272c2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_picker", + "file": "public/supplier-picker-model.mjs", + "repository": "sgf", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_search_ui", + "file": "public/sourcing-workspace.mjs", + "repository": "sgf", + "sha256": "a39889528688affa974f48d3e74994339d0692ea478264a7ab79520db9c8fcd5", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "15ed768992dfd8858df65ce7fa41c733906875aec98b1c347169d83571cde52e" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52" + }, + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "a39889528688affa974f48d3e74994339d0692ea478264a7ab79520db9c8fcd5" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_controller", + "file": "app/Modules/Purchasing/DossierController.php", + "repository": "sgf", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_screen", + "file": "resources/views/purchasing-dossier.blade.php", + "repository": "sgf", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_ui", + "file": "public/purchasing-dossier.mjs", + "repository": "sgf", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_documents", + "file": "app/Modules/Purchasing/SupplierDocumentsController.php", + "repository": "sgf", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_document_storage", + "file": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "repository": "sgf", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "a8c7fbe18d9ccd6a7e6fd27275e8827ac6a75f4b147ec02b06fabc30a15f29c8" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_document_ui", + "file": "public/supplier-documents.mjs", + "repository": "sgf", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "70e96bc60238efe6bb8a65297f7412fee9abb143dd96805713bb1deafc784820" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_process_navigation", + "file": "app/Modules/Purchasing/ProcessNavigation.php", + "repository": "sgf", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_focus", + "file": "public/purchasing-focus.mjs", + "repository": "sgf", + "sha256": "804854fbcf066be1688f2d4f15dc13c986dcb44ab30f9fbcbc56d6428c60d21c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "77a18d186c8ebb5065cf60816b7fd8d11a37fe801296a60f06ff0a6cf590b2e4" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "434319b8de23f5d6892666bd53232d463a0d458fe948cc6d7b476ad1228fafb6" + }, + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "804854fbcf066be1688f2d4f15dc13c986dcb44ab30f9fbcbc56d6428c60d21c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stage_history", + "file": "app/Modules/Purchasing/ProcessHistory.php", + "repository": "sgf", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_history_ui", + "file": "public/request-history.mjs", + "repository": "sgf", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_workspace_ui", + "file": "public/request-workspace.mjs", + "repository": "sgf", + "sha256": "35875cff6b4cdba1be080896c986a799b59a08fd5e8f956d0b587e11731dbbb7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "e878fc3c7bc5ba24aa2b17fe41ffeda3267721b5beb2a1a3a0cb11f56d7dc93d" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "384c67310d2a7adab7a94273bab385dff74af76c293622bb3c0d087245d7e6d8" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4" + }, + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "35875cff6b4cdba1be080896c986a799b59a08fd5e8f956d0b587e11731dbbb7" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_entry", + "file": "app/Modules/Purchasing/PurchasingEntry.php", + "repository": "sgf", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_board", + "file": "public/purchasing-board.mjs", + "repository": "sgf", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_presenter", + "file": "public/purchasing-presenter.mjs", + "repository": "sgf", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_exit_guard", + "file": "public/purchasing-exit.mjs", + "repository": "sgf", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-search-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 51 + } + ], + "sha256": "388e738da7e9b3e7f521c8d67f85dd4ef34869c74daf0c04c09067b9fbde5242", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 52 + } + ], + "sha256": "d5709128ee45b7ee1397695b06502b9386dccd13779203c13abbd54281552068", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-history-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 36 + } + ], + "sha256": "564e0fdbc6a7a1142e72dbf835a96dadf0363d3dc963fc4cdc0a40bd05b8c26e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-completion-20261104.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/criteria/C10/passed", + "equals": true + } + ], + "sha256": "60b73e7691fd7a7dc6fd222658390d15c0c7020193b03bc3ab8ad22ba8b1eded", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. A subsequent scope fix filters request/sourcing audit events in SQL before limits/counts/pages, closing an alternate downstream financial-history exposure without changing original audit or writers. Empty initial supplier searches now survive middleware normalisation while closed-award and permission guards remain. Completed canonical history book is reused read-only with142 tables/sequences intact. Demo8080 removes the direct request-history25-event cap using bounded cursor pages25/100, own-stage SQL filtering and encrypted request/actor/context/size-bound cursors with600-second lifetime. Initial page is reused; history refresh does not reset unsaved request fields.127 original event ids traverse once despite a new head note; refresh includes128. Audit-volume fixtures are not operational request revisions. An inherited100MZN order setup was preserved and removed from future history harness runs. This is not a persistent MVCC snapshot, visual acceptance, sustained-load or deployment validation. On04/11 the agreed local acquisition-to-payable journey was completed through actual UI modules and HTTP in the existing8085 installation, including a new reviewed supplier and distinct decisions. One entry /compras, document retention, readable previews and exit protection; no new database, port, isolated demo or business-engine copy. This does not validate real deployment, payments/accounting of this origin or visual acceptance.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "7ed4b9292e214b11c42af1eae3fb63d967a7e15f026648c957f8a5b54f211f69" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "51a0fa060fcce212646cf22332df352d90a5994cb7785eedc789585e02569616" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "40e7db8ac3d47b60f46fb5b8c623dec9ff9716bc9f2e1ea400d0751f0d0cf890" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_catalogue", + "file": "app/Modules/Purchasing/ReceiptCatalogue.php", + "repository": "sgf", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_workspace_ui", + "file": "public/receipt-workspace.mjs", + "repository": "sgf", + "sha256": "c8e06b575d66a4e160516eff151fd4bc2d901fa68da6e120dbd6673f06f8e18a", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "f286a99bb0df5c6080e8104d501707e5a9e13046d5dd7144dec32bf0817a92a0" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "10b412a5ec6c973152f165b34caacc685e25bcf2eb0e6ba2f7f7e58df4e1f00a" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "a128926d876ae10eb2a17ec2410ba99282d782f03bb9642cbdcad93d548ce002" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "f0f242538e4131910d612da1f5b22e4955f3bdc58d4c4121d7b1242a5eb52df5" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "86421d30dc9868b10da2153f8bf0b50d9904ab5ccccbf9813464083ae1e20bd2" + }, + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "5825d0f6965f55b9e5aee437d02f6664ff29e60f50d96ccec7b6498caad063bd" + }, + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "c8e06b575d66a4e160516eff151fd4bc2d901fa68da6e120dbd6673f06f8e18a" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_documents", + "file": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "repository": "sgf", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_composed_stock_read", + "file": "app/Modules/Inventory/CompositionStockRead.php", + "repository": "sgf", + "sha256": "01c558457df290879bdf6c7f8de8cd9efccad81b940731f0aaf2489cf02bfcf7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-composed-source-20261103.json", + "sha256": "cf4a954c460226d58ae8478a23f26744b39affa12054b6299e1958488a411788" + }, + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "22891dc1a346caca14cb9d03c2d2f7d772a11d937774fae9e5fc041c8aacf4e2" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_stock_receipt_trace", + "file": "app/Modules/Purchasing/StockReceiptTraceController.php", + "repository": "sgf", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_transition", + "file": "resources/js/stock-receipt-trace.js", + "repository": "sgf", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_focus", + "file": "public/stock-receipt-focus.mjs", + "repository": "sgf", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_entry", + "file": "app/Modules/Purchasing/PurchasingEntry.php", + "repository": "sgf", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_board", + "file": "public/purchasing-board.mjs", + "repository": "sgf", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_presenter", + "file": "public/purchasing-presenter.mjs", + "repository": "sgf", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_exit_guard", + "file": "public/purchasing-exit.mjs", + "repository": "sgf", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-workspace-completion-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "59bb66df5d5e12f898045669a0ad24664c3d09f2d3ab6cf70f4f13d6a34c6548", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 58 + } + ], + "sha256": "b820a6b355450a79c9f244ce8eb6950e7c1cbe4427bf85bca772fb0fc5c085d2", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-composed-source-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "7f1fc61962e68b1676fad694068761158edc41623dee73238b012c37da593caa", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-trace-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 46 + } + ], + "sha256": "29ffe0d5e588af175d926444e84faa655560999dfcff58dcf8eb37a3423f07b7", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-completion-20261104.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/criteria/C10/passed", + "equals": true + } + ], + "sha256": "60b73e7691fd7a7dc6fd222658390d15c0c7020193b03bc3ab8ad22ba8b1eded", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Demo8079 fixes the actual form-to-picker binding and blank initial article search. DOM-to-real-HTTP proof selects an article, transmits its revision, previews, confirms1UN and recovers a deliberately lost response with201/200, one receipt/movement. This is not browser visual acceptance or a new concurrency/load trial. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. On04/11 the agreed local acquisition-to-payable journey was completed through actual UI modules and HTTP in the existing8085 installation, including a new reviewed supplier and distinct decisions. One entry /compras, document retention, readable previews and exit protection; no new database, port, isolated demo or business-engine copy. This does not validate real deployment, payments/accounting of this origin or visual acceptance.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "fd02da1a69f76bf1412f86f43095a0a476de49fbb7d2676a51fe3b29ec66e298", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + }, + { + "proof": "docs/proofs/stock-composed-source-20261103.json", + "sha256": "fd02da1a69f76bf1412f86f43095a0a476de49fbb7d2676a51fe3b29ec66e298" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_composed_stock_read", + "file": "app/Modules/Inventory/CompositionStockRead.php", + "repository": "sgf", + "sha256": "01c558457df290879bdf6c7f8de8cd9efccad81b940731f0aaf2489cf02bfcf7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-composed-source-20261103.json", + "sha256": "cf4a954c460226d58ae8478a23f26744b39affa12054b6299e1958488a411788" + }, + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "22891dc1a346caca14cb9d03c2d2f7d772a11d937774fae9e5fc041c8aacf4e2" + }, + { + "proof": "docs/proofs/stock-period-report-20261103.json", + "sha256": "01c558457df290879bdf6c7f8de8cd9efccad81b940731f0aaf2489cf02bfcf7" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_trace", + "file": "app/Modules/Purchasing/StockReceiptTraceController.php", + "repository": "sgf", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_transition", + "file": "resources/js/stock-receipt-trace.js", + "repository": "sgf", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_focus", + "file": "public/stock-receipt-focus.mjs", + "repository": "sgf", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_period_projection", + "file": "app/Modules/Inventory/StockPeriodReport.php", + "repository": "sgf", + "sha256": "d491541c6c60bc0c661dc442b8db8ce2e757f1d63dfc4982a3631f820cfb7a06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-period-report-20261103.json", + "sha256": "d491541c6c60bc0c661dc442b8db8ce2e757f1d63dfc4982a3631f820cfb7a06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_period_ui", + "file": "resources/js/StockPeriodReportWorkspace.jsx", + "repository": "sgf", + "sha256": "a03fa2fde5f7cc17cff4349d87feffe465888cea77bc0dfa62029bc92755ccbd", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-period-report-20261103.json", + "sha256": "a03fa2fde5f7cc17cff4349d87feffe465888cea77bc0dfa62029bc92755ccbd" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_period_request", + "file": "resources/js/stock-period-request.js", + "repository": "sgf", + "sha256": "bfa2644100ee89e83c005c339b5110ce41cb090c843423b356e8098b76baebda", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-period-report-20261103.json", + "sha256": "bfa2644100ee89e83c005c339b5110ce41cb090c843423b356e8098b76baebda" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-composed-source-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "7f1fc61962e68b1676fad694068761158edc41623dee73238b012c37da593caa", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-trace-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 46 + } + ], + "sha256": "29ffe0d5e588af175d926444e84faa655560999dfcff58dcf8eb37a3423f07b7", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-report-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 52 + } + ], + "sha256": "0ab25af6ffbff7d8ecb651df833771b082bf92d52f97eca4278fcac3fd5ea53b", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending. The integrated Purchasing QA host now observes the same physical book through a SELECT-only Stock role, explicit warehouse mapping and existing React reader (demo8083). Operational installation and real bindings remain pending; no additional valuation or availability is supplied. Demo8084 adds explicit Stock-to-Purchasing receipt evidence navigation for current receipt_in movements. The server resolves actual parent ids, current rights and scope; no inferred historical origin, business command or wider Stock reader grants. Existing Purchasing runtime locks remain; no new load/deployment claim. Demo8085 delivers a UTC-registration-period physical quantity report with opening/incoming/outgoing/closing per article/warehouse, exact numeric/text quantities, explicit dates and25/100 SQL pages. Five projection SELECTs at either page size;105 pairs are SQL fixtures, not workflow operations. No cross-unit total, valuation, availability, full export, sustained-load or deployment claim.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_invoice_controller", + "file": "app/Modules/Purchasing/InvoiceController.php", + "repository": "sgf", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa" + }, + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_invoice_screen", + "file": "resources/views/supplier-invoice-workspace.blade.php", + "repository": "sgf", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "396cea98bce6c2ccff510efd917e2f336ba29657ea5a8277116c41bd70c92e15" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_workspace_ui", + "file": "public/supplier-invoice-workspace.mjs", + "repository": "sgf", + "sha256": "cd84dc3d40546f18f4e091fbe94473405f658fe7cdbafc4e44aee9a9460ddf32", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "68671400153a97387f77ad0cddbc0f7f6367caeaebef8fc219d84fc8cf118eb3" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "5f0112c38e805fe9ed2e733053bae77f8dd4e3e1cb6b9cba8e4bc7bb469205d7" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "f767347371e2dc1573ec29a926509c87bcdea3ec09257a6b22395fc0cf01366f" + }, + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "a05b4f56151b8bc9735a0ba2ce47b475e22623aabb8be99a98290860efd6ae9e" + }, + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "cd84dc3d40546f18f4e091fbe94473405f658fe7cdbafc4e44aee9a9460ddf32" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_matching_progress", + "file": "app/Modules/Purchasing/InvoiceMatchingProgress.php", + "repository": "sgf", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_matching_ui", + "file": "public/invoice-matching.mjs", + "repository": "sgf", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_entry", + "file": "app/Modules/Purchasing/PurchasingEntry.php", + "repository": "sgf", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_board", + "file": "public/purchasing-board.mjs", + "repository": "sgf", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_presenter", + "file": "public/purchasing-presenter.mjs", + "repository": "sgf", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_exit_guard", + "file": "public/purchasing-exit.mjs", + "repository": "sgf", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/invoice-matching-progress-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 47 + } + ], + "sha256": "6920219ec33e09abc951c10d8d862e87495b99cd77162f3aea729dcca597b66c", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-completion-20261104.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/criteria/C10/passed", + "equals": true + } + ], + "sha256": "60b73e7691fd7a7dc6fd222658390d15c0c7020193b03bc3ab8ad22ba8b1eded", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8081 exposes per-line ordered/accepted/returned/reversed/validated/pending/remaining quantities using two aggregate fact queries and original correction values. Pending documents do not reserve quantity; overlap is a read warning, not a replacement for native validation. Two completed QA books are reused read-only with all tables/sequences unchanged. The display revision uses one original state observation before capability decoration; mutation/state definitions are unchanged. Full dependency materialisation, large invoice-history scaling, visual review, sustained load and deployment remain pending. On04/11 the agreed local acquisition-to-payable journey was completed through actual UI modules and HTTP in the existing8085 installation, including a new reviewed supplier and distinct decisions. One entry /compras, document retention, readable previews and exit protection; no new database, port, isolated demo or business-engine copy. This does not validate real deployment, payments/accounting of this origin or visual acceptance.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_obligation_controller", + "file": "app/Modules/Purchasing/ObligationController.php", + "repository": "sgf", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_screen", + "file": "resources/views/supplier-obligation-workspace.blade.php", + "repository": "sgf", + "sha256": "73a73bc3f33fede454d40ab7506274ec5128c317e4fc0cbc38fa3808bc6be074", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "cbcef35273b6f54158f60b67f9c2b64c0a93e47cb01ca302b525479ce051e927" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "ce0dc4159d42efcff9e09ec99a2ce5a2d378a215d4a853a37417a0ebf5445506" + }, + { + "proof": "docs/proofs/obligation-evidence-workspace-20261103.json", + "sha256": "73a73bc3f33fede454d40ab7506274ec5128c317e4fc0cbc38fa3808bc6be074" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_workspace_ui", + "file": "public/supplier-obligation-workspace.mjs", + "repository": "sgf", + "sha256": "d33c2e8426885036b63cd8ce9a6001ae17aab42b775d6a7930eedf721d539bda", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "eeb450e38dad72d9c38538ed363202d0a6cfcec466c61171028108f1bc243837" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "8f5154636553130f950d09b46ff917f91250516e10a03e93971cbe537c67f082" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "c2608e3cab7cd1810437a3a978e6f6ccbf2600a83dd0a39bd38510db8249f551" + }, + { + "proof": "docs/proofs/obligation-evidence-workspace-20261103.json", + "sha256": "7f5c8ca11ad603e55c408356c7fb2a46782662d0107caffedcd9d4966a9163e7" + }, + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "d33c2e8426885036b63cd8ce9a6001ae17aab42b775d6a7930eedf721d539bda" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_evidence_ui", + "file": "public/obligation-evidence.mjs", + "repository": "sgf", + "sha256": "4d9aeac1b404275accf15a3a6ef0d392175cd7afbc02a4e891f19a6a1131f4b3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/obligation-evidence-workspace-20261103.json", + "sha256": "c47a75e69d8ea767bc7e07e6fe5fa924fcc4fbd1bd1a90f526ecf255eb2e6fb5" + }, + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "4d9aeac1b404275accf15a3a6ef0d392175cd7afbc02a4e891f19a6a1131f4b3" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_entry", + "file": "app/Modules/Purchasing/PurchasingEntry.php", + "repository": "sgf", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_board", + "file": "public/purchasing-board.mjs", + "repository": "sgf", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_presenter", + "file": "public/purchasing-presenter.mjs", + "repository": "sgf", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_exit_guard", + "file": "public/purchasing-exit.mjs", + "repository": "sgf", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-20261104.json", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 72 + } + ], + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/obligation-evidence-workspace-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 26 + } + ], + "sha256": "fa510ee89931c34d6d9483a6d8f362055a953567f2087ebb1c97ad6bb4c2e117", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-completion-20261104.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/criteria/C10/passed", + "equals": true + } + ], + "sha256": "60b73e7691fd7a7dc6fd222658390d15c0c7020193b03bc3ab8ad22ba8b1eded", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8082 separates evidence browsing from an explicitly selected proposal decision. Reason and preview survive pagination; changed observed source/actor/permissions invalidate old forms, and late reads/previews cannot reactivate them. Temporary read failure preserves the form; in-flight operations prevent selection changes.26 new simulated-UI/demo checks reuse72 native authority checks without repetition. Controller/runtime/kernel and legacy evidence branch are unchanged. No new real confirmation, financial writer, backend pagination protocol, visual/load or deployment validation. On04/11 the agreed local acquisition-to-payable journey was completed through actual UI modules and HTTP in the existing8085 installation, including a new reviewed supplier and distinct decisions. One entry /compras, document retention, readable previews and exit protection; no new database, port, isolated demo or business-engine copy. This does not validate real deployment, payments/accounting of this origin or visual acceptance.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/purchasing-completion-matrix-final-20261104.json b/docs/proofs/purchasing-completion-matrix-final-20261104.json new file mode 100644 index 0000000..50220e2 --- /dev/null +++ b/docs/proofs/purchasing-completion-matrix-final-20261104.json @@ -0,0 +1,3048 @@ +{ + "date": "2026-11-04T07:11:20.622Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "aca72375ec18e6ad00376f6d113452a4871e47f9154563dadd6a00b33f1d3361", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "7931bd3cde587a021fbc260186702f701098080e3c61296efd48d1855c745355", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b" + }, + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "7931bd3cde587a021fbc260186702f701098080e3c61296efd48d1855c745355" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "1cb75d7bc03105e0df4211b4470bdc8837f4a659bc65318286228949779d9dc6" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_workspace", + "file": "app/Modules/Purchasing/WorkspaceNavigation.php", + "repository": "sgf", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1" + }, + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_navigation", + "file": "resources/views/partials/purchasing-navigation.blade.php", + "repository": "sgf", + "sha256": "b1b4e8a4aed0c2fc4020a34f430ebe76a6e3a13e137cd6179c6c6cd872f272c2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50" + }, + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "b1b4e8a4aed0c2fc4020a34f430ebe76a6e3a13e137cd6179c6c6cd872f272c2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_picker", + "file": "public/supplier-picker-model.mjs", + "repository": "sgf", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_search_ui", + "file": "public/sourcing-workspace.mjs", + "repository": "sgf", + "sha256": "a39889528688affa974f48d3e74994339d0692ea478264a7ab79520db9c8fcd5", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "15ed768992dfd8858df65ce7fa41c733906875aec98b1c347169d83571cde52e" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52" + }, + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "a39889528688affa974f48d3e74994339d0692ea478264a7ab79520db9c8fcd5" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_controller", + "file": "app/Modules/Purchasing/DossierController.php", + "repository": "sgf", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_screen", + "file": "resources/views/purchasing-dossier.blade.php", + "repository": "sgf", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_ui", + "file": "public/purchasing-dossier.mjs", + "repository": "sgf", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_documents", + "file": "app/Modules/Purchasing/SupplierDocumentsController.php", + "repository": "sgf", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_document_storage", + "file": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "repository": "sgf", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "a8c7fbe18d9ccd6a7e6fd27275e8827ac6a75f4b147ec02b06fabc30a15f29c8" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_document_ui", + "file": "public/supplier-documents.mjs", + "repository": "sgf", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "70e96bc60238efe6bb8a65297f7412fee9abb143dd96805713bb1deafc784820" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_process_navigation", + "file": "app/Modules/Purchasing/ProcessNavigation.php", + "repository": "sgf", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_focus", + "file": "public/purchasing-focus.mjs", + "repository": "sgf", + "sha256": "8b3000f6f52f19d7ed9ea5886491c10549b29b41d45eba4ab60893e7bee10d84", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "77a18d186c8ebb5065cf60816b7fd8d11a37fe801296a60f06ff0a6cf590b2e4" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "434319b8de23f5d6892666bd53232d463a0d458fe948cc6d7b476ad1228fafb6" + }, + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "8b3000f6f52f19d7ed9ea5886491c10549b29b41d45eba4ab60893e7bee10d84" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stage_history", + "file": "app/Modules/Purchasing/ProcessHistory.php", + "repository": "sgf", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_history_ui", + "file": "public/request-history.mjs", + "repository": "sgf", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_workspace_ui", + "file": "public/request-workspace.mjs", + "repository": "sgf", + "sha256": "ae1aa47cecc60269b596b6cca6351713f2c087f4d623bb2e9b5864aa913c7235", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "e878fc3c7bc5ba24aa2b17fe41ffeda3267721b5beb2a1a3a0cb11f56d7dc93d" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "384c67310d2a7adab7a94273bab385dff74af76c293622bb3c0d087245d7e6d8" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4" + }, + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "ae1aa47cecc60269b596b6cca6351713f2c087f4d623bb2e9b5864aa913c7235" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_entry", + "file": "app/Modules/Purchasing/PurchasingEntry.php", + "repository": "sgf", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_board", + "file": "public/purchasing-board.mjs", + "repository": "sgf", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_presenter", + "file": "public/purchasing-presenter.mjs", + "repository": "sgf", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_exit_guard", + "file": "public/purchasing-exit.mjs", + "repository": "sgf", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-search-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 51 + } + ], + "sha256": "388e738da7e9b3e7f521c8d67f85dd4ef34869c74daf0c04c09067b9fbde5242", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 52 + } + ], + "sha256": "d5709128ee45b7ee1397695b06502b9386dccd13779203c13abbd54281552068", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-history-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 36 + } + ], + "sha256": "564e0fdbc6a7a1142e72dbf835a96dadf0363d3dc963fc4cdc0a40bd05b8c26e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/criteria/C10/passed", + "equals": true + } + ], + "sha256": "3b63f8653e8dbb089dfdd8f389e271c022a070d5a67a9f9d4585ce84438070cc", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. A subsequent scope fix filters request/sourcing audit events in SQL before limits/counts/pages, closing an alternate downstream financial-history exposure without changing original audit or writers. Empty initial supplier searches now survive middleware normalisation while closed-award and permission guards remain. Completed canonical history book is reused read-only with142 tables/sequences intact. Demo8080 removes the direct request-history25-event cap using bounded cursor pages25/100, own-stage SQL filtering and encrypted request/actor/context/size-bound cursors with600-second lifetime. Initial page is reused; history refresh does not reset unsaved request fields.127 original event ids traverse once despite a new head note; refresh includes128. Audit-volume fixtures are not operational request revisions. An inherited100MZN order setup was preserved and removed from future history harness runs. This is not a persistent MVCC snapshot, visual acceptance, sustained-load or deployment validation. On04/11 the agreed local acquisition-to-payable journey was completed through actual UI modules and HTTP in the existing8085 installation, including a new reviewed supplier and distinct decisions. One entry /compras, document retention, readable previews and exit protection; no new database, port, isolated demo or business-engine copy. This does not validate real deployment, payments/accounting of this origin or visual acceptance.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "7ed4b9292e214b11c42af1eae3fb63d967a7e15f026648c957f8a5b54f211f69" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "51a0fa060fcce212646cf22332df352d90a5994cb7785eedc789585e02569616" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "40e7db8ac3d47b60f46fb5b8c623dec9ff9716bc9f2e1ea400d0751f0d0cf890" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_catalogue", + "file": "app/Modules/Purchasing/ReceiptCatalogue.php", + "repository": "sgf", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_workspace_ui", + "file": "public/receipt-workspace.mjs", + "repository": "sgf", + "sha256": "c8e06b575d66a4e160516eff151fd4bc2d901fa68da6e120dbd6673f06f8e18a", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "f286a99bb0df5c6080e8104d501707e5a9e13046d5dd7144dec32bf0817a92a0" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "10b412a5ec6c973152f165b34caacc685e25bcf2eb0e6ba2f7f7e58df4e1f00a" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "a128926d876ae10eb2a17ec2410ba99282d782f03bb9642cbdcad93d548ce002" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "f0f242538e4131910d612da1f5b22e4955f3bdc58d4c4121d7b1242a5eb52df5" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "86421d30dc9868b10da2153f8bf0b50d9904ab5ccccbf9813464083ae1e20bd2" + }, + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "5825d0f6965f55b9e5aee437d02f6664ff29e60f50d96ccec7b6498caad063bd" + }, + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "c8e06b575d66a4e160516eff151fd4bc2d901fa68da6e120dbd6673f06f8e18a" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_documents", + "file": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "repository": "sgf", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_composed_stock_read", + "file": "app/Modules/Inventory/CompositionStockRead.php", + "repository": "sgf", + "sha256": "01c558457df290879bdf6c7f8de8cd9efccad81b940731f0aaf2489cf02bfcf7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-composed-source-20261103.json", + "sha256": "cf4a954c460226d58ae8478a23f26744b39affa12054b6299e1958488a411788" + }, + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "22891dc1a346caca14cb9d03c2d2f7d772a11d937774fae9e5fc041c8aacf4e2" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_stock_receipt_trace", + "file": "app/Modules/Purchasing/StockReceiptTraceController.php", + "repository": "sgf", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_transition", + "file": "resources/js/stock-receipt-trace.js", + "repository": "sgf", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_focus", + "file": "public/stock-receipt-focus.mjs", + "repository": "sgf", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_entry", + "file": "app/Modules/Purchasing/PurchasingEntry.php", + "repository": "sgf", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_board", + "file": "public/purchasing-board.mjs", + "repository": "sgf", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_presenter", + "file": "public/purchasing-presenter.mjs", + "repository": "sgf", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_exit_guard", + "file": "public/purchasing-exit.mjs", + "repository": "sgf", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-workspace-completion-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "59bb66df5d5e12f898045669a0ad24664c3d09f2d3ab6cf70f4f13d6a34c6548", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 58 + } + ], + "sha256": "b820a6b355450a79c9f244ce8eb6950e7c1cbe4427bf85bca772fb0fc5c085d2", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-composed-source-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "7f1fc61962e68b1676fad694068761158edc41623dee73238b012c37da593caa", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-trace-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 46 + } + ], + "sha256": "29ffe0d5e588af175d926444e84faa655560999dfcff58dcf8eb37a3423f07b7", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/criteria/C10/passed", + "equals": true + } + ], + "sha256": "3b63f8653e8dbb089dfdd8f389e271c022a070d5a67a9f9d4585ce84438070cc", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Demo8079 fixes the actual form-to-picker binding and blank initial article search. DOM-to-real-HTTP proof selects an article, transmits its revision, previews, confirms1UN and recovers a deliberately lost response with201/200, one receipt/movement. This is not browser visual acceptance or a new concurrency/load trial. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. On04/11 the agreed local acquisition-to-payable journey was completed through actual UI modules and HTTP in the existing8085 installation, including a new reviewed supplier and distinct decisions. One entry /compras, document retention, readable previews and exit protection; no new database, port, isolated demo or business-engine copy. This does not validate real deployment, payments/accounting of this origin or visual acceptance.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "fd02da1a69f76bf1412f86f43095a0a476de49fbb7d2676a51fe3b29ec66e298", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + }, + { + "proof": "docs/proofs/stock-composed-source-20261103.json", + "sha256": "fd02da1a69f76bf1412f86f43095a0a476de49fbb7d2676a51fe3b29ec66e298" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_composed_stock_read", + "file": "app/Modules/Inventory/CompositionStockRead.php", + "repository": "sgf", + "sha256": "01c558457df290879bdf6c7f8de8cd9efccad81b940731f0aaf2489cf02bfcf7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-composed-source-20261103.json", + "sha256": "cf4a954c460226d58ae8478a23f26744b39affa12054b6299e1958488a411788" + }, + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "22891dc1a346caca14cb9d03c2d2f7d772a11d937774fae9e5fc041c8aacf4e2" + }, + { + "proof": "docs/proofs/stock-period-report-20261103.json", + "sha256": "01c558457df290879bdf6c7f8de8cd9efccad81b940731f0aaf2489cf02bfcf7" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_trace", + "file": "app/Modules/Purchasing/StockReceiptTraceController.php", + "repository": "sgf", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_transition", + "file": "resources/js/stock-receipt-trace.js", + "repository": "sgf", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_focus", + "file": "public/stock-receipt-focus.mjs", + "repository": "sgf", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_period_projection", + "file": "app/Modules/Inventory/StockPeriodReport.php", + "repository": "sgf", + "sha256": "d491541c6c60bc0c661dc442b8db8ce2e757f1d63dfc4982a3631f820cfb7a06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-period-report-20261103.json", + "sha256": "d491541c6c60bc0c661dc442b8db8ce2e757f1d63dfc4982a3631f820cfb7a06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_period_ui", + "file": "resources/js/StockPeriodReportWorkspace.jsx", + "repository": "sgf", + "sha256": "a03fa2fde5f7cc17cff4349d87feffe465888cea77bc0dfa62029bc92755ccbd", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-period-report-20261103.json", + "sha256": "a03fa2fde5f7cc17cff4349d87feffe465888cea77bc0dfa62029bc92755ccbd" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_period_request", + "file": "resources/js/stock-period-request.js", + "repository": "sgf", + "sha256": "bfa2644100ee89e83c005c339b5110ce41cb090c843423b356e8098b76baebda", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-period-report-20261103.json", + "sha256": "bfa2644100ee89e83c005c339b5110ce41cb090c843423b356e8098b76baebda" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-composed-source-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "7f1fc61962e68b1676fad694068761158edc41623dee73238b012c37da593caa", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-trace-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 46 + } + ], + "sha256": "29ffe0d5e588af175d926444e84faa655560999dfcff58dcf8eb37a3423f07b7", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-report-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 52 + } + ], + "sha256": "0ab25af6ffbff7d8ecb651df833771b082bf92d52f97eca4278fcac3fd5ea53b", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending. The integrated Purchasing QA host now observes the same physical book through a SELECT-only Stock role, explicit warehouse mapping and existing React reader (demo8083). Operational installation and real bindings remain pending; no additional valuation or availability is supplied. Demo8084 adds explicit Stock-to-Purchasing receipt evidence navigation for current receipt_in movements. The server resolves actual parent ids, current rights and scope; no inferred historical origin, business command or wider Stock reader grants. Existing Purchasing runtime locks remain; no new load/deployment claim. Demo8085 delivers a UTC-registration-period physical quantity report with opening/incoming/outgoing/closing per article/warehouse, exact numeric/text quantities, explicit dates and25/100 SQL pages. Five projection SELECTs at either page size;105 pairs are SQL fixtures, not workflow operations. No cross-unit total, valuation, availability, full export, sustained-load or deployment claim.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_invoice_controller", + "file": "app/Modules/Purchasing/InvoiceController.php", + "repository": "sgf", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa" + }, + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_invoice_screen", + "file": "resources/views/supplier-invoice-workspace.blade.php", + "repository": "sgf", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "396cea98bce6c2ccff510efd917e2f336ba29657ea5a8277116c41bd70c92e15" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_workspace_ui", + "file": "public/supplier-invoice-workspace.mjs", + "repository": "sgf", + "sha256": "cd84dc3d40546f18f4e091fbe94473405f658fe7cdbafc4e44aee9a9460ddf32", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "68671400153a97387f77ad0cddbc0f7f6367caeaebef8fc219d84fc8cf118eb3" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "5f0112c38e805fe9ed2e733053bae77f8dd4e3e1cb6b9cba8e4bc7bb469205d7" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "f767347371e2dc1573ec29a926509c87bcdea3ec09257a6b22395fc0cf01366f" + }, + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "a05b4f56151b8bc9735a0ba2ce47b475e22623aabb8be99a98290860efd6ae9e" + }, + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "cd84dc3d40546f18f4e091fbe94473405f658fe7cdbafc4e44aee9a9460ddf32" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_matching_progress", + "file": "app/Modules/Purchasing/InvoiceMatchingProgress.php", + "repository": "sgf", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_matching_ui", + "file": "public/invoice-matching.mjs", + "repository": "sgf", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_entry", + "file": "app/Modules/Purchasing/PurchasingEntry.php", + "repository": "sgf", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_board", + "file": "public/purchasing-board.mjs", + "repository": "sgf", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_presenter", + "file": "public/purchasing-presenter.mjs", + "repository": "sgf", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_exit_guard", + "file": "public/purchasing-exit.mjs", + "repository": "sgf", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/invoice-matching-progress-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 47 + } + ], + "sha256": "6920219ec33e09abc951c10d8d862e87495b99cd77162f3aea729dcca597b66c", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/criteria/C10/passed", + "equals": true + } + ], + "sha256": "3b63f8653e8dbb089dfdd8f389e271c022a070d5a67a9f9d4585ce84438070cc", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8081 exposes per-line ordered/accepted/returned/reversed/validated/pending/remaining quantities using two aggregate fact queries and original correction values. Pending documents do not reserve quantity; overlap is a read warning, not a replacement for native validation. Two completed QA books are reused read-only with all tables/sequences unchanged. The display revision uses one original state observation before capability decoration; mutation/state definitions are unchanged. Full dependency materialisation, large invoice-history scaling, visual review, sustained load and deployment remain pending. On04/11 the agreed local acquisition-to-payable journey was completed through actual UI modules and HTTP in the existing8085 installation, including a new reviewed supplier and distinct decisions. One entry /compras, document retention, readable previews and exit protection; no new database, port, isolated demo or business-engine copy. This does not validate real deployment, payments/accounting of this origin or visual acceptance.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_obligation_controller", + "file": "app/Modules/Purchasing/ObligationController.php", + "repository": "sgf", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_screen", + "file": "resources/views/supplier-obligation-workspace.blade.php", + "repository": "sgf", + "sha256": "73a73bc3f33fede454d40ab7506274ec5128c317e4fc0cbc38fa3808bc6be074", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "cbcef35273b6f54158f60b67f9c2b64c0a93e47cb01ca302b525479ce051e927" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "ce0dc4159d42efcff9e09ec99a2ce5a2d378a215d4a853a37417a0ebf5445506" + }, + { + "proof": "docs/proofs/obligation-evidence-workspace-20261103.json", + "sha256": "73a73bc3f33fede454d40ab7506274ec5128c317e4fc0cbc38fa3808bc6be074" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_workspace_ui", + "file": "public/supplier-obligation-workspace.mjs", + "repository": "sgf", + "sha256": "d33c2e8426885036b63cd8ce9a6001ae17aab42b775d6a7930eedf721d539bda", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "eeb450e38dad72d9c38538ed363202d0a6cfcec466c61171028108f1bc243837" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "8f5154636553130f950d09b46ff917f91250516e10a03e93971cbe537c67f082" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "c2608e3cab7cd1810437a3a978e6f6ccbf2600a83dd0a39bd38510db8249f551" + }, + { + "proof": "docs/proofs/obligation-evidence-workspace-20261103.json", + "sha256": "7f5c8ca11ad603e55c408356c7fb2a46782662d0107caffedcd9d4966a9163e7" + }, + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "d33c2e8426885036b63cd8ce9a6001ae17aab42b775d6a7930eedf721d539bda" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_evidence_ui", + "file": "public/obligation-evidence.mjs", + "repository": "sgf", + "sha256": "4d9aeac1b404275accf15a3a6ef0d392175cd7afbc02a4e891f19a6a1131f4b3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/obligation-evidence-workspace-20261103.json", + "sha256": "c47a75e69d8ea767bc7e07e6fe5fa924fcc4fbd1bd1a90f526ecf255eb2e6fb5" + }, + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "4d9aeac1b404275accf15a3a6ef0d392175cd7afbc02a4e891f19a6a1131f4b3" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_entry", + "file": "app/Modules/Purchasing/PurchasingEntry.php", + "repository": "sgf", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "a02d47be1a6970a2903d1cb33b16a2fd75e89b81908bda7a1bdeae9592dd8c25" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_board", + "file": "public/purchasing-board.mjs", + "repository": "sgf", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "dca255bf504d90fb74e7de9e4ce647f28e17ced470850c0fd2d74bf404b83971" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_presenter", + "file": "public/purchasing-presenter.mjs", + "repository": "sgf", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "2d20354ff573ec05ac4acc9e64d4ba3f10e9554f84e11afb502127649c84c389" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_exit_guard", + "file": "public/purchasing-exit.mjs", + "repository": "sgf", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "sha256": "73c312bf6ff45af3a1a58fb5b48d312573eda1e0cc975c2a2b8f48e942f783d4" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 72 + } + ], + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/obligation-evidence-workspace-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 26 + } + ], + "sha256": "fa510ee89931c34d6d9483a6d8f362055a953567f2087ebb1c97ad6bb4c2e117", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-completion-final-20261104-r2.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/criteria/C10/passed", + "equals": true + } + ], + "sha256": "3b63f8653e8dbb089dfdd8f389e271c022a070d5a67a9f9d4585ce84438070cc", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8082 separates evidence browsing from an explicitly selected proposal decision. Reason and preview survive pagination; changed observed source/actor/permissions invalidate old forms, and late reads/previews cannot reactivate them. Temporary read failure preserves the form; in-flight operations prevent selection changes.26 new simulated-UI/demo checks reuse72 native authority checks without repetition. Controller/runtime/kernel and legacy evidence branch are unchanged. No new real confirmation, financial writer, backend pagination protocol, visual/load or deployment validation. On04/11 the agreed local acquisition-to-payable journey was completed through actual UI modules and HTTP in the existing8085 installation, including a new reviewed supplier and distinct decisions. One entry /compras, document retention, readable previews and exit protection; no new database, port, isolated demo or business-engine copy. This does not validate real deployment, payments/accounting of this origin or visual acceptance.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/purchasing-continuity-composition-20261103.json b/docs/proofs/purchasing-continuity-composition-20261103.json new file mode 100644 index 0000000..2814d95 --- /dev/null +++ b/docs/proofs/purchasing-continuity-composition-20261103.json @@ -0,0 +1,292 @@ +{ + "date": "2026-11-03T17:34:15.059Z", + "increment": "SGF-PURCHASING-USABLE-CONTINUITY-QA-v1", + "passed": true, + "functional_code": true, + "checks": 55, + "tests": { + "real_ui": { + "file": "private/receipt-composition-ce4c9bef1a51/receipt-ui-http.json", + "sha256": "351bf5c239cc48771fd18dd702286f962d7ea7a8fd2a1fd663803a784ba6f06b", + "checks": 17, + "result": { + "passed": true, + "checks": [ + "opening real receipt form performs no preview or confirmation", + "unchecked line does not load article catalogue", + "warehouse menu does not advertise inaccessible financial continuation", + "checking line activates actual per-line native catalogue without type error", + "catalogue browsing chooses no article automatically", + "explicit catalogue choice survives model publication", + "editing article search invalidates previous choice", + "search control sends actual literal code to catalogue endpoint", + "real UI prepares valid native receipt preview", + "preview transmits explicit article and current selection fingerprint", + "preview does not submit confirmation automatically", + "editing form invalidates ready confirmation", + "lost response after real commit preserves same preview for explicit recovery", + "second UI confirmation recovers committed result without another receipt", + "same UI refresh shows exactly one completed receipt", + "native read verifies chosen article and one physical movement of1UN", + "UI flow invokes only existing receipt commands" + ], + "dom_simulation": true, + "real_http": true, + "source_workflow_setup_only": true, + "receipt_id": 1, + "receipt_count": 1, + "movements": 1, + "quantity_milli": 1000, + "concurrency": false, + "lost_response_statuses": [ + 201, + 200 + ], + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "boundaries": { + "file": "private/receipt-composition-ce4c9bef1a51/continuity-boundaries.json", + "sha256": "b4b26a9205fe8c6597a91386537cc8776e61b8d89bbe6eeb5ed08a2ecfdf4bf7", + "checks": 8, + "result": { + "passed": true, + "checks": [ + "supplier empty initial search equals omitted search and returns native paginated eligible directory", + "trimmed blank supplier search keeps unfiltered initial-page semantics", + "nullable empty filter still rejects array search and unsupported page size", + "empty search does not bypass sourcing preparation right", + "empty search does not reopen proposals closed by actual award", + "empty article filter equals omitted filter in actual receipt catalogue", + "article catalogue keeps strict parameter types and allowlist", + "catalogue checks preserve one UI receipt and physical movement without invoice debt or payment" + ], + "open_request_fixture_minor": 100, + "supplier_rows": 3, + "new_right_names": [], + "visual_review": false + } + }, + "history": { + "file": "private/purchasing-continuity-read-e266c0e778c2/purchasing-continuity-read-result.json", + "sha256": "23efe4e994153ff156e202985d8422262010cfa24c7b68c9fef30e07d8690d09", + "checks": 12, + "result": { + "passed": true, + "checks": [ + "completed read fixture contains downstream payloads that old unfiltered histories would disclose", + "request history is scoped before limit and retains exact own-stage evidence for requester", + "request history is scoped before limit and retains exact own-stage evidence for actor", + "request history is scoped before limit and retains exact own-stage evidence for issuer", + "sourcing summary contains only upstream and sourcing-stage events", + "sourcing pagination total counts only authorised stage history", + "all sourcing pages preserve unique own-stage evidence without financial payload events", + "finance retains authorised invoice history in its own endpoint", + "stage history filtering does not grant access to another stage", + "request-only dossier remains scoped independently of inline histories", + "foreign request cannot expose sourcing history", + "142 original regression tables and all sequences remain unchanged by stage-history verification" + ], + "reused_proof": "purchasing-integrated-composition-20261103.json", + "financial_commands_repeated": 0, + "before_sha256": "7d462b3aa3eb941cc83ca61ef4272478cc5554fa8f8660378786764c704a7a5c", + "after_sha256": "7d462b3aa3eb941cc83ca61ef4272478cc5554fa8f8660378786764c704a7a5c", + "tables_checked": 142, + "new_right_names": [], + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "inline_ui": { + "file": "private/receipt-composition-ce4c9bef1a51/continuity-ui.json", + "sha256": "0f84c58e8779da22082cd70a7afba8ab38491302cafb86f90300adfe75ff8a58", + "checks": 9, + "result": { + "passed": true, + "checks": [ + "receipt carries actual order into invoice consultation", + "receipt continuation adds no hidden cross-stage request", + "invoice links retain exact receipt order dossier request and document responsibility", + "obligation returns to exact original invoice and physical order", + "physical-only menu does not advertise invoice destination", + "missing obligation and dossier menu entries suppress only those contextual links", + "disabled continuity feature leaves previous focused screen without inline links", + "default dossier link rendering remains independent of optional menu filter", + "all inline-link startup probes perform reads only" + ], + "dom_simulation": true, + "business_commands": 0, + "visual_review": false + } + }, + "demo": { + "file": "private/receipt-composition-2d2d938a3bec/purchasing-continuity-demo.json", + "sha256": "424b7ae18b179df29809bba79d7a117f769423034cecb05b17ad6cfe16194cf8", + "checks": 9, + "result": { + "passed": true, + "checks": [ + "new continuity demonstration begins without main business operations", + "inline continuity is enabled in new receipts screen", + "inline continuity is enabled in new invoices screen", + "inline continuity is enabled in new obligations screen", + "served affected static module matches purchasing-focus.mjs", + "served affected static module matches receipt-workspace.mjs", + "served affected static module matches supplier-invoice-workspace.mjs", + "served affected static module matches supplier-obligation-workspace.mjs", + "live probes preserve selected business tables permission grants and audit" + ], + "before": "2b15a0df98940b8c9b8f960889bfc1d03ac28e6def87670201e879464bf71f29", + "after": "2b15a0df98940b8c9b8f960889bfc1d03ac28e6def87670201e879464bf71f29", + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/ProcessHistory.php", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2" + }, + { + "file": "app/Modules/Purchasing/RequestController.php", + "sha256": "1cb75d7bc03105e0df4211b4470bdc8837f4a659bc65318286228949779d9dc6" + }, + { + "file": "app/Modules/Purchasing/SourcingController.php", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17" + }, + { + "file": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df" + }, + { + "file": "config/receipt_qa.php", + "sha256": "fc74192b6042a1d36b2eebe29ad58e971b1103d4fde722cb41177971f11b3d9c" + }, + { + "file": "public/purchasing-focus.mjs", + "sha256": "434319b8de23f5d6892666bd53232d463a0d458fe948cc6d7b476ad1228fafb6" + }, + { + "file": "public/receipt-workspace.mjs", + "sha256": "86421d30dc9868b10da2153f8bf0b50d9904ab5ccccbf9813464083ae1e20bd2" + }, + { + "file": "resources/views/receipt-workspace.blade.php", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d" + }, + { + "file": "public/supplier-invoice-workspace.mjs", + "sha256": "f767347371e2dc1573ec29a926509c87bcdea3ec09257a6b22395fc0cf01366f" + }, + { + "file": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063" + }, + { + "file": "public/supplier-obligation-workspace.mjs", + "sha256": "c2608e3cab7cd1810437a3a978e6f6ccbf2600a83dd0a39bd38510db8249f551" + }, + { + "file": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "ce0dc4159d42efcff9e09ec99a2ce5a2d378a215d4a853a37417a0ebf5445506" + } + ], + "pinned_native_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "unchanged_mutation_blocks": [ + { + "file": "app/Modules/Purchasing/RequestController.php", + "sha256": "31d00fff9d8e16f26705665f440512546f6d9f63d887b9c0f2b81251ca2a5346", + "unchanged_since_demo8078": true + }, + { + "file": "app/Modules/Purchasing/SourcingController.php", + "sha256": "37bd725271aa94d19415742a3c354de2249a427ebe388013b1ad09f471bb1806", + "unchanged_since_demo8078": true + }, + { + "file": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "92bc6c1692235e7042cb6af5b911548eff7817856b471107f852a8ab28db721d", + "unchanged_since_demo8078": true + } + ], + "authority": { + "new_right_names": [], + "new_business_writers": 0, + "inline_links_use_present_menu_as_presentation_hint": true, + "destination_api_remains_authority": true, + "stage_history_filtered_in_sql_before_pagination": true, + "original_audit_records_preserved": true + }, + "regression": { + "receipt_form_uses_real_http": true, + "dom_simulation_not_browser": true, + "explicit_article_choice_and_revision": true, + "receipt_count": 1, + "physical_quantity_milli": 1000, + "physical_movements": 1, + "lost_response_statuses": [ + 201, + 200 + ], + "new_concurrency_trial": false, + "additional_open_request_fixture_minor": 100, + "history_uses_completed_canonical_book_without_commands": true, + "tables_and_sequences_preserved": 142, + "prior_suites_not_repeated": true + }, + "demo": { + "port": 8079, + "entry": "http://127.0.0.1:8079/qa/enter/requester?open=1", + "warehouse": "http://127.0.0.1:8079/qa/enter/validator?open=1", + "finance": "http://127.0.0.1:8079/qa/enter/issuer?open=1", + "initial_main_requests": 0, + "initial_receipts": 0, + "initial_invoices": 0, + "initial_obligations": 0 + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf" + }, + { + "file": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "59bb66df5d5e12f898045669a0ad24664c3d09f2d3ab6cf70f4f13d6a34c6548" + }, + { + "file": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "388e738da7e9b3e7f521c8d67f85dd4ef34869c74daf0c04c09067b9fbde5242" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "target_database_connected": false, + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "previous_demo_data_written": false, + "public_rights_changed": false, + "publication": false, + "checkpoint": false + }, + "limitations": [ + "DOM-to-real-HTTP validation is functional evidence, not browser rendering, accessibility or visual acceptance.", + "The lost-response recovery is sequential201/200, not a new concurrency measurement. Existing valid concurrency proofs are retained.", + "The additional1MZN open request is targeted supplier-picker fixture preparation, not another full order or payable cycle.", + "Menu visibility controls presentation only; a stale or modified menu cannot grant destination API authority.", + "Request direct history remains its latest25 own-stage events. Sourcing remains paginated; the dossier keeps independently filtered transversal evidence.", + "No new React/Vite build: affected UI is served as static ES modules and Blade views. Syntax and served hashes of the affected modules are checked; prior valid React build proof is retained.", + "Sustained load, visual review, general installation and deployment capacity remain pending." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/purchasing-continuity-flow-20261103.json b/docs/proofs/purchasing-continuity-flow-20261103.json new file mode 100644 index 0000000..1c9834f --- /dev/null +++ b/docs/proofs/purchasing-continuity-flow-20261103.json @@ -0,0 +1,734 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "e9a3ca4c1fda8567ce331210f4995b60d2ae59e0824e6716b519806cd9e350aa", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "1cb75d7bc03105e0df4211b4470bdc8837f4a659bc65318286228949779d9dc6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_screen", + "repository": "sgf", + "path": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_screen", + "repository": "sgf", + "path": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "ce0dc4159d42efcff9e09ec99a2ce5a2d378a215d4a853a37417a0ebf5445506", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_workspace", + "repository": "sgf", + "path": "app/Modules/Purchasing/WorkspaceNavigation.php", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_navigation", + "repository": "sgf", + "path": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_picker", + "repository": "sgf", + "path": "public/supplier-picker-model.mjs", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_search_ui", + "repository": "sgf", + "path": "public/sourcing-workspace.mjs", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/DossierController.php", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_screen", + "repository": "sgf", + "path": "resources/views/purchasing-dossier.blade.php", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_ui", + "repository": "sgf", + "path": "public/purchasing-dossier.mjs", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_catalogue", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptCatalogue.php", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_workspace_ui", + "repository": "sgf", + "path": "public/receipt-workspace.mjs", + "sha256": "86421d30dc9868b10da2153f8bf0b50d9904ab5ccccbf9813464083ae1e20bd2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentsController.php", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_storage", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_ui", + "repository": "sgf", + "path": "public/supplier-documents.mjs", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_process_navigation", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessNavigation.php", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_focus", + "repository": "sgf", + "path": "public/purchasing-focus.mjs", + "sha256": "434319b8de23f5d6892666bd53232d463a0d458fe948cc6d7b476ad1228fafb6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stage_history", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessHistory.php", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_workspace_ui", + "repository": "sgf", + "path": "public/supplier-invoice-workspace.mjs", + "sha256": "f767347371e2dc1573ec29a926509c87bcdea3ec09257a6b22395fc0cf01366f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_workspace_ui", + "repository": "sgf", + "path": "public/supplier-obligation-workspace.mjs", + "sha256": "c2608e3cab7cd1810437a3a978e6f6ccbf2600a83dd0a39bd38510db8249f551", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. A subsequent scope fix filters request/sourcing audit events in SQL before limits/counts/pages, closing an alternate downstream financial-history exposure without changing original audit or writers. Empty initial supplier searches now survive middleware normalisation while closed-award and permission guards remain. Completed canonical history book is reused read-only with142 tables/sequences intact." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Demo8079 fixes the actual form-to-picker binding and blank initial article search. DOM-to-real-HTTP proof selects an article, transmits its revision, previews, confirms1UN and recovers a deliberately lost response with201/200, one receipt/movement. This is not browser visual acceptance or a new concurrency/load trial. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/purchasing-continuity-matrix-20261103.json b/docs/proofs/purchasing-continuity-matrix-20261103.json new file mode 100644 index 0000000..f7b1a5d --- /dev/null +++ b/docs/proofs/purchasing-continuity-matrix-20261103.json @@ -0,0 +1,2320 @@ +{ + "date": "2026-11-03T17:35:13.965Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "e9a3ca4c1fda8567ce331210f4995b60d2ae59e0824e6716b519806cd9e350aa", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "1cb75d7bc03105e0df4211b4470bdc8837f4a659bc65318286228949779d9dc6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "1cb75d7bc03105e0df4211b4470bdc8837f4a659bc65318286228949779d9dc6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_workspace", + "file": "app/Modules/Purchasing/WorkspaceNavigation.php", + "repository": "sgf", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1" + }, + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_navigation", + "file": "resources/views/partials/purchasing-navigation.blade.php", + "repository": "sgf", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_picker", + "file": "public/supplier-picker-model.mjs", + "repository": "sgf", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_search_ui", + "file": "public/sourcing-workspace.mjs", + "repository": "sgf", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "15ed768992dfd8858df65ce7fa41c733906875aec98b1c347169d83571cde52e" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_controller", + "file": "app/Modules/Purchasing/DossierController.php", + "repository": "sgf", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_screen", + "file": "resources/views/purchasing-dossier.blade.php", + "repository": "sgf", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_ui", + "file": "public/purchasing-dossier.mjs", + "repository": "sgf", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_documents", + "file": "app/Modules/Purchasing/SupplierDocumentsController.php", + "repository": "sgf", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_document_storage", + "file": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "repository": "sgf", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "a8c7fbe18d9ccd6a7e6fd27275e8827ac6a75f4b147ec02b06fabc30a15f29c8" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_document_ui", + "file": "public/supplier-documents.mjs", + "repository": "sgf", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "70e96bc60238efe6bb8a65297f7412fee9abb143dd96805713bb1deafc784820" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_process_navigation", + "file": "app/Modules/Purchasing/ProcessNavigation.php", + "repository": "sgf", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_focus", + "file": "public/purchasing-focus.mjs", + "repository": "sgf", + "sha256": "434319b8de23f5d6892666bd53232d463a0d458fe948cc6d7b476ad1228fafb6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "77a18d186c8ebb5065cf60816b7fd8d11a37fe801296a60f06ff0a6cf590b2e4" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "434319b8de23f5d6892666bd53232d463a0d458fe948cc6d7b476ad1228fafb6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stage_history", + "file": "app/Modules/Purchasing/ProcessHistory.php", + "repository": "sgf", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-search-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 51 + } + ], + "sha256": "388e738da7e9b3e7f521c8d67f85dd4ef34869c74daf0c04c09067b9fbde5242", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 52 + } + ], + "sha256": "d5709128ee45b7ee1397695b06502b9386dccd13779203c13abbd54281552068", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. A subsequent scope fix filters request/sourcing audit events in SQL before limits/counts/pages, closing an alternate downstream financial-history exposure without changing original audit or writers. Empty initial supplier searches now survive middleware normalisation while closed-award and permission guards remain. Completed canonical history book is reused read-only with142 tables/sequences intact.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "7ed4b9292e214b11c42af1eae3fb63d967a7e15f026648c957f8a5b54f211f69" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "51a0fa060fcce212646cf22332df352d90a5994cb7785eedc789585e02569616" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "40e7db8ac3d47b60f46fb5b8c623dec9ff9716bc9f2e1ea400d0751f0d0cf890" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_catalogue", + "file": "app/Modules/Purchasing/ReceiptCatalogue.php", + "repository": "sgf", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_workspace_ui", + "file": "public/receipt-workspace.mjs", + "repository": "sgf", + "sha256": "86421d30dc9868b10da2153f8bf0b50d9904ab5ccccbf9813464083ae1e20bd2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "f286a99bb0df5c6080e8104d501707e5a9e13046d5dd7144dec32bf0817a92a0" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "10b412a5ec6c973152f165b34caacc685e25bcf2eb0e6ba2f7f7e58df4e1f00a" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "a128926d876ae10eb2a17ec2410ba99282d782f03bb9642cbdcad93d548ce002" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "f0f242538e4131910d612da1f5b22e4955f3bdc58d4c4121d7b1242a5eb52df5" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "86421d30dc9868b10da2153f8bf0b50d9904ab5ccccbf9813464083ae1e20bd2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_documents", + "file": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "repository": "sgf", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-workspace-completion-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "59bb66df5d5e12f898045669a0ad24664c3d09f2d3ab6cf70f4f13d6a34c6548", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 58 + } + ], + "sha256": "b820a6b355450a79c9f244ce8eb6950e7c1cbe4427bf85bca772fb0fc5c085d2", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Demo8079 fixes the actual form-to-picker binding and blank initial article search. DOM-to-real-HTTP proof selects an article, transmits its revision, previews, confirms1UN and recovers a deliberately lost response with201/200, one receipt/movement. This is not browser visual acceptance or a new concurrency/load trial. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_invoice_controller", + "file": "app/Modules/Purchasing/InvoiceController.php", + "repository": "sgf", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_invoice_screen", + "file": "resources/views/supplier-invoice-workspace.blade.php", + "repository": "sgf", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "396cea98bce6c2ccff510efd917e2f336ba29657ea5a8277116c41bd70c92e15" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_workspace_ui", + "file": "public/supplier-invoice-workspace.mjs", + "repository": "sgf", + "sha256": "f767347371e2dc1573ec29a926509c87bcdea3ec09257a6b22395fc0cf01366f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "68671400153a97387f77ad0cddbc0f7f6367caeaebef8fc219d84fc8cf118eb3" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "5f0112c38e805fe9ed2e733053bae77f8dd4e3e1cb6b9cba8e4bc7bb469205d7" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "f767347371e2dc1573ec29a926509c87bcdea3ec09257a6b22395fc0cf01366f" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_obligation_controller", + "file": "app/Modules/Purchasing/ObligationController.php", + "repository": "sgf", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_screen", + "file": "resources/views/supplier-obligation-workspace.blade.php", + "repository": "sgf", + "sha256": "ce0dc4159d42efcff9e09ec99a2ce5a2d378a215d4a853a37417a0ebf5445506", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "cbcef35273b6f54158f60b67f9c2b64c0a93e47cb01ca302b525479ce051e927" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "ce0dc4159d42efcff9e09ec99a2ce5a2d378a215d4a853a37417a0ebf5445506" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_workspace_ui", + "file": "public/supplier-obligation-workspace.mjs", + "repository": "sgf", + "sha256": "c2608e3cab7cd1810437a3a978e6f6ccbf2600a83dd0a39bd38510db8249f551", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "eeb450e38dad72d9c38538ed363202d0a6cfcec466c61171028108f1bc243837" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "8f5154636553130f950d09b46ff917f91250516e10a03e93971cbe537c67f082" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "c2608e3cab7cd1810437a3a978e6f6ccbf2600a83dd0a39bd38510db8249f551" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 72 + } + ], + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/purchasing-dossier-composition-20261103.json b/docs/proofs/purchasing-dossier-composition-20261103.json new file mode 100644 index 0000000..18baa4e --- /dev/null +++ b/docs/proofs/purchasing-dossier-composition-20261103.json @@ -0,0 +1,216 @@ +{ + "date": "2026-11-03T15:18:35.661Z", + "increment": "SGF-PURCHASING-DOSSIER-QA-v1", + "passed": true, + "functional_code": true, + "checks": 49, + "tests": { + "read_reuse": { + "file": "private/dossier-read-8e26a5037442/dossier-read-result.json", + "sha256": "d3323770741882c7b33af278a8f60e44d017ae1c34c99b907246068cf1884694", + "checks": 30, + "result": { + "passed": true, + "checks": [ + "read proof reuses already-proven canonical responsibility without replaying commands", + "dossier list applies current origin and server status filter", + "literal process number search returns existing source", + "second dossier list page contains no repeated source", + "finance dossier identifies exact source and visible-page revision", + "canonical quotes evidence is present with independent page", + "canonical awards evidence is present with independent page", + "canonical orders evidence is present with independent page", + "canonical receipts evidence is present with independent page", + "canonical invoices evidence is present with independent page", + "dossier correlations use actual original order and invoice ids", + "canonical kernel supplies current balance with unknown due date", + "financial pagination describes bounded source window rather than invented global total", + "authorised event timeline uses server pagination", + "older event page preserves distinct existing history", + "independent later evidence pages do not reload earlier records", + "buyer sees procurement evidence without invoice or payable economics", + "request-only profile sees no downstream rows counts or amounts", + "request-only history excludes hidden-stage activity", + "event projection never embeds unrestricted before-after payloads", + "physical-only and invoice-only profiles do not inherit request dossier rights", + "unsupported filters and evidence pages refused", + "foreign or unknown request exposes no dossier", + "different available module cannot inspect dossier", + "unmapped unit cannot inspect known dossier", + "stale context generation cannot mix dossier reads", + "authorised dossier screen is connected to common navigation", + "physical-only navigation does not advertise request dossier", + "dossier has no mutation endpoint", + "all original regression tables and sequences remain unchanged after read proof" + ], + "reused_proof": "purchasing-integrated-composition-20261103.json", + "financial_commands_repeated": 0, + "before_sha256": "7d462b3aa3eb941cc83ca61ef4272478cc5554fa8f8660378786764c704a7a5c", + "after_sha256": "7d462b3aa3eb941cc83ca61ef4272478cc5554fa8f8660378786764c704a7a5c", + "tables_checked": 142, + "new_right_names": [], + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "guards": { + "file": "private/receipt-composition-4ee6fd6867a4/dossier-guard-result.json", + "sha256": "93bbe527897a01f737c3d2d0e692dec9d9019755541d4b61ee3375de7866c8e9", + "checks": 4, + "result": { + "passed": true, + "checks": [ + "disabled dossier list refuses before SQL", + "disabled dossier detail refuses before SQL", + "production refuses synthetic dossier before SQL", + "dossier route belongs to purchasing and guard probes issue zero SQL" + ], + "database_queries": 0 + } + }, + "demo": { + "file": "private/receipt-composition-4ee6fd6867a4/dossier-demo-result.json", + "sha256": "12869ed113b6a67e290e8d4eb18374a9da11cd540af1aca0d85fb73f370a1cb3", + "checks": 12, + "result": { + "passed": true, + "checks": [ + "live dossier starts without invented process or responsibility", + "live dossier list respects requester", + "live dossier list respects approver", + "live dossier list respects actor", + "live dossier page served", + "revoked existing request right immediately removes dossier access", + "restored fixture grant recovers consultation", + "live dossier list respects issuer", + "live dossier list respects validator", + "live dossier list respects reviewer", + "served dossier script matches delivery", + "live checks preserve process grants and geographical evidence" + ], + "before": "17197268c93d424d00953db277f5c124235f340ef282392884ebaf674764730e", + "after": "17197268c93d424d00953db277f5c124235f340ef282392884ebaf674764730e", + "visual_review": false + } + }, + "assets": { + "file": "private/receipt-composition-4ee6fd6867a4/dossier-assets.json", + "sha256": "02ed5d9a1eca0d12273fce2b61db8d3b21feb70fca91b2451a13dbec9ea44ba8", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "private frontend build succeeds", + "served built assets match private build", + "dossier module is served through private static whitelist" + ], + "assets": [ + "assets/app-rwyn9RPO.js", + "assets/app-BLSNCrO7.css" + ], + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/DossierController.php", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e" + }, + { + "file": "app/Modules/Purchasing/WorkspaceNavigation.php", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8" + }, + { + "file": "app/Shared/Context/ModuleNavigation.php", + "sha256": "397d7a4af7d16547ff60ea20a6733aa994d98a6ecf0cbca4b1437da14c3c55a1" + }, + { + "file": "config/receipt_qa.php", + "sha256": "4971a1847478a6e8ba118af0e433655514a7425ce8056e8408fc8bec9c599c9f" + }, + { + "file": "routes/web.php", + "sha256": "ec6096504638d6b174e6ca726fcefcc0a30c4203d945534a4a4f32040164d6f7" + }, + { + "file": "resources/views/purchasing-dossier.blade.php", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741" + }, + { + "file": "public/purchasing-dossier.mjs", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1" + } + ], + "pinned_native_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "read_reuse": { + "source_regression": "purchasing-integrated-composition-20261103.json", + "original_application_preserved": true, + "new_application_and_sessions": true, + "all142_tables_and_sequences_unchanged": true, + "financial_commands_repeated": 0 + }, + "authority": { + "entry_right": "purchasing_requests.view", + "per_stage_rights": true, + "native_visibility": true, + "hidden_stages_have_no_counts_or_rows": true, + "history_excludes_hidden_stages_and_payloads": true, + "new_right_names": [], + "page_size": 25, + "financial_page_scope": "source_invoice_window", + "view_revision_scope": "visible_pages_only" + }, + "demo": { + "port": 8074, + "entry": "http://127.0.0.1:8074/qa/enter/requester?open=1", + "initial_main_operations": 0, + "prepared_suppliers": 3, + "approved_budget_minor": 100000, + "locations": 0 + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396" + }, + { + "file": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "388e738da7e9b3e7f521c8d67f85dd4ef34869c74daf0c04c09067b9fbde5242" + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "target_database_connected": false, + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "previous_demo_data_written": false, + "public_rights_changed": false, + "publication": false, + "checkpoint": false + }, + "limitations": [ + "Read dossier only: not a universal task queue, workflow readiness decision, approval or automatic execution.", + "Entry requires request view. Warehouse-only or invoice-only reviewers retain their own screens; dossier does not grant cross-stage rights.", + "Pagination of obligations is a25-invoice source window, not a global debt count. Empty page and inaccessible stage are distinct.", + "The regression read uses current application code against the original owned completed QA book, preserving its original profile/source identity. It does not clone or rewrite financial facts.", + "Only the new empty demonstration temporarily revokes/restores an existing QA grant; its final fingerprint is unchanged.", + "The extra supplier volume fixture remains8073;8074 starts with three prepared suppliers and the current paged selector.", + "Original native runtime pins are preserved; current schema provisioning and previous owner/runtime caveats are not converted into deployment evidence.", + "Visual review, sustained load and general deployment capability remain pending." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/purchasing-focus-composition-20261103.json b/docs/proofs/purchasing-focus-composition-20261103.json new file mode 100644 index 0000000..313a2cc --- /dev/null +++ b/docs/proofs/purchasing-focus-composition-20261103.json @@ -0,0 +1,293 @@ +{ + "date": "2026-11-03T17:16:17.984Z", + "increment": "SGF-PURCHASING-CONTEXTUAL-NAVIGATION-QA-v1", + "passed": true, + "functional_code": true, + "checks": 77, + "tests": { + "read": { + "file": "private/purchasing-focus-read-8a8270d3bfec/purchasing-focus-read-result.json", + "sha256": "17194b2c21d193434241408f36a11139a10b17e2e5fd119f2ab009ea8078e4fa", + "checks": 26, + "result": { + "passed": true, + "checks": [ + "dossier identifies exact existing request without issuing a command", + "all eight contextual links correlate real canonical ids and authorised destination stages", + "contextual destination is mounted: /purchasing/requests?request=3", + "contextual destination is mounted: /purchasing/sourcing?request=3", + "contextual destination is mounted: /purchasing/orders?award=2", + "contextual destination is mounted: /purchasing/receipts?order=1", + "contextual destination is mounted: /purchasing/invoices?order=1", + "contextual destination is mounted: /purchasing/receipts?order=1&receipt=1", + "contextual destination is mounted: /purchasing/invoices?order=1&invoice=2", + "contextual destination is mounted: /purchasing/obligations?invoice=2", + "destination API independently admits expected source: /api/purchasing-requests/3", + "destination API independently admits expected source: /api/purchasing-sourcing/requests/3", + "destination API independently admits expected source: /api/purchasing-orders/awards/2", + "destination API independently admits expected source: /api/purchasing-receipts/orders/1", + "destination API independently admits expected source: /api/purchasing-receipts/history/1", + "destination API independently admits expected source: /api/purchasing-invoices/orders/1", + "obligation focus resolves the actual invoice and existing canonical100MZN responsibility", + "request-only dossier reveals no hidden-stage links or record ids", + "copied finance links confer no authority on request-only profile", + "buyer links do not advertise restricted economic stages", + "foreign request and foreign or unknown order remain inaccessible at destination and dossier", + "link does not switch or bypass active module", + "link does not switch or bypass unit context", + "stale context token is rechecked in destination API", + "disabled navigation leaves existing dossier payload unchanged", + "all reused canonical host/native tables and sequences unchanged by navigation proof" + ], + "contextual_links": 8, + "reused_proof": "purchasing-integrated-composition-20261103.json", + "financial_commands_repeated": 0, + "before_sha256": "7d462b3aa3eb941cc83ca61ef4272478cc5554fa8f8660378786764c704a7a5c", + "after_sha256": "7d462b3aa3eb941cc83ca61ef4272478cc5554fa8f8660378786764c704a7a5c", + "tables_checked": 142, + "new_right_names": [], + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "ui": { + "file": "private/purchasing-focus-read-8a8270d3bfec/purchasing-focus-ui.json", + "sha256": "8cdd6c750e6cb1492c19a94486946c7a357978e5e10594687abf91cec865b715", + "checks": 36, + "result": { + "passed": true, + "checks": [ + "strict focus parser admits requests", + "strict focus parser admits orders", + "strict focus parser admits receipts", + "strict focus parser admits invoices", + "strict focus parser admits obligations", + "strict focus parser refuses ?order=0", + "strict focus parser refuses ?order=-1", + "strict focus parser refuses ?order=01", + "strict focus parser refuses ?order=1.5", + "strict focus parser refuses ?order=9007199254740992", + "strict focus parser refuses ?order=1&order=2", + "strict focus parser refuses ?receipt=3", + "strict focus parser refuses ?order=1&url=https://example.com", + "strict focus parser refuses ?order=1e2", + "strict focus parser refuses ?order=%3Cscript%3E", + "empty focus never selects a record and generated href is local and explicit", + "actual request-workspace opens exact focused source even when absent from first list page", + "actual request-workspace startup never prepares or confirms a business operation", + "actual sourcing-workspace opens exact focused source even when absent from first list page", + "actual sourcing-workspace startup never prepares or confirms a business operation", + "actual order-workspace opens exact focused source even when absent from first list page", + "actual order-workspace startup never prepares or confirms a business operation", + "actual receipt-workspace opens exact focused source even when absent from first list page", + "actual receipt-workspace startup never prepares or confirms a business operation", + "actual supplier-invoice-workspace opens exact focused source even when absent from first list page", + "actual supplier-invoice-workspace startup never prepares or confirms a business operation", + "actual supplier-obligation-workspace opens exact focused source even when absent from first list page", + "actual supplier-obligation-workspace startup never prepares or confirms a business operation", + "actual purchasing-dossier opens exact focused source even when absent from first list page", + "actual purchasing-dossier startup never prepares or confirms a business operation", + "invoice of another or unknown order is not substituted with first available document", + "receipt parent mismatch is reported before rendering receipt evidence", + "ambiguous initial link performs list reads only and chooses no award", + "link renderer rejects external and duplicated-parameter hints", + "interaction during initial list request cancels late automatic focus", + "disabled feature preserves list startup without focused read" + ], + "dom_simulation": true, + "business_commands": 0, + "visual_review": false + } + }, + "demo": { + "file": "private/receipt-composition-0275f83f7456/purchasing-focus-demo.json", + "sha256": "a0ef2929c6f5def159e5732c29dfe322f8e25e71bcf6803e132b50191f694a8b", + "checks": 12, + "result": { + "passed": true, + "checks": [ + "fresh integrated focus demo starts without main business operations", + "fresh workspace mounts focused reading: requests?request=1", + "fresh workspace mounts focused reading: sourcing?request=1", + "fresh workspace mounts focused reading: orders?award=1", + "fresh workspace mounts focused reading: receipts?order=1&receipt=1", + "fresh workspace mounts focused reading: invoices?order=1&invoice=1", + "fresh workspace mounts focused reading: obligations?invoice=1", + "fresh workspace mounts focused reading: dossiers?request=1", + "unknown focus source never grants or creates authority: /api/purchasing-dossiers/999999", + "unknown focus source never grants or creates authority: /api/purchasing-obligations/999999", + "shared focus module is served with exact private source bytes", + "demonstration probes preserve selected business tables grants geography and native audit" + ], + "before": "0638abda05a00333e61389132f92a8828c73e2a6154ee213cba9a5d5f8cdd4eb", + "after": "0638abda05a00333e61389132f92a8828c73e2a6154ee213cba9a5d5f8cdd4eb", + "visual_review": false + } + }, + "assets": { + "file": "private/receipt-composition-0275f83f7456/purchasing-focus-assets.json", + "sha256": "6cd38c3d83c89e3fe6bfb0df002fe87ae70f84c24026c88a88204a6af409dfff", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "private frontend build succeeds", + "served built assets match private build", + "purchasing focus module is served through private static whitelist" + ], + "assets": [ + "assets/app-rwyn9RPO.js", + "assets/app-BLSNCrO7.css" + ], + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/ProcessNavigation.php", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d" + }, + { + "file": "app/Modules/Purchasing/DossierController.php", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7" + }, + { + "file": "config/receipt_qa.php", + "sha256": "0ca44fc0c24ed97c298d851e97df278ea5c304d5b1dbecb76d7803e1fd571b60" + }, + { + "file": "public/purchasing-focus.mjs", + "sha256": "77a18d186c8ebb5065cf60816b7fd8d11a37fe801296a60f06ff0a6cf590b2e4" + }, + { + "file": "public/request-workspace.mjs", + "sha256": "384c67310d2a7adab7a94273bab385dff74af76c293622bb3c0d087245d7e6d8" + }, + { + "file": "resources/views/request-workspace.blade.php", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b" + }, + { + "file": "public/sourcing-workspace.mjs", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52" + }, + { + "file": "resources/views/sourcing-workspace.blade.php", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980" + }, + { + "file": "public/order-workspace.mjs", + "sha256": "41b81ab5641374b84a208b2973712368f4e1b50f804e90b56762d27c8e12ca3a" + }, + { + "file": "resources/views/order-workspace.blade.php", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959" + }, + { + "file": "public/receipt-workspace.mjs", + "sha256": "f0f242538e4131910d612da1f5b22e4955f3bdc58d4c4121d7b1242a5eb52df5" + }, + { + "file": "resources/views/receipt-workspace.blade.php", + "sha256": "40e7db8ac3d47b60f46fb5b8c623dec9ff9716bc9f2e1ea400d0751f0d0cf890" + }, + { + "file": "public/supplier-invoice-workspace.mjs", + "sha256": "5f0112c38e805fe9ed2e733053bae77f8dd4e3e1cb6b9cba8e4bc7bb469205d7" + }, + { + "file": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "396cea98bce6c2ccff510efd917e2f336ba29657ea5a8277116c41bd70c92e15" + }, + { + "file": "public/supplier-obligation-workspace.mjs", + "sha256": "8f5154636553130f950d09b46ff917f91250516e10a03e93971cbe537c67f082" + }, + { + "file": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "cbcef35273b6f54158f60b67f9c2b64c0a93e47cb01ca302b525479ce051e927" + }, + { + "file": "public/purchasing-dossier.mjs", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384" + }, + { + "file": "resources/views/purchasing-dossier.blade.php", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56" + } + ], + "pinned_native_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "authority": { + "new_right_names": [], + "new_mutation_endpoints": 0, + "new_business_writers": 0, + "filtered_by_existing_visible_stages": true, + "destination_authority_rechecked": true, + "module_company_unit_not_changed_by_link": true, + "preview_or_confirmation_on_startup": false + }, + "regression": { + "reused_completed_book": "purchasing-integrated-composition-20261103.json", + "contextual_links": 8, + "tables_preserved": 142, + "sequences_preserved": true, + "financial_commands_repeated": 0, + "first_page_not_required_for_focus": true, + "receipt_parent_checked_before_render": true, + "invoice_parent_checked_before_render": true, + "dom_simulation_not_browser": true + }, + "demo": { + "port": 8078, + "entry": "http://127.0.0.1:8078/qa/enter/requester?open=1", + "procurement": "http://127.0.0.1:8078/qa/enter/actor?open=1", + "finance": "http://127.0.0.1:8078/qa/enter/issuer?open=1", + "initial_main_requests": 0, + "initial_receipts": 0, + "initial_invoices": 0, + "initial_obligations": 0 + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "b820a6b355450a79c9f244ce8eb6950e7c1cbe4427bf85bca772fb0fc5c085d2" + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62" + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "target_database_connected": false, + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "previous_demo_data_written": false, + "public_rights_changed": false, + "publication": false, + "checkpoint": false + }, + "limitations": [ + "This is contextual navigation and read integration. It does not execute, approve or determine readiness of the next business stage.", + "The same session and current context are used; links do not transfer another actor identity or grant destination access.", + "Lists retain their own pagination and filters. A focused record is loaded independently by its authorised detail endpoint; no universe scan or automatic first-record fallback.", + "DOM tests use minimal synthetic read fixtures for the actual seven modules. They are not a browser rendering, visual or accessibility review.", + "Only the first stage pages shown by the dossier have contextual links; other pages remain independently paginated.", + "Sustained load, general deployment and real operational/fiscal readiness remain separate." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/purchasing-focus-flow-20261103.json b/docs/proofs/purchasing-focus-flow-20261103.json new file mode 100644 index 0000000..eb28b35 --- /dev/null +++ b/docs/proofs/purchasing-focus-flow-20261103.json @@ -0,0 +1,713 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "4dc7254aa316fe28e7e4cd0217282d491ea9772cb1f48499b22c0d9cb414bd45", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "51a0fa060fcce212646cf22332df352d90a5994cb7785eedc789585e02569616", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "40e7db8ac3d47b60f46fb5b8c623dec9ff9716bc9f2e1ea400d0751f0d0cf890", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_screen", + "repository": "sgf", + "path": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "396cea98bce6c2ccff510efd917e2f336ba29657ea5a8277116c41bd70c92e15", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_screen", + "repository": "sgf", + "path": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "cbcef35273b6f54158f60b67f9c2b64c0a93e47cb01ca302b525479ce051e927", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_workspace", + "repository": "sgf", + "path": "app/Modules/Purchasing/WorkspaceNavigation.php", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_navigation", + "repository": "sgf", + "path": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_picker", + "repository": "sgf", + "path": "public/supplier-picker-model.mjs", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_search_ui", + "repository": "sgf", + "path": "public/sourcing-workspace.mjs", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/DossierController.php", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_screen", + "repository": "sgf", + "path": "resources/views/purchasing-dossier.blade.php", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_ui", + "repository": "sgf", + "path": "public/purchasing-dossier.mjs", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_catalogue", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptCatalogue.php", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_workspace_ui", + "repository": "sgf", + "path": "public/receipt-workspace.mjs", + "sha256": "f0f242538e4131910d612da1f5b22e4955f3bdc58d4c4121d7b1242a5eb52df5", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentsController.php", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_storage", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_ui", + "repository": "sgf", + "path": "public/supplier-documents.mjs", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_process_navigation", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessNavigation.php", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_focus", + "repository": "sgf", + "path": "public/purchasing-focus.mjs", + "sha256": "77a18d186c8ebb5065cf60816b7fd8d11a37fe801296a60f06ff0a6cf590b2e4", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/purchasing-focus-matrix-20261103.json b/docs/proofs/purchasing-focus-matrix-20261103.json new file mode 100644 index 0000000..9d07eee --- /dev/null +++ b/docs/proofs/purchasing-focus-matrix-20261103.json @@ -0,0 +1,2166 @@ +{ + "date": "2026-11-03T17:16:38.021Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "4dc7254aa316fe28e7e4cd0217282d491ea9772cb1f48499b22c0d9cb414bd45", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_workspace", + "file": "app/Modules/Purchasing/WorkspaceNavigation.php", + "repository": "sgf", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1" + }, + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_navigation", + "file": "resources/views/partials/purchasing-navigation.blade.php", + "repository": "sgf", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_picker", + "file": "public/supplier-picker-model.mjs", + "repository": "sgf", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_search_ui", + "file": "public/sourcing-workspace.mjs", + "repository": "sgf", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "15ed768992dfd8858df65ce7fa41c733906875aec98b1c347169d83571cde52e" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_controller", + "file": "app/Modules/Purchasing/DossierController.php", + "repository": "sgf", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_screen", + "file": "resources/views/purchasing-dossier.blade.php", + "repository": "sgf", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_ui", + "file": "public/purchasing-dossier.mjs", + "repository": "sgf", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_documents", + "file": "app/Modules/Purchasing/SupplierDocumentsController.php", + "repository": "sgf", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_document_storage", + "file": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "repository": "sgf", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "a8c7fbe18d9ccd6a7e6fd27275e8827ac6a75f4b147ec02b06fabc30a15f29c8" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_document_ui", + "file": "public/supplier-documents.mjs", + "repository": "sgf", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "70e96bc60238efe6bb8a65297f7412fee9abb143dd96805713bb1deafc784820" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_process_navigation", + "file": "app/Modules/Purchasing/ProcessNavigation.php", + "repository": "sgf", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_focus", + "file": "public/purchasing-focus.mjs", + "repository": "sgf", + "sha256": "77a18d186c8ebb5065cf60816b7fd8d11a37fe801296a60f06ff0a6cf590b2e4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "77a18d186c8ebb5065cf60816b7fd8d11a37fe801296a60f06ff0a6cf590b2e4" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-search-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 51 + } + ], + "sha256": "388e738da7e9b3e7f521c8d67f85dd4ef34869c74daf0c04c09067b9fbde5242", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 52 + } + ], + "sha256": "d5709128ee45b7ee1397695b06502b9386dccd13779203c13abbd54281552068", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "51a0fa060fcce212646cf22332df352d90a5994cb7785eedc789585e02569616", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "7ed4b9292e214b11c42af1eae3fb63d967a7e15f026648c957f8a5b54f211f69" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "51a0fa060fcce212646cf22332df352d90a5994cb7785eedc789585e02569616" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "40e7db8ac3d47b60f46fb5b8c623dec9ff9716bc9f2e1ea400d0751f0d0cf890", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "40e7db8ac3d47b60f46fb5b8c623dec9ff9716bc9f2e1ea400d0751f0d0cf890" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_catalogue", + "file": "app/Modules/Purchasing/ReceiptCatalogue.php", + "repository": "sgf", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_workspace_ui", + "file": "public/receipt-workspace.mjs", + "repository": "sgf", + "sha256": "f0f242538e4131910d612da1f5b22e4955f3bdc58d4c4121d7b1242a5eb52df5", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "f286a99bb0df5c6080e8104d501707e5a9e13046d5dd7144dec32bf0817a92a0" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "10b412a5ec6c973152f165b34caacc685e25bcf2eb0e6ba2f7f7e58df4e1f00a" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "a128926d876ae10eb2a17ec2410ba99282d782f03bb9642cbdcad93d548ce002" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "f0f242538e4131910d612da1f5b22e4955f3bdc58d4c4121d7b1242a5eb52df5" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_documents", + "file": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "repository": "sgf", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-workspace-completion-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "59bb66df5d5e12f898045669a0ad24664c3d09f2d3ab6cf70f4f13d6a34c6548", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 58 + } + ], + "sha256": "b820a6b355450a79c9f244ce8eb6950e7c1cbe4427bf85bca772fb0fc5c085d2", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_invoice_controller", + "file": "app/Modules/Purchasing/InvoiceController.php", + "repository": "sgf", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_invoice_screen", + "file": "resources/views/supplier-invoice-workspace.blade.php", + "repository": "sgf", + "sha256": "396cea98bce6c2ccff510efd917e2f336ba29657ea5a8277116c41bd70c92e15", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "396cea98bce6c2ccff510efd917e2f336ba29657ea5a8277116c41bd70c92e15" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_obligation_controller", + "file": "app/Modules/Purchasing/ObligationController.php", + "repository": "sgf", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_screen", + "file": "resources/views/supplier-obligation-workspace.blade.php", + "repository": "sgf", + "sha256": "cbcef35273b6f54158f60b67f9c2b64c0a93e47cb01ca302b525479ce051e927", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "cbcef35273b6f54158f60b67f9c2b64c0a93e47cb01ca302b525479ce051e927" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 72 + } + ], + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/purchasing-integrated-composition-20261103.json b/docs/proofs/purchasing-integrated-composition-20261103.json new file mode 100644 index 0000000..cf26904 --- /dev/null +++ b/docs/proofs/purchasing-integrated-composition-20261103.json @@ -0,0 +1,327 @@ +{ + "date": "2026-11-03T14:53:51.030Z", + "increment": "SGF-PURCHASING-INTEGRATED-QA-v1", + "passed": true, + "functional_code": true, + "checks": 68, + "tests": { + "integration": { + "file": "private/receipt-composition-b4093c6f6707/integrated-result.json", + "sha256": "cc39836b232fd0f005ced837ee792e78c42c15aa791dfa749709ac7210b9fc0f", + "checks": 29, + "result": { + "passed": true, + "checks": [ + "single composition begins before request and debt", + "buyer navigation includes only existing authorised stages", + "warehouse hub does not expose financial navigation", + "foreign source remains isolated in combined book", + "request created through native lifecycle in combined composition", + "submission creates native reservation in same book", + "distinct head approves new request", + "approved request flows to sourcing without binding rewrite", + "three proposals retain new request and original supplier identities", + "native comparison ready after distinct individual evaluations", + "selection produces pending award rather than implicit approval", + "head identity survives invoice and payable composition and approves award", + "same award issues canonical order for original new request", + "warehouse receives actual new order without copying financial authority", + "new request origin is visible to invoice finance without static id binding", + "pending document does not recognise debt", + "distinct document matching consumes original budget without implicit recognition", + "new validated invoice reaches same native payable source", + "explicit preparation retains invoice snapshot", + "distinct person recognises same invoice responsibility", + "single100MZN principal and balance with unknown maturity", + "one reservation commitment and100MZN consumption in canonical budget", + "complete path leaves one debt and physical effect without payments", + "host budget entries unchanged through complete native path", + "supplier registry and common geography mounted alongside complete financial path", + "composition does not assign company or supplier locations automatically", + "module boundary remains enforced on hub and final responsibility", + "unmapped unit cannot inspect integrated responsibility", + "stage roles do not gain economic rights through shared navigation" + ], + "same_context_whole_purchasing_path": true, + "source_ids": { + "request": 3, + "award": 2, + "order": 1, + "invoice": 2, + "obligation": 2 + }, + "quotes": 3, + "evaluations": 6, + "principal_minor": 10000, + "native_consumption_minor": 10000, + "host_budget_unchanged": true, + "new_right_names": [], + "automatic_geography_assignments": 0, + "payments_created": 0, + "ledger_posted": false, + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "guards": { + "file": "private/receipt-composition-b4093c6f6707/integrated-navigation-guard.json", + "sha256": "ccc7d9781dd103ef63ae405e812c9803ff4afd7e045fbcad92b5d0634ef16ad3", + "checks": 5, + "result": { + "passed": true, + "checks": [ + "disabled composition exposes no navigation", + "disabled hub returns404 before any database read", + "production cannot discover synthetic navigation", + "production hub refuses without SQL", + "hub belongs to purchasing and guard probes issue zero SQL" + ], + "database_queries": 0 + } + }, + "home": { + "file": "docs/proofs/purchasing-workspace-home-20261103.json", + "sha256": "dca795434d994cb48029fe7235648f28a30c188a778465234a4755e95f0f0039", + "checks": 6, + "result": { + "passed": true, + "checks": [ + "request view exposes common workspace", + "warehouse view exposes same workspace", + "no stage rights hide workspace", + "unit required", + "disabled stage capabilities hide workspace", + "individual invoice and obligation destinations preserved" + ], + "visual_review": false + } + }, + "demo": { + "file": "private/receipt-composition-39625333874b/integrated-smoke.json", + "sha256": "e6857eff736e2976395bffba501ed8a6fae0a9342f942a676962e349b149e9b8", + "checks": 25, + "result": { + "passed": true, + "checks": [ + "live main book starts without requisitions", + "live main book starts without quotations", + "live main book starts without purchase_awards", + "live main book starts without purchase_orders", + "live main book starts without goods_receipts", + "live main book starts without invoices", + "live main book starts without pa_proposals", + "live main book starts without pa_obligations", + "workspace live for requester", + "stage shares permission-aware navigation for requester", + "workspace live for approver", + "stage shares permission-aware navigation for approver", + "workspace live for actor", + "stage shares permission-aware navigation for actor", + "workspace live for validator", + "warehouse sees physical stage without invoice economics", + "stage shares permission-aware navigation for validator", + "workspace live for issuer", + "stage shares permission-aware navigation for issuer", + "workspace live for reviewer", + "stage shares permission-aware navigation for reviewer", + "workspace live for auditor", + "stage shares permission-aware navigation for auditor", + "same host contains pinned reference without automatic localisation", + "live navigation and screens preserve all business geography and budget evidence" + ], + "before": "94d97191c69c81c1f9d4de76540d16755eefa0abdb6aaf98ee1359e7b5bb4c04", + "after": "94d97191c69c81c1f9d4de76540d16755eefa0abdb6aaf98ee1359e7b5bb4c04", + "initial_main_operations": 0, + "automatic_locations": 0, + "visual_review": false + } + }, + "assets": { + "file": "private/receipt-composition-39625333874b/integrated-demo-assets.json", + "sha256": "4682a3c84651fc08694754dde531aec6a90670a10a71dcef816e1c8ecf682200", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "private frontend build succeeds", + "served built assets match private build", + "obligation module is served through private static whitelist" + ], + "assets": [ + "assets/app-rwyn9RPO.js", + "assets/app-BLSNCrO7.css" + ], + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/WorkspaceNavigation.php", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1" + }, + { + "file": "app/Shared/Context/ModuleNavigation.php", + "sha256": "83b95ab07065696d271f194398eea7158c9774231fb40f1ec34306210540f402" + }, + { + "file": "resources/js/PurchasingHome.jsx", + "sha256": "6e68cd2a6f03539664d033a56618585cb29b7e5fe9e19be6ebc6d1ecb4811d96" + }, + { + "file": "routes/web.php", + "sha256": "72f79389de5575cc703150a054ea2c417d0633ea7646f106f05ff241dea28c94" + }, + { + "file": "resources/views/purchasing-workspace.blade.php", + "sha256": "c8b93e13d0887e9bbeb74bd601c7d84f9f4019ac6ce43a0d6bc9231bd6a5d403" + }, + { + "file": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50" + }, + { + "file": "resources/views/request-workspace.blade.php", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c" + }, + { + "file": "resources/views/supplier-workspace.blade.php", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b" + }, + { + "file": "resources/views/sourcing-workspace.blade.php", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f" + }, + { + "file": "resources/views/order-workspace.blade.php", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b" + }, + { + "file": "resources/views/receipt-workspace.blade.php", + "sha256": "75a4d917b300dc9f9c89a8feb90e4ba39829177f946a28fc613612ab4b91a308" + }, + { + "file": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5" + }, + { + "file": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7" + } + ], + "financial_sources_unchanged_between_compositions": [ + { + "file": "app/Modules/Purchasing/RequestController.php", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + }, + { + "file": "app/Modules/Purchasing/SourcingController.php", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + }, + { + "file": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + }, + { + "file": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "2c946b782a62e81b3ec637e2f72590ed6a6c0774f04a8082171f9c898d37c2db" + }, + { + "file": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6" + }, + { + "file": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + }, + { + "file": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d" + } + ], + "pinned_native_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "native_authority": { + "same_request_award_order_invoice_and_payable_book": true, + "host_budget_unchanged": true, + "principal_minor": 10000, + "consumption_minor": 10000, + "stock_movements": 1, + "automatic_payments": 0, + "ledger_posted": false + }, + "new_right_names": [], + "demo": { + "port": 8072, + "entry": "http://127.0.0.1:8072/qa/enter/requester?open=1", + "roles": [ + "requester", + "approver", + "actor", + "validator", + "issuer", + "reviewer", + "auditor" + ], + "initial_main_requests": 0, + "initial_main_awards": 0, + "initial_main_orders": 0, + "initial_main_invoices": 0, + "initial_obligations": 0, + "prepared_native_suppliers": 3, + "prepared_approved_budget_minor": 100000, + "reference_rows": 20407, + "locations_assigned": 0 + }, + "integration_run": { + "business_path_executed_once": true, + "initial_positive_checks": 26, + "final_boundary_checks_resumed": 3, + "reason": "With geography enabled the finance user can select Commercial: a valid different module yields409, rather than403 for an unavailable module. The final assertion was corrected; no business commands or valid suites were repeated." + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011" + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec" + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce" + }, + { + "file": "docs/proofs/geography-composition-20261103.json", + "sha256": "2f181320e2cc01095266d64f660b1e28697cb1e44529b89357fbfb21ab436a9e" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "target_database_connected": false, + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "previous_demo_data_written": false, + "public_rights_changed": false, + "publication": false, + "checkpoint": false + }, + "limitations": [ + "Integrated purchasing composition only; not a claim that all six ERP modules share one final installation.", + "Supplier financial review and cartography functionality reuse prior proofs; new checks verify mounting and absence of automatic localisation, without rerunning those suites.", + "Main book starts empty. Three supplier fixtures and one approved1000MZN budget are prepared; foreign request exists solely for isolation.", + "Payments, history responsibility migration, accounting of this new invoice origin, invoice correction/attachments and real operations remain separate.", + "Runtime remains pinned to the tested native bundle while native synthetic schema provisioning uses current project migrations.", + "Visual review, sustained load and general deployment/least-privilege installation remain pending." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/purchasing-integrated-flow-20261103.json b/docs/proofs/purchasing-integrated-flow-20261103.json new file mode 100644 index 0000000..82630bf --- /dev/null +++ b/docs/proofs/purchasing-integrated-flow-20261103.json @@ -0,0 +1,622 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "631d7d0ceb8233879dcaff5865427dd01d65b769554ce97060732f7536f2bfb8", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "2c946b782a62e81b3ec637e2f72590ed6a6c0774f04a8082171f9c898d37c2db", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "75a4d917b300dc9f9c89a8feb90e4ba39829177f946a28fc613612ab4b91a308", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "4bfff0204e67f21a6ddd785d64e7c91bd63bf65742add42fc3aa7f943ab5a6e4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_screen", + "repository": "sgf", + "path": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_screen", + "repository": "sgf", + "path": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_workspace", + "repository": "sgf", + "path": "app/Modules/Purchasing/WorkspaceNavigation.php", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_navigation", + "repository": "sgf", + "path": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/purchasing-integrated-matrix-20261103.json b/docs/proofs/purchasing-integrated-matrix-20261103.json new file mode 100644 index 0000000..2d61fc3 --- /dev/null +++ b/docs/proofs/purchasing-integrated-matrix-20261103.json @@ -0,0 +1,1720 @@ +{ + "date": "2026-11-03T14:54:24.618Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "631d7d0ceb8233879dcaff5865427dd01d65b769554ce97060732f7536f2bfb8", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "4bfff0204e67f21a6ddd785d64e7c91bd63bf65742add42fc3aa7f943ab5a6e4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_workspace", + "file": "app/Modules/Purchasing/WorkspaceNavigation.php", + "repository": "sgf", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_navigation", + "file": "resources/views/partials/purchasing-navigation.blade.php", + "repository": "sgf", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "2c946b782a62e81b3ec637e2f72590ed6a6c0774f04a8082171f9c898d37c2db", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "75a4d917b300dc9f9c89a8feb90e4ba39829177f946a28fc613612ab4b91a308", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + } + ], + "current_hash_has_matching_recorded_evidence": false + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_invoice_controller", + "file": "app/Modules/Purchasing/InvoiceController.php", + "repository": "sgf", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_invoice_screen", + "file": "resources/views/supplier-invoice-workspace.blade.php", + "repository": "sgf", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_obligation_controller", + "file": "app/Modules/Purchasing/ObligationController.php", + "repository": "sgf", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_screen", + "file": "resources/views/supplier-obligation-workspace.blade.php", + "repository": "sgf", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 72 + } + ], + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/purchasing-workspace-home-20261103.json b/docs/proofs/purchasing-workspace-home-20261103.json new file mode 100644 index 0000000..eb6a3ea --- /dev/null +++ b/docs/proofs/purchasing-workspace-home-20261103.json @@ -0,0 +1,12 @@ +{ + "passed": true, + "checks": [ + "request view exposes common workspace", + "warehouse view exposes same workspace", + "no stage rights hide workspace", + "unit required", + "disabled stage capabilities hide workspace", + "individual invoice and obligation destinations preserved" + ], + "visual_review": false +} diff --git a/docs/proofs/receipt-composition-20261103.json b/docs/proofs/receipt-composition-20261103.json new file mode 100644 index 0000000..575c35b --- /dev/null +++ b/docs/proofs/receipt-composition-20261103.json @@ -0,0 +1,356 @@ +{ + "date": "2026-11-03T09:27:15.755Z", + "increment": "SGF-RECEIPT-WORKFLOW-QA-v1", + "functional_code": true, + "passed": true, + "checks": 68, + "tests": { + "workflow": { + "file": "private/receipt-composition-0e6d9e9dfb39/result.json", + "sha256": "813b28724a3891c94ce8022286566909f3588afb5ea0ffff828dbf8a5728afd7", + "checks": 30, + "result": { + "passed": true, + "checks": [ + "fresh canonical book contains no receipt or movement", + "SGF lists only explicitly mapped canonical order", + "SGF receipt workspace is mounted", + "native workflow supplies actual pending quantities", + "unmapped order from another tenant refused", + "stale context token refused on read", + "reader cannot prepare a confirmation", + "original order issuer cannot receive the same order", + "explicit impact preview without financial effects", + "preview creates neither receipt nor physical movement", + "tampered preview refused", + "SGF confirmation invokes original workflow and shared writer exactly once", + "same confirmation recovers original receipt without duplication", + "canonical source remains sole physical authority", + "SGF history preserves accepted and rejected evidence with actual movement", + "original append-only receipt audit created once", + "next SGF read reflects cumulative native quantities", + "stale order revision requires renewed conference", + "second intent remains an uncommitted preview", + "native cumulative limit rejects over-receipt atomically", + "refused confirmation leaves all physical and receipt records unchanged", + "warehouse outside mapped unit refused", + "revoked host permission is rechecked at confirmation", + "preview cannot transfer authority to a reader", + "other SGF unit cannot reuse source mapping", + "remaining authorized quantity receives through same native workflow", + "quality shortfall stays visible rather than falsely completing order", + "two receipts and two unique movements; only1750 milli accepted", + "host session and database restored after native success and refusals", + "receipt did not create a supplier invoice" + ], + "http": true, + "canonical_receipts": 2, + "canonical_movements": 2, + "physical_milli": 1750, + "quality_pending": true, + "original_workflow": true, + "namespace_only_bundle": true, + "real_rights_changed": false, + "publication": false, + "deployment_capacity_validated": false + } + }, + "concurrency_recovery": { + "file": "private/receipt-composition-0e6d9e9dfb39/extra.json", + "sha256": "7e5168436f9907c4aa1ce39f7da0bc5b3fef4e9cdd2b6948de14603c9f749e62", + "checks": 10, + "result": { + "passed": true, + "checks": [ + "two independent HTTP workers recover the same key once", + "concurrent repetition has one canonical receipt and movement", + "different intentions on one revision serialize and stale intention is refused", + "competing decisions do not duplicate accepted physical quantity", + "injected failure after physical insert returns an unsuccessful response", + "native transaction rolls back parent, items, movement, audit and work signal together", + "same prepared intention succeeds after the cause is removed", + "recovery repetition returns the same immutable receipt", + "recovery leaves exactly three half-unit movements", + "read-only SGF profile receives no confirmation capability" + ], + "two_independent_http_workers": true, + "same_key_statuses": [ + 200, + 201 + ], + "competing_key_statuses": [ + 201, + 409 + ], + "fault_after_insert": true, + "rollback_fingerprint_equal": true, + "recovery_receipts": 3, + "recovery_quantity_milli": 1500, + "host_profile_changes_real": false + } + }, + "origin_audit": { + "file": "private/receipt-composition-0e6d9e9dfb39/origin.json", + "sha256": "60c40568db2b27c100ef1d2e2d7576449f4d6d0bc913e8b084ea0e3c162fbf92", + "checks": 6, + "result": { + "passed": true, + "checks": [ + "failure to record SGF provenance refuses the whole confirmation", + "physical receipt and original audit roll back when provenance fails", + "same intention recovers after provenance failure", + "same transaction records exact SGF context, actor mapping and workflow manifest", + "repetition duplicates neither business effect nor SGF provenance", + "fully accepted cumulative order reaches complete through SGF" + ], + "origin_audit_atomic": true, + "same_key_recovery": true, + "complete_order": true + } + }, + "runtime_contract": { + "file": "private/receipt-composition-0e6d9e9dfb39/runtime-contract.json", + "sha256": "004b34fa0fb582f8ca8d1855402fb855e03ccb400e77e7270f9e9311bdddfd17", + "checks": 4, + "result": { + "passed": true, + "checks": [ + "disabled/production guard refuses before database access 404", + "disabled/production guard refuses before database access 403", + "original replenishment execution context keeps native singleton semantics", + "local composition restores host database auth environment and transaction ownership" + ], + "business_writes": 0 + } + }, + "demonstration": { + "file": "private/receipt-composition-304b80f5a05f/demo-smoke.json", + "sha256": "b3f0137b86497796659cbf12ff4bee843d500b8fdf86794882b4da3bfdc8b457", + "checks": 9, + "result": { + "passed": true, + "checks": [ + "new demonstration starts with unconsumed receipt and movement decisions", + "demo exposes exact receipt capability for actor", + "functional screen available for actor", + "demo exposes exact receipt capability for validator", + "functional screen available for validator", + "demo exposes exact receipt capability for issuer", + "functional screen available for issuer", + "live receipt interface matches delivered source", + "read-only smoke preserves all initial business evidence" + ], + "before": "8f6ff38ca8faca3f2dcd2008045273d4130f6fcedbfe49e464bc05dc6b5071a4", + "after": "8f6ff38ca8faca3f2dcd2008045273d4130f6fcedbfe49e464bc05dc6b5071a4", + "receipts": 0, + "movements": 0, + "visual_review": false + } + }, + "compiled_assets": { + "file": "private/receipt-composition-304b80f5a05f/demo-assets.json", + "sha256": "be29d5c3d933f4f8ba3effddb05c1936932cbd35e295af567f4599fdc6a6abaf", + "checks": 3, + "result": { + "passed": true, + "checks": 3, + "root_status": 200, + "assets": [ + { + "file": "assets/app-B2i8GsyG.js", + "sha256": "af8caf2fa6310506f3b2c89af1a402f13bcdc4262e3f86c657f1cacfd071d7a6" + }, + { + "file": "assets/app-BLSNCrO7.css", + "sha256": "ad7650d0b0f7cc40783126a677d419b058f9f1494ae25f194c6d4b32f87ce657" + } + ], + "build_compiler": "vite8.3.5", + "visual_review": false + } + }, + "navigation": { + "file": "docs/proofs/receipt-home-20261103.json", + "sha256": "8f8bd5459f952a3285539a1c9d6cd7c23b37c168cd87ed118cea9a814e44ac11", + "checks": 6, + "result": { + "passed": true, + "checks": 6, + "names": [ + "explicit capability and scoped right expose receipt link", + "no receipt right hides link", + "other unit right cannot expose link", + "disabled composition hides link", + "no selected unit hides link", + "existing requisition link remains available" + ], + "source": "resources/js/PurchasingHome.jsx", + "sha256": "ff9b36b31b870112673eb4482858b34941c21e835e12fcbaab4c67236368a6fd", + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "file": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "file": "config/receipt_qa.php", + "sha256": "3b14467f57a460e10bd6dbc04554500d98c99f78239b4231b952520189e33273" + }, + { + "file": "routes/web.php", + "sha256": "2f7d64b793787ba68a1d55d3630d1fc00ed0d481d331adcf093db6c6876eb781" + }, + { + "file": "app/Shared/Context/ModuleNavigation.php", + "sha256": "2acfd28a98f2a4ab5d52d314f193e720c6445ac742edb591ac7c1bdaa53205ab" + }, + { + "file": "app/Modules/Identity/Services/IdentityWorkflow.php", + "sha256": "4e595d4efcea168b4498c8023ad74bf38b24eba69607d0bd5158e7cb31b8180a" + }, + { + "file": "resources/js/PurchasingHome.jsx", + "sha256": "ff9b36b31b870112673eb4482858b34941c21e835e12fcbaab4c67236368a6fd" + }, + { + "file": "resources/views/receipt-workspace.blade.php", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + }, + { + "file": "public/receipt-workspace.mjs", + "sha256": "f286a99bb0df5c6080e8104d501707e5a9e13046d5dd7144dec32bf0817a92a0" + }, + { + "file": "scripts/build-receipt-runtime.php", + "sha256": "2a0c461fd4aeaa1f222dd634255e5c0b5bd78ee3325d09bcf9a6fc1e930afa5b" + }, + { + "file": "scripts/receipt-composition-run.mjs", + "sha256": "bb67688a7b748ec4795b17864e69b7966cc7bed95ae87ab6994e9b5b3647e02a" + }, + { + "file": "scripts/receipt-composition-proof.php", + "sha256": "6c0377ffd6fd082b889a7c830849bcdde3c336259a07bd69ac88c3286695def6" + }, + { + "file": "scripts/receipt-composition-extra.php", + "sha256": "20d3f3aea0cd0322e6b2bd04b322bee2685aa8573304db83578f389a40bb3793" + }, + { + "file": "scripts/receipt-origin-proof.php", + "sha256": "980c06cc2d133957c7ada96495e0f117ed4a01814133f2d2d430c5d679b55a3a" + }, + { + "file": "scripts/receipt-runtime-contract.php", + "sha256": "aa0164f153709d83144163ee2b64c019aa74858c37daa8e6b11647c3eda31180" + }, + { + "file": "scripts/receipt-composition-http.php", + "sha256": "6d8c2b7004c82d8b910c6af9c337805b79ccf190dc02e994fc058d92e7b1d315" + }, + { + "file": "scripts/receipt-native-setup.php", + "sha256": "4c7c714742cda62b3e3654a6fc4136948ea6571f1b6ab7b0ef59023ff635206a" + }, + { + "file": "scripts/receipt-native-extra.php", + "sha256": "05153a45d349e370851c57d937c9a1d320e0711deceb41026669db4ccf059ea9" + }, + { + "file": "scripts/receipt-demo-smoke.php", + "sha256": "4331fefa219f41fdee1323fe9727736083271121ff43b24df66d707eebfa6ed0" + } + ], + "native_workflow": { + "original_source": "../compras/app/Services/ReceiptWorkflow.php", + "original_sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c", + "namespace_only_bundle_manifest_sha256": "5035f3e5c2ad5f5813604c3c3fe5342e784c8e8f22df3b4dea2379254d51879c", + "files_verified": 371, + "business_rules_reimplemented": false, + "parallel_source_changes": [ + { + "file": "app/Http/Controllers/GoodsReceiptController.php", + "archived_sha256": "8cd20b3028184020f42369dd3977415ac49285641c4cd833f3e61f81d4bcbfed", + "current_sha256": "828af3af530b3aaa4aa04b65c6e21f8c7b0e2ad3f459179669b1a8fd60a8ff63", + "used_by_adapter": false, + "preserved_without_changes": true + } + ], + "writer_manifest_sha256": "f0b99e591f9a4df135e685f64ceffad77bed259222debe0f34c20f95e3cad800" + }, + "demo": { + "url": "http://127.0.0.1:8064/qa/enter/actor?open=1", + "reader_url": "http://127.0.0.1:8064/qa/enter/validator?open=1", + "issuer_url": "http://127.0.0.1:8064/qa/enter/issuer?open=1", + "initial_receipts": 0, + "initial_movements": 0, + "port": 8064, + "synthetic_only": true + }, + "qa_rights": [ + "purchasing_receipts.view", + "purchasing_receipts.confirm" + ], + "prior_proofs_preserved": [ + { + "file": "docs/proofs/requisition-composition-20261103.json", + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e" + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5" + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124" + } + ], + "preservation": { + "installed_purchasing_pointer_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "old_stock_demo_manifest_sha256": "8b3ad1c600b84c8526b2d9f453a1c5c4e174a69d6acc78ace2af4f52a25dd762", + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "real_rights_changed": false, + "existing_demos_written": false, + "destination_migrated": false, + "purchasing_activated_at_destination": false, + "publication": false, + "checkpoint": false + }, + "selected_evidence_reuse": { + "first_21": "7251beec04b9d435c3bbf72052818dd5ab2e6626e530b1c45a2442d533defd7a", + "first_29": "41a12b8a719edc70b8feaa4cabe825d51bc5f1fde9323a463f1d17d0b5905739", + "failed_attempts_preserved": true, + "causes": [ + "Foreign warehouse was rejected422 by the original tenant validator; harness initially expected403.", + "Final assertion used supplier_invoices instead of the native invoices table." + ], + "accepted_tests_not_repeated": true + }, + "limitations": [ + "Explicit local QA identity/order/warehouse binding; no automatic tenant/company/unit equivalence.", + "Original source is packaged with namespace-only adaptation to coexist with SGF models; one bundle version per process. No general installation or long-lived Octane worker validation.", + "Host authority is held in a read/lock transaction; all receipt, movement and origin audit writes commit together in the native transaction. Host database has no receipt business copy.", + "New QA roles own their databases; deployment owner/runtime separation is not validated.", + "Order and receipt history are server-paginated; stock selector currently exposes at most100 source items and this is not a full catalogue search interface.", + "No new invoice, payment, accounting recognition, real fiscal emission, stock-cost composition or review of real associations.", + "No browser visual review, sustained load or deployment capacity evidence." + ], + "deployment_capacity_validated": false, + "visual_review_pending": true +} diff --git a/docs/proofs/receipt-documents-composition-20261103.json b/docs/proofs/receipt-documents-composition-20261103.json new file mode 100644 index 0000000..b6e5ba8 --- /dev/null +++ b/docs/proofs/receipt-documents-composition-20261103.json @@ -0,0 +1,269 @@ +{ + "date": "2026-11-03T16:55:11.029Z", + "increment": "SGF-RECEIPT-DOCUMENTS-QA-v1", + "passed": true, + "functional_code": true, + "checks": 58, + "tests": { + "documents": { + "file": "private/receipt-composition-1968d008dac9/receipt-documents-result.json", + "sha256": "085879363fff52b88a9a91dfedc3f758dd1967d32191d3e2859d366489b50e99", + "checks": 28, + "result": { + "passed": true, + "checks": [ + "fresh native receipt document book begins empty", + "receipt detail exposes attachment revision and existing warehouse capability", + "private metadata has server pagination15", + "request-only roles cannot inspect receipt attachment metadata", + "preview uses original service and explicit safe metadata and impact", + "preview rolls back document and audit and removes only staged file", + "native content extension and type validation preserved", + "independent sessions prepare same native operation key", + "confirmation rejects substituted bytes", + "confirmation rechecks existing host permission", + "outer provenance failure rolls back native document and compensates proven uncommitted file", + "concurrent confirmations finish once with201 and replay200 after lock release", + "lost-response replay creates no additional root decision", + "preview of same type and hash reuses original without deleting permanent file", + "new explicit intent reuses original native document and filename without another file", + "native key rejects another content before confirmation", + "metadata never exposes private path or native tenant", + "native download checks original hash and streams private sandboxed bytes", + "authorised download trace linked to original requisition", + "tampered stored evidence blocks both download and replay", + "document cannot cross receipt parent", + "16 documents span distinct15 and1 pages", + "permanent files match native documents and preview files are absent", + "receipt evidence appears in authorised requisition dossier timeline", + "other module cannot reuse document capability", + "unmapped unit cannot read private attachments", + "attachment book retains one complete receipt and its original1000milli movement", + "attachment decisions introduce no invoice debt payment or accounting effect" + ], + "transport_documents": 1, + "native_volume_documents": 15, + "documents": 16, + "permanent_files": 16, + "staged_files": 0, + "concurrency_statuses": [ + 200, + 201 + ], + "new_right_names": [], + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "additional": { + "file": "private/receipt-composition-1968d008dac9/receipt-documents-extra.json", + "sha256": "708f4c11c201b6265292ec99e29a7d7c6ec4ca47abe7c7adc08cb1e7f6afdb10", + "checks": 6, + "result": { + "passed": true, + "checks": [ + "confirmation compares current immutable receipt revision again", + "expired conference requires a new individual preview", + "changed source binding cannot confirm earlier conference", + "changed session context generation requires renewed conference", + "shared storage helper preserves supplier native preview with default disk", + "supplier preview keeps both document namespaces and prior receipt evidence intact" + ], + "new_right_names": [] + } + }, + "guards": { + "file": "private/receipt-composition-8c363c2b4ac1/receipt-documents-guards.json", + "sha256": "a84f8ab5e6d268bb037fc5422772817ccc54d05d5ec4b07a3f6a548003394f20", + "checks": 4, + "result": { + "passed": true, + "checks": [ + "disabled document metadata refuses before SQL", + "disabled upload refuses before validation storage and SQL", + "production refuses synthetic document adapter before SQL", + "document route belongs to purchasing and guard probes issue zero SQL" + ], + "database_queries": 0 + } + }, + "demo": { + "file": "private/receipt-composition-8c363c2b4ac1/receipt-documents-demo.json", + "sha256": "ec90367b867af77d5202dfd09d36eaae2f5a23a1a6ec8a7ab97cb32a6c937699", + "checks": 8, + "result": { + "passed": true, + "checks": [ + "new integrated demo starts without main requests receipts or documents", + "receipt screen respects actor permission", + "receipt screen respects validator permission", + "empty demo invents no receipt attachment owner", + "receipt screen respects requester permission", + "served receipt evidence source matches receipt-workspace.mjs", + "served receipt evidence source matches supplier-documents.mjs", + "demonstration metadata probes preserve supplier receipt document and audit book" + ], + "before": "20343ea6bd89e2d899bc299fa7f9479e9f17051a3bcbf0edee619252a771c94e", + "after": "20343ea6bd89e2d899bc299fa7f9479e9f17051a3bcbf0edee619252a771c94e", + "visual_review": false + } + }, + "assets": { + "file": "private/receipt-composition-8c363c2b4ac1/receipt-documents-assets.json", + "sha256": "fac39bfeea24042f5f55c959fca4c970139b814724f7e6fd68aa78316642989f", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "private frontend build succeeds", + "served built assets match private build", + "supplier document module is served through private static whitelist" + ], + "assets": [ + "assets/app-rwyn9RPO.js", + "assets/app-BLSNCrO7.css" + ], + "visual_review": false + } + }, + "ui": { + "file": "private/receipt-composition-8c363c2b4ac1/receipt-documents-ui.json", + "sha256": "8f72a40a473a96e8b53b83dc44d12b3782f11238b9cb87b293d7f08b39cd53b5", + "checks": 9, + "result": { + "passed": true, + "checks": [ + "shared component preserves original supplier type choices", + "receipt uses native types and an explicit initially empty choice", + "mounting lists evidence without preparing or confirming an upload", + "explicit receipt preview uses owner endpoint context and original revision", + "receipt impact explains preserved quantities and stock", + "only explicit confirmation sends the preview and reloads receipt history", + "editing invalidates the existing conference", + "late preview cannot restore confirmation after an input edit", + "read-only view lists documents without creating an upload form" + ], + "dom_simulation": true, + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c" + }, + { + "file": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db" + }, + { + "file": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "51a0fa060fcce212646cf22332df352d90a5994cb7785eedc789585e02569616" + }, + { + "file": "app/Modules/Purchasing/DossierController.php", + "sha256": "e74e20953fa86bb1a0a273b8cf4bd272767167d7665b8b8529cb47bc99d21281" + }, + { + "file": "config/receipt_qa.php", + "sha256": "5bce3d7d983579da47e2ae84d66eae10111f69fb49e0d3d2703ab047ac84d2bd" + }, + { + "file": "routes/web.php", + "sha256": "f7d16d6e0525f286e4ff4d1d577569163908b4780c503d97534929125e17f96b" + }, + { + "file": "public/receipt-workspace.mjs", + "sha256": "a128926d876ae10eb2a17ec2410ba99282d782f03bb9642cbdcad93d548ce002" + }, + { + "file": "public/supplier-documents.mjs", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36" + } + ], + "pinned_native_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "authority": { + "original_service": "ReceiptDocuments::add", + "original_download_controller": true, + "private_qa_storage": true, + "source_company_unit_checked": true, + "existing_rights": [ + "purchasing_receipts.view", + "purchasing_receipts.confirm" + ], + "new_right_names": [], + "canonical_document_reused_by_receipt_type_hash": true, + "quantity_or_quality_decision_changed": false + }, + "regression": { + "transport_documents": 1, + "native_volume_documents": 15, + "documents_and_files": 16, + "staged_files": 0, + "concurrency_statuses": [ + 200, + 201 + ], + "receipt_quantity_milli": 1000, + "physical_movements": 1, + "source_workflow_setup_only": true, + "successful_prefix_reused": true, + "dossier_test_corrected_for_profile_and_history_page": true, + "other_module_test_expected403_for_warehouse": true + }, + "demo": { + "port": 8077, + "entry": "http://127.0.0.1:8077/qa/enter/actor?open=1", + "warehouse": "http://127.0.0.1:8077/qa/enter/validator?open=1", + "initial_documents": 0, + "initial_receipts": 0, + "initial_main_requests": 0, + "prepared_suppliers": 3 + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "d5709128ee45b7ee1397695b06502b9386dccd13779203c13abbd54281552068" + }, + { + "file": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "59bb66df5d5e12f898045669a0ad24664c3d09f2d3ab6cf70f4f13d6a34c6548" + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "target_database_connected": false, + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "previous_demo_data_written": false, + "public_rights_changed": false, + "publication": false, + "checkpoint": false + }, + "limitations": [ + "Positive binary fixture is PNG; PDF/JPEG rules remain native, without a new full-format reader regression.", + "A document is evidence, not authentication, fiscal certification or a decision accepting quantities/quality.", + "Deduplication is within one receipt and document type by SHA; it is not global deduplication. Separate explicit intents may each have an audit event for the same canonical document.", + "Ordinary rollback compensation is tested. An uncertain commit retains evidence; crash-orphan reconciliation, retention, quotas and sustained storage load are pending.", + "Fifteen original-service uploads are volume fixture preparation, not15 HTTP transport confirmations.", + "The final physical assertion after resumed read checks verifies one receipt and one1000milli movement; no all-table before/after fingerprint is claimed for the full command run.", + "DOM simulation checks component logic, not browser rendering, accessibility or visual acceptance.", + "Native schema provisioning is current while runtime is pinned. General installation and least-privilege deployment are not validated.", + "Visual review, sustained load and deployment capacity remain pending." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/receipt-documents-flow-20261103.json b/docs/proofs/receipt-documents-flow-20261103.json new file mode 100644 index 0000000..b02b1b8 --- /dev/null +++ b/docs/proofs/receipt-documents-flow-20261103.json @@ -0,0 +1,699 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "549971ae98ab08c2ab399c43b18decd66cf989a20607c00cb0a0b091a7c26dc6", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "51a0fa060fcce212646cf22332df352d90a5994cb7785eedc789585e02569616", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "75a4d917b300dc9f9c89a8feb90e4ba39829177f946a28fc613612ab4b91a308", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_screen", + "repository": "sgf", + "path": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_screen", + "repository": "sgf", + "path": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_workspace", + "repository": "sgf", + "path": "app/Modules/Purchasing/WorkspaceNavigation.php", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_navigation", + "repository": "sgf", + "path": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_picker", + "repository": "sgf", + "path": "public/supplier-picker-model.mjs", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_search_ui", + "repository": "sgf", + "path": "public/sourcing-workspace.mjs", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/DossierController.php", + "sha256": "e74e20953fa86bb1a0a273b8cf4bd272767167d7665b8b8529cb47bc99d21281", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_screen", + "repository": "sgf", + "path": "resources/views/purchasing-dossier.blade.php", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_ui", + "repository": "sgf", + "path": "public/purchasing-dossier.mjs", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_catalogue", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptCatalogue.php", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_workspace_ui", + "repository": "sgf", + "path": "public/receipt-workspace.mjs", + "sha256": "a128926d876ae10eb2a17ec2410ba99282d782f03bb9642cbdcad93d548ce002", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentsController.php", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_storage", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_ui", + "repository": "sgf", + "path": "public/supplier-documents.mjs", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/receipt-documents-matrix-20261103.json b/docs/proofs/receipt-documents-matrix-20261103.json new file mode 100644 index 0000000..091c3e5 --- /dev/null +++ b/docs/proofs/receipt-documents-matrix-20261103.json @@ -0,0 +1,2030 @@ +{ + "date": "2026-11-03T16:55:29.672Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "549971ae98ab08c2ab399c43b18decd66cf989a20607c00cb0a0b091a7c26dc6", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_workspace", + "file": "app/Modules/Purchasing/WorkspaceNavigation.php", + "repository": "sgf", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1" + }, + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_navigation", + "file": "resources/views/partials/purchasing-navigation.blade.php", + "repository": "sgf", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_picker", + "file": "public/supplier-picker-model.mjs", + "repository": "sgf", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_search_ui", + "file": "public/sourcing-workspace.mjs", + "repository": "sgf", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "15ed768992dfd8858df65ce7fa41c733906875aec98b1c347169d83571cde52e" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_controller", + "file": "app/Modules/Purchasing/DossierController.php", + "repository": "sgf", + "sha256": "e74e20953fa86bb1a0a273b8cf4bd272767167d7665b8b8529cb47bc99d21281", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_dossier_screen", + "file": "resources/views/purchasing-dossier.blade.php", + "repository": "sgf", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_ui", + "file": "public/purchasing-dossier.mjs", + "repository": "sgf", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_documents", + "file": "app/Modules/Purchasing/SupplierDocumentsController.php", + "repository": "sgf", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_document_storage", + "file": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "repository": "sgf", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "a8c7fbe18d9ccd6a7e6fd27275e8827ac6a75f4b147ec02b06fabc30a15f29c8" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_document_ui", + "file": "public/supplier-documents.mjs", + "repository": "sgf", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "70e96bc60238efe6bb8a65297f7412fee9abb143dd96805713bb1deafc784820" + } + ], + "current_hash_has_matching_recorded_evidence": false + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-search-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 51 + } + ], + "sha256": "388e738da7e9b3e7f521c8d67f85dd4ef34869c74daf0c04c09067b9fbde5242", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 52 + } + ], + "sha256": "d5709128ee45b7ee1397695b06502b9386dccd13779203c13abbd54281552068", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "51a0fa060fcce212646cf22332df352d90a5994cb7785eedc789585e02569616", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "7ed4b9292e214b11c42af1eae3fb63d967a7e15f026648c957f8a5b54f211f69" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "51a0fa060fcce212646cf22332df352d90a5994cb7785eedc789585e02569616" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "75a4d917b300dc9f9c89a8feb90e4ba39829177f946a28fc613612ab4b91a308", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_receipt_catalogue", + "file": "app/Modules/Purchasing/ReceiptCatalogue.php", + "repository": "sgf", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_workspace_ui", + "file": "public/receipt-workspace.mjs", + "repository": "sgf", + "sha256": "a128926d876ae10eb2a17ec2410ba99282d782f03bb9642cbdcad93d548ce002", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "f286a99bb0df5c6080e8104d501707e5a9e13046d5dd7144dec32bf0817a92a0" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "10b412a5ec6c973152f165b34caacc685e25bcf2eb0e6ba2f7f7e58df4e1f00a" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "a128926d876ae10eb2a17ec2410ba99282d782f03bb9642cbdcad93d548ce002" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_documents", + "file": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "repository": "sgf", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-workspace-completion-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "59bb66df5d5e12f898045669a0ad24664c3d09f2d3ab6cf70f4f13d6a34c6548", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 58 + } + ], + "sha256": "b820a6b355450a79c9f244ce8eb6950e7c1cbe4427bf85bca772fb0fc5c085d2", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_invoice_controller", + "file": "app/Modules/Purchasing/InvoiceController.php", + "repository": "sgf", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_invoice_screen", + "file": "resources/views/supplier-invoice-workspace.blade.php", + "repository": "sgf", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_obligation_controller", + "file": "app/Modules/Purchasing/ObligationController.php", + "repository": "sgf", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_screen", + "file": "resources/views/supplier-obligation-workspace.blade.php", + "repository": "sgf", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 72 + } + ], + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/receipt-home-20261103.json b/docs/proofs/receipt-home-20261103.json new file mode 100644 index 0000000..75a999a --- /dev/null +++ b/docs/proofs/receipt-home-20261103.json @@ -0,0 +1,15 @@ +{ + "passed": true, + "checks": 6, + "names": [ + "explicit capability and scoped right expose receipt link", + "no receipt right hides link", + "other unit right cannot expose link", + "disabled composition hides link", + "no selected unit hides link", + "existing requisition link remains available" + ], + "source": "resources/js/PurchasingHome.jsx", + "sha256": "ff9b36b31b870112673eb4482858b34941c21e835e12fcbaab4c67236368a6fd", + "visual_review": false +} diff --git a/docs/proofs/receipt-selection-race-20261103.json b/docs/proofs/receipt-selection-race-20261103.json new file mode 100644 index 0000000..a9b0fba --- /dev/null +++ b/docs/proofs/receipt-selection-race-20261103.json @@ -0,0 +1,8 @@ +{ + "passed": true, + "checks": 6, + "node_vm_only": true, + "actual_browser": false, + "late_domain_and_key_responses_rejected": true, + "read_only_get": true +} \ No newline at end of file diff --git a/docs/proofs/receipt-selection-race-manifest-20261103.json b/docs/proofs/receipt-selection-race-manifest-20261103.json new file mode 100644 index 0000000..91b91c1 --- /dev/null +++ b/docs/proofs/receipt-selection-race-manifest-20261103.json @@ -0,0 +1,21 @@ +{ + "date": "2026-11-03T07:04:10.309Z", + "passed": true, + "checks": 6, + "proof": { + "file": "docs/proofs/receipt-selection-race-20261103.json", + "sha256": "520a01de15b7a6de53c3c3386c0fb3919fb91c157656a3e7c46b60b00d77b7c9" + }, + "sources": [ + { + "file": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + }, + { + "file": "scripts/receipt-selection-race-check.mjs", + "sha256": "84bacc7f2bfe203f5fd088ac286ce6087b51f1f452b921bb5467a1cf52ac2c8b" + } + ], + "actual_browser": false, + "database_connections": 0 +} \ No newline at end of file diff --git a/docs/proofs/receipt-workspace-completion-20261103.json b/docs/proofs/receipt-workspace-completion-20261103.json new file mode 100644 index 0000000..eff3336 --- /dev/null +++ b/docs/proofs/receipt-workspace-completion-20261103.json @@ -0,0 +1,242 @@ +{ + "date": "2026-11-03T15:35:18.718Z", + "increment": "SGF-RECEIPT-WORKSPACE-COMPLETION-QA-v1", + "passed": true, + "functional_code": true, + "checks": 41, + "tests": { + "receipt_boundary": { + "file": "private/receipt-composition-860c4042d588/receipt-workspace-result.json", + "sha256": "3c52cf0eeb8c1696736c90dd357887de86141b4a3b728a099b7ef480170fafe9", + "checks": 27, + "result": { + "passed": true, + "checks": [ + "new issued source starts before physical effects", + "bounded catalogue includes127 unit-compatible articles", + "all articles beyond100 reachable without overlapping pages", + "unit case/whitespace matches native rule; incompatible and foreign articles excluded", + "catalogue pages100/27 cover same eligible universe", + "case-insensitive code search reaches beyond100 with selection fingerprint", + "name search treats wildcard characters literally", + "catalogue projection exposes no cost or valuation fields", + "article selection requires existing physical confirmation authority", + "another source line cannot reuse catalogue entry", + "caller cannot override unit or bypass page bounds", + "fingerprinted preview creates no receipt or movement", + "catalogue change invalidates confirmation and old selected fingerprint", + "original native workflow remains final unit validator for legacy requests", + "foreign explicit article cannot be fingerprinted", + "same-key concurrency still creates one canonical receipt and physical movement", + "receipt recovery uses original historical result without another movement", + "all26 original receipts visible across two history pages", + "history pages contain no duplicated evidence", + "older receipt detail retains original chosen article and snapshot", + "empty later history page invents no receipt", + "existing receipt-view profile retains history without stock selection authority", + "history rejects unsupported filters", + "legacy request finishes exactly1UN once across27 partial receipts", + "original writer completes actual order with no over-receipt", + "unmapped unit cannot inspect catalogue or history", + "new receipt workspace triggers no invoice debt payment or localisation" + ], + "eligible_articles": 127, + "receipts": 27, + "quantity_milli": 1000, + "native_history_fixture_receipts": 25, + "source_workflow_setup_only": true, + "concurrency_statuses": [ + 200, + 201 + ], + "new_right_names": [], + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "guards": { + "file": "private/receipt-composition-9d55107a271b/receipt-workspace-guards.json", + "sha256": "c5be2008f99ea5e7dd9af8be47be2323f49d94e4b1d0d2094901e2b6708b0c38", + "checks": 4, + "result": { + "passed": true, + "checks": [ + "disabled catalogue refuses before SQL", + "disabled history refuses before SQL", + "production refuses synthetic catalogue before SQL", + "catalogue belongs to purchasing and guard probes issue zero SQL" + ], + "database_queries": 0 + } + }, + "demo": { + "file": "private/receipt-composition-9d55107a271b/receipt-workspace-demo.json", + "sha256": "76ac8f44bf73759d83285eb9fc8c92bec6c01c17347087a7c0ac956b306494ca", + "checks": 6, + "result": { + "passed": true, + "checks": [ + "warehouse demo starts before main request order or physical effects", + "live receipt workspace served", + "warehouse waits for actual issued main order", + "served warehouse source matches receipt-workspace.mjs", + "served warehouse source matches supplier-picker-model.mjs", + "warehouse demonstration checks preserve business and geographic facts" + ], + "before": "ad1a7a703638ad96a9226be900a6c0f461ed94234fef4553f3265fa84be90016", + "after": "ad1a7a703638ad96a9226be900a6c0f461ed94234fef4553f3265fa84be90016", + "visual_review": false + } + }, + "assets": { + "file": "private/receipt-composition-9d55107a271b/receipt-workspace-assets.json", + "sha256": "22a514bb9437cce44a04d89101b1d24e0a80969ca81e35b7ee05e78cb34f1dd0", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "private frontend build succeeds", + "served built assets match private build", + "receipt workspace module is served through private static whitelist" + ], + "assets": [ + "assets/app-rwyn9RPO.js", + "assets/app-BLSNCrO7.css" + ], + "visual_review": false + } + }, + "final_source": { + "file": "private/receipt-composition-9d55107a271b/receipt-workspace-final-source.json", + "sha256": "b90e2b2a11bb513916b2345aea696c17b8238ea03f8dd1b21e3439cd2f3ce1d3", + "checks": 1, + "result": { + "passed": true, + "checks": [ + "final warehouse script served identically after deferring catalogue queries until line selection" + ], + "sha256": "10b412a5ec6c973152f165b34caacc685e25bcf2eb0e6ba2f7f7e58df4e1f00a", + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "7ed4b9292e214b11c42af1eae3fb63d967a7e15f026648c957f8a5b54f211f69" + }, + { + "file": "app/Modules/Purchasing/ReceiptCatalogue.php", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348" + }, + { + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + }, + { + "file": "public/receipt-workspace.mjs", + "sha256": "10b412a5ec6c973152f165b34caacc685e25bcf2eb0e6ba2f7f7e58df4e1f00a" + }, + { + "file": "public/supplier-picker-model.mjs", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde" + }, + { + "file": "routes/web.php", + "sha256": "6e3cadafec8b0117d9c346f9558c8ceefb765b676d06280bca6250d0c039ab51" + } + ], + "pinned_native_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "matching_inventory_writer_sources": [ + { + "file": "packages/inventory-write/releases/0.1.0/bootstrap.php", + "sha256": "b6ea8939536008c9277724216df2a968f416d9e7374189587a1172c02ecacb75" + }, + { + "file": "packages/inventory-write/releases/0.1.0/manifest.json", + "sha256": "f0b99e591f9a4df135e685f64ceffad77bed259222debe0f34c20f95e3cad800" + }, + { + "file": "packages/inventory-write/releases/0.1.0/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "new_right_names": [], + "receipt_boundary": { + "eligible_articles": 127, + "server_pages": [ + 25, + 100 + ], + "manual_choice": true, + "explicit_article_fingerprint_rechecked": true, + "receipts": 27, + "quantity_milli": 1000, + "history_fixture_receipts_through_original_writer": 25, + "transport_receipts": 2, + "concurrent_same_key": [ + 200, + 201 + ], + "new_payments": 0, + "new_invoices": 0, + "new_obligations": 0, + "stock_valuation_added": false + }, + "demo": { + "port": 8075, + "entry": "http://127.0.0.1:8075/qa/enter/requester?open=1", + "warehouse": "http://127.0.0.1:8075/qa/enter/validator?open=1", + "initial_main_requests": 0, + "initial_orders": 0, + "initial_receipts": 0, + "initial_movements": 0, + "synthetic_extra_articles": 127, + "locations": 0 + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62" + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396" + }, + { + "file": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "388e738da7e9b3e7f521c8d67f85dd4ef34869c74daf0c04c09067b9fbde5242" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "target_database_connected": false, + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "previous_demo_data_written": false, + "public_rights_changed": false, + "publication": false, + "checkpoint": false + }, + "limitations": [ + "Functional consumable/UN boundary tested. Supply/part filters delegate to native services; this is not a complete new regression of those branches.", + "The unchanged asynchronous choice model reuses its earlier8 checks; it was not re-executed or counted as new tests.", + "Final UI defers catalogue requests until a line is chosen. Its final served source and syntax were checked separately; browser interaction and visual review remain pending.", + "Twenty-five partial receipts are explicit history-volume fixtures through the pinned original writer; only the first and last physical commands exercise the changed HTTP transport.", + "Legacy previews capture explicit item fingerprints server-side. The original writer remains final validator for quantity, quality, unit, bindings and physical effects.", + "Implicit item bindings already authorised in an order remain native authority; this increment creates no new automatic association.", + "New receipts and movements exist only in the regression fixture; the team demo begins empty.", + "No sustained-load capacity or deployment/least-privilege claim follows from127 catalogue records and27 receipts.", + "Current native schema provisioning and frozen runtime retain their earlier deployment compatibility limitations." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/receipt-workspace-flow-20261103.json b/docs/proofs/receipt-workspace-flow-20261103.json new file mode 100644 index 0000000..a175821 --- /dev/null +++ b/docs/proofs/receipt-workspace-flow-20261103.json @@ -0,0 +1,671 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "dd013f318f42bc52bb5cf5dd715948cfc1d2e1f5bda052803702b16b34a55c30", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "7ed4b9292e214b11c42af1eae3fb63d967a7e15f026648c957f8a5b54f211f69", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "75a4d917b300dc9f9c89a8feb90e4ba39829177f946a28fc613612ab4b91a308", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "4bfff0204e67f21a6ddd785d64e7c91bd63bf65742add42fc3aa7f943ab5a6e4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_screen", + "repository": "sgf", + "path": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_screen", + "repository": "sgf", + "path": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_workspace", + "repository": "sgf", + "path": "app/Modules/Purchasing/WorkspaceNavigation.php", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_navigation", + "repository": "sgf", + "path": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_picker", + "repository": "sgf", + "path": "public/supplier-picker-model.mjs", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_search_ui", + "repository": "sgf", + "path": "public/sourcing-workspace.mjs", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/DossierController.php", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_screen", + "repository": "sgf", + "path": "resources/views/purchasing-dossier.blade.php", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_ui", + "repository": "sgf", + "path": "public/purchasing-dossier.mjs", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_catalogue", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptCatalogue.php", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_workspace_ui", + "repository": "sgf", + "path": "public/receipt-workspace.mjs", + "sha256": "10b412a5ec6c973152f165b34caacc685e25bcf2eb0e6ba2f7f7e58df4e1f00a", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/receipt-workspace-matrix-20261103.json b/docs/proofs/receipt-workspace-matrix-20261103.json new file mode 100644 index 0000000..54ec906 --- /dev/null +++ b/docs/proofs/receipt-workspace-matrix-20261103.json @@ -0,0 +1,1926 @@ +{ + "date": "2026-11-03T15:36:28.908Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "dd013f318f42bc52bb5cf5dd715948cfc1d2e1f5bda052803702b16b34a55c30", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "4bfff0204e67f21a6ddd785d64e7c91bd63bf65742add42fc3aa7f943ab5a6e4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_workspace", + "file": "app/Modules/Purchasing/WorkspaceNavigation.php", + "repository": "sgf", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1" + }, + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_navigation", + "file": "resources/views/partials/purchasing-navigation.blade.php", + "repository": "sgf", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_picker", + "file": "public/supplier-picker-model.mjs", + "repository": "sgf", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_search_ui", + "file": "public/sourcing-workspace.mjs", + "repository": "sgf", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "15ed768992dfd8858df65ce7fa41c733906875aec98b1c347169d83571cde52e" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_controller", + "file": "app/Modules/Purchasing/DossierController.php", + "repository": "sgf", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_screen", + "file": "resources/views/purchasing-dossier.blade.php", + "repository": "sgf", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_ui", + "file": "public/purchasing-dossier.mjs", + "repository": "sgf", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-search-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 51 + } + ], + "sha256": "388e738da7e9b3e7f521c8d67f85dd4ef34869c74daf0c04c09067b9fbde5242", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "7ed4b9292e214b11c42af1eae3fb63d967a7e15f026648c957f8a5b54f211f69", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "7ed4b9292e214b11c42af1eae3fb63d967a7e15f026648c957f8a5b54f211f69" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "75a4d917b300dc9f9c89a8feb90e4ba39829177f946a28fc613612ab4b91a308", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_receipt_catalogue", + "file": "app/Modules/Purchasing/ReceiptCatalogue.php", + "repository": "sgf", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_workspace_ui", + "file": "public/receipt-workspace.mjs", + "repository": "sgf", + "sha256": "10b412a5ec6c973152f165b34caacc685e25bcf2eb0e6ba2f7f7e58df4e1f00a", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "f286a99bb0df5c6080e8104d501707e5a9e13046d5dd7144dec32bf0817a92a0" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "10b412a5ec6c973152f165b34caacc685e25bcf2eb0e6ba2f7f7e58df4e1f00a" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-workspace-completion-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "59bb66df5d5e12f898045669a0ad24664c3d09f2d3ab6cf70f4f13d6a34c6548", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_invoice_controller", + "file": "app/Modules/Purchasing/InvoiceController.php", + "repository": "sgf", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_invoice_screen", + "file": "resources/views/supplier-invoice-workspace.blade.php", + "repository": "sgf", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_obligation_controller", + "file": "app/Modules/Purchasing/ObligationController.php", + "repository": "sgf", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_screen", + "file": "resources/views/supplier-obligation-workspace.blade.php", + "repository": "sgf", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 72 + } + ], + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/request-history-composition-20261103.json b/docs/proofs/request-history-composition-20261103.json new file mode 100644 index 0000000..32e864c --- /dev/null +++ b/docs/proofs/request-history-composition-20261103.json @@ -0,0 +1,194 @@ +{ + "date": "2026-11-03T17:52:48.219Z", + "increment": "SGF-REQUEST-HISTORY-CURSOR-QA-v1", + "passed": true, + "functional_code": true, + "checks": 36, + "tests": { + "history": { + "file": "private/receipt-composition-0fe2284727df/request-history-result.json", + "sha256": "afc0cc47ac4b45f6a0479877726c8ee17f8cdda4fe80615652f44515752b18cb", + "checks": 20, + "result": { + "passed": true, + "checks": [ + "request detail reuses first25 events and offers opaque older cursor", + "first cursor page retains exact own-stage order without global count", + "all older pages retain127 original events once despite new head append", + "previous cursor returns the original immediately newer25 events", + "refresh includes new event and supports100-row page", + "100-row traversal exposes remaining28 original records with final cursor absent", + "page-size change cannot reuse prior25-row cursor", + "cursor cannot migrate to another authorised request", + "another authorised reader must start own cursor context", + "invalid cursors and unsupported parameter forms are refused", + "expired cursor requires an explicit fresh consultation", + "current view right is checked again on every history page", + "physical-only role and foreign request cannot read history", + "unmapped unit cannot reuse known request history", + "another active module cannot read purchasing history", + "new session context generation invalidates former cursor", + "fresh consultation restores own-stage history only", + "history preserves draft version/status and pre-existing harness order without stock invoice debt or payment", + "zero request id refuses before database access", + "disabled request-history feature refuses before database access" + ], + "request_id": 5, + "initial_events": 127, + "events_after_append": 128, + "native_audit_fixture_notes": 126, + "main_drafts": 2, + "inherited_harness_order_before_history_request": 1, + "inherited_order_source_setup_removed_for_future_runs": true, + "request_version_unchanged": true, + "successful_prefix_reused": 17, + "guard_database_queries": 0, + "new_right_names": [], + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "ui": { + "file": "private/receipt-composition-0fe2284727df/request-history-ui.json", + "sha256": "95b66c6d6c045b2d8bb4a967b664496f3262680b85a3668d0e20ec4ebeed73ef", + "checks": 10, + "result": { + "passed": true, + "checks": [ + "initial own-stage page is reused without another request", + "older navigation encodes opaque cursor and current size", + "final page exposes only valid newer direction", + "newer direction sends server-issued previous cursor", + "page-size change begins new bounded consultation", + "history refresh preserves separate unsaved request form", + "history component calls read API without a command payload", + "late older response cannot replace newer history response", + "changed record or detached history drops late response", + "expired or refused cursor offers explicit safe refresh" + ], + "dom_simulation": true, + "business_commands": 0, + "visual_review": false + } + }, + "demo": { + "file": "private/receipt-composition-92a2386b386b/request-history-demo.json", + "sha256": "12f62283e255f40deb2909b6e3fd65b7fb0de0e147ddca535d0339f18498e53d", + "checks": 6, + "result": { + "passed": true, + "checks": [ + "fresh demonstration has no main request or history-volume fixtures", + "request workspace remains mounted for original requester right", + "unknown history source grants no access and creates no record", + "served history module matches request-workspace.mjs", + "served history module matches request-history.mjs", + "demonstration probes preserve requests native audit and permission grants" + ], + "before": "2f8a52ec464f18ae27496377e25dd877391c3fe9f5671d2ef6d159400eef60dd", + "after": "2f8a52ec464f18ae27496377e25dd877391c3fe9f5671d2ef6d159400eef60dd", + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/RequestController.php", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca" + }, + { + "file": "app/Modules/Purchasing/ProcessHistory.php", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2" + }, + { + "file": "config/receipt_qa.php", + "sha256": "29ead5efdd92eea6224f9a038b2bfaab44581c1b288f4e8ea74bbab1831738cb" + }, + { + "file": "routes/web.php", + "sha256": "8e8e34551d0b130172fd0f6104db039b4fc7bfbaa051457a89ae1ae3eebd9a33" + }, + { + "file": "public/request-workspace.mjs", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4" + }, + { + "file": "public/request-history.mjs", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e" + } + ], + "pinned_native_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "authority": { + "existing_right": "purchasing_requests.view", + "new_right_names": [], + "own_stage_filter_unchanged": true, + "request_preview_confirmation_blocks_unchanged": true, + "cursor_bound_to_request_actor_context_binding_size": true, + "cursor_lifetime_seconds": 600, + "permission_rechecked_each_page": true + }, + "pagination": { + "implementation": "Laravel cursorPaginate", + "page_sizes": [ + 25, + 100 + ], + "order": "id descending", + "global_count": false, + "initial_page_reused": true, + "all_universe_loaded": false + }, + "regression": { + "initial_events": 127, + "events_after_new_head": 128, + "original_ids_seen_once": true, + "native_fixture_notes": 126, + "notes_are_not_request_versions": true, + "request_version": 1, + "draft_status_preserved": true, + "inherited_order_fixture_before_history_request": 1, + "inherited_source_setup_removed_for_future_runs": true, + "successful_prefix_reused": 17 + }, + "demo": { + "port": 8080, + "entry": "http://127.0.0.1:8080/qa/enter/requester?open=1", + "initial_main_requests": 0, + "initial_history_volume": 0 + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "target_database_connected": false, + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "previous_demo_data_written": false, + "public_rights_changed": false, + "publication": false, + "checkpoint": false + }, + "limitations": [ + "Cursor order follows immutable event sequence, not a guaranteed database snapshot across arbitrary external writers. Refresh starts a new consultation.", + "Ten-minute expiry, changed context, actor or page size require an explicit refresh. Cursor is a read marker, not approval evidence or a business version.", + "Volume consists of126 explicitly marked audit notes plus original draft events; it is not126 operational request revisions.", + "The initial inherited harness also prepared one100MZN order before the history request. It remains preserved; this unnecessary setup was removed for future runs. The preservation suffix was corrected without replaying17 valid checks.", + "UI checks use a simulated DOM; actual API cursor traversal is separately exercised. Browser visual review and accessibility remain pending.", + "No new React/Vite build: changed UI is static ES modules. Served module hashes and syntax are verified; prior valid build proof is retained.", + "Sustained load, deployment compatibility and operational readiness remain separate." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/request-history-flow-20261103.json b/docs/proofs/request-history-flow-20261103.json new file mode 100644 index 0000000..39da23a --- /dev/null +++ b/docs/proofs/request-history-flow-20261103.json @@ -0,0 +1,748 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "796ff47b23ea085af73d3ef8e9691384a19c8863bd7b23b2312c457f742fb9ee", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_screen", + "repository": "sgf", + "path": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_screen", + "repository": "sgf", + "path": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "ce0dc4159d42efcff9e09ec99a2ce5a2d378a215d4a853a37417a0ebf5445506", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_workspace", + "repository": "sgf", + "path": "app/Modules/Purchasing/WorkspaceNavigation.php", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_navigation", + "repository": "sgf", + "path": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_picker", + "repository": "sgf", + "path": "public/supplier-picker-model.mjs", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_search_ui", + "repository": "sgf", + "path": "public/sourcing-workspace.mjs", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/DossierController.php", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_screen", + "repository": "sgf", + "path": "resources/views/purchasing-dossier.blade.php", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_ui", + "repository": "sgf", + "path": "public/purchasing-dossier.mjs", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_catalogue", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptCatalogue.php", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_workspace_ui", + "repository": "sgf", + "path": "public/receipt-workspace.mjs", + "sha256": "86421d30dc9868b10da2153f8bf0b50d9904ab5ccccbf9813464083ae1e20bd2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentsController.php", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_storage", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_ui", + "repository": "sgf", + "path": "public/supplier-documents.mjs", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_process_navigation", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessNavigation.php", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_focus", + "repository": "sgf", + "path": "public/purchasing-focus.mjs", + "sha256": "434319b8de23f5d6892666bd53232d463a0d458fe948cc6d7b476ad1228fafb6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stage_history", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessHistory.php", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_workspace_ui", + "repository": "sgf", + "path": "public/supplier-invoice-workspace.mjs", + "sha256": "f767347371e2dc1573ec29a926509c87bcdea3ec09257a6b22395fc0cf01366f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_workspace_ui", + "repository": "sgf", + "path": "public/supplier-obligation-workspace.mjs", + "sha256": "c2608e3cab7cd1810437a3a978e6f6ccbf2600a83dd0a39bd38510db8249f551", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_history_ui", + "repository": "sgf", + "path": "public/request-history.mjs", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_workspace_ui", + "repository": "sgf", + "path": "public/request-workspace.mjs", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. A subsequent scope fix filters request/sourcing audit events in SQL before limits/counts/pages, closing an alternate downstream financial-history exposure without changing original audit or writers. Empty initial supplier searches now survive middleware normalisation while closed-award and permission guards remain. Completed canonical history book is reused read-only with142 tables/sequences intact. Demo8080 removes the direct request-history25-event cap using bounded cursor pages25/100, own-stage SQL filtering and encrypted request/actor/context/size-bound cursors with600-second lifetime. Initial page is reused; history refresh does not reset unsaved request fields.127 original event ids traverse once despite a new head note; refresh includes128. Audit-volume fixtures are not operational request revisions. An inherited100MZN order setup was preserved and removed from future history harness runs. This is not a persistent MVCC snapshot, visual acceptance, sustained-load or deployment validation." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Demo8079 fixes the actual form-to-picker binding and blank initial article search. DOM-to-real-HTTP proof selects an article, transmits its revision, previews, confirms1UN and recovers a deliberately lost response with201/200, one receipt/movement. This is not browser visual acceptance or a new concurrency/load trial. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/request-history-matrix-20261103.json b/docs/proofs/request-history-matrix-20261103.json new file mode 100644 index 0000000..5da70a9 --- /dev/null +++ b/docs/proofs/request-history-matrix-20261103.json @@ -0,0 +1,2380 @@ +{ + "date": "2026-11-03T17:53:54.719Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "796ff47b23ea085af73d3ef8e9691384a19c8863bd7b23b2312c457f742fb9ee", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "1cb75d7bc03105e0df4211b4470bdc8837f4a659bc65318286228949779d9dc6" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_workspace", + "file": "app/Modules/Purchasing/WorkspaceNavigation.php", + "repository": "sgf", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1" + }, + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_navigation", + "file": "resources/views/partials/purchasing-navigation.blade.php", + "repository": "sgf", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_picker", + "file": "public/supplier-picker-model.mjs", + "repository": "sgf", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_search_ui", + "file": "public/sourcing-workspace.mjs", + "repository": "sgf", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "15ed768992dfd8858df65ce7fa41c733906875aec98b1c347169d83571cde52e" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_controller", + "file": "app/Modules/Purchasing/DossierController.php", + "repository": "sgf", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_screen", + "file": "resources/views/purchasing-dossier.blade.php", + "repository": "sgf", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_ui", + "file": "public/purchasing-dossier.mjs", + "repository": "sgf", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_documents", + "file": "app/Modules/Purchasing/SupplierDocumentsController.php", + "repository": "sgf", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_document_storage", + "file": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "repository": "sgf", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "a8c7fbe18d9ccd6a7e6fd27275e8827ac6a75f4b147ec02b06fabc30a15f29c8" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_document_ui", + "file": "public/supplier-documents.mjs", + "repository": "sgf", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "70e96bc60238efe6bb8a65297f7412fee9abb143dd96805713bb1deafc784820" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_process_navigation", + "file": "app/Modules/Purchasing/ProcessNavigation.php", + "repository": "sgf", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_focus", + "file": "public/purchasing-focus.mjs", + "repository": "sgf", + "sha256": "434319b8de23f5d6892666bd53232d463a0d458fe948cc6d7b476ad1228fafb6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "77a18d186c8ebb5065cf60816b7fd8d11a37fe801296a60f06ff0a6cf590b2e4" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "434319b8de23f5d6892666bd53232d463a0d458fe948cc6d7b476ad1228fafb6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stage_history", + "file": "app/Modules/Purchasing/ProcessHistory.php", + "repository": "sgf", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_history_ui", + "file": "public/request-history.mjs", + "repository": "sgf", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_workspace_ui", + "file": "public/request-workspace.mjs", + "repository": "sgf", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "e878fc3c7bc5ba24aa2b17fe41ffeda3267721b5beb2a1a3a0cb11f56d7dc93d" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "384c67310d2a7adab7a94273bab385dff74af76c293622bb3c0d087245d7e6d8" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-search-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 51 + } + ], + "sha256": "388e738da7e9b3e7f521c8d67f85dd4ef34869c74daf0c04c09067b9fbde5242", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 52 + } + ], + "sha256": "d5709128ee45b7ee1397695b06502b9386dccd13779203c13abbd54281552068", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-history-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 36 + } + ], + "sha256": "564e0fdbc6a7a1142e72dbf835a96dadf0363d3dc963fc4cdc0a40bd05b8c26e", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. A subsequent scope fix filters request/sourcing audit events in SQL before limits/counts/pages, closing an alternate downstream financial-history exposure without changing original audit or writers. Empty initial supplier searches now survive middleware normalisation while closed-award and permission guards remain. Completed canonical history book is reused read-only with142 tables/sequences intact. Demo8080 removes the direct request-history25-event cap using bounded cursor pages25/100, own-stage SQL filtering and encrypted request/actor/context/size-bound cursors with600-second lifetime. Initial page is reused; history refresh does not reset unsaved request fields.127 original event ids traverse once despite a new head note; refresh includes128. Audit-volume fixtures are not operational request revisions. An inherited100MZN order setup was preserved and removed from future history harness runs. This is not a persistent MVCC snapshot, visual acceptance, sustained-load or deployment validation.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "7ed4b9292e214b11c42af1eae3fb63d967a7e15f026648c957f8a5b54f211f69" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "51a0fa060fcce212646cf22332df352d90a5994cb7785eedc789585e02569616" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "40e7db8ac3d47b60f46fb5b8c623dec9ff9716bc9f2e1ea400d0751f0d0cf890" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_catalogue", + "file": "app/Modules/Purchasing/ReceiptCatalogue.php", + "repository": "sgf", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_workspace_ui", + "file": "public/receipt-workspace.mjs", + "repository": "sgf", + "sha256": "86421d30dc9868b10da2153f8bf0b50d9904ab5ccccbf9813464083ae1e20bd2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "f286a99bb0df5c6080e8104d501707e5a9e13046d5dd7144dec32bf0817a92a0" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "10b412a5ec6c973152f165b34caacc685e25bcf2eb0e6ba2f7f7e58df4e1f00a" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "a128926d876ae10eb2a17ec2410ba99282d782f03bb9642cbdcad93d548ce002" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "f0f242538e4131910d612da1f5b22e4955f3bdc58d4c4121d7b1242a5eb52df5" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "86421d30dc9868b10da2153f8bf0b50d9904ab5ccccbf9813464083ae1e20bd2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_documents", + "file": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "repository": "sgf", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-workspace-completion-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "59bb66df5d5e12f898045669a0ad24664c3d09f2d3ab6cf70f4f13d6a34c6548", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 58 + } + ], + "sha256": "b820a6b355450a79c9f244ce8eb6950e7c1cbe4427bf85bca772fb0fc5c085d2", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Demo8079 fixes the actual form-to-picker binding and blank initial article search. DOM-to-real-HTTP proof selects an article, transmits its revision, previews, confirms1UN and recovers a deliberately lost response with201/200, one receipt/movement. This is not browser visual acceptance or a new concurrency/load trial. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_invoice_controller", + "file": "app/Modules/Purchasing/InvoiceController.php", + "repository": "sgf", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_invoice_screen", + "file": "resources/views/supplier-invoice-workspace.blade.php", + "repository": "sgf", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "396cea98bce6c2ccff510efd917e2f336ba29657ea5a8277116c41bd70c92e15" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_workspace_ui", + "file": "public/supplier-invoice-workspace.mjs", + "repository": "sgf", + "sha256": "f767347371e2dc1573ec29a926509c87bcdea3ec09257a6b22395fc0cf01366f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "68671400153a97387f77ad0cddbc0f7f6367caeaebef8fc219d84fc8cf118eb3" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "5f0112c38e805fe9ed2e733053bae77f8dd4e3e1cb6b9cba8e4bc7bb469205d7" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "f767347371e2dc1573ec29a926509c87bcdea3ec09257a6b22395fc0cf01366f" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_obligation_controller", + "file": "app/Modules/Purchasing/ObligationController.php", + "repository": "sgf", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_screen", + "file": "resources/views/supplier-obligation-workspace.blade.php", + "repository": "sgf", + "sha256": "ce0dc4159d42efcff9e09ec99a2ce5a2d378a215d4a853a37417a0ebf5445506", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "cbcef35273b6f54158f60b67f9c2b64c0a93e47cb01ca302b525479ce051e927" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "ce0dc4159d42efcff9e09ec99a2ce5a2d378a215d4a853a37417a0ebf5445506" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_workspace_ui", + "file": "public/supplier-obligation-workspace.mjs", + "repository": "sgf", + "sha256": "c2608e3cab7cd1810437a3a978e6f6ccbf2600a83dd0a39bd38510db8249f551", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "eeb450e38dad72d9c38538ed363202d0a6cfcec466c61171028108f1bc243837" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "8f5154636553130f950d09b46ff917f91250516e10a03e93971cbe537c67f082" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "c2608e3cab7cd1810437a3a978e6f6ccbf2600a83dd0a39bd38510db8249f551" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 72 + } + ], + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/request-home-20261103.json b/docs/proofs/request-home-20261103.json new file mode 100644 index 0000000..ebeec67 --- /dev/null +++ b/docs/proofs/request-home-20261103.json @@ -0,0 +1,15 @@ +{ + "passed": true, + "checks": 6, + "names": [ + "scoped right and capability expose request link", + "absent right hides request link", + "foreign unit right hides request link", + "disabled composition hides request link", + "unit selection is required", + "order and receipt links remain available" + ], + "source": "resources/js/PurchasingHome.jsx", + "sha256": "e9215010b38e5b964a4dbb5588aeb6690793a67bee06074e2b9c186d1e51d62c", + "visual_review": false +} diff --git a/docs/proofs/request-to-receipt-composition-20261103.json b/docs/proofs/request-to-receipt-composition-20261103.json new file mode 100644 index 0000000..065f7b7 --- /dev/null +++ b/docs/proofs/request-to-receipt-composition-20261103.json @@ -0,0 +1,392 @@ +{ + "date": "2026-11-03T11:50:56.769Z", + "increment": "SGF-REQUEST-TO-RECEIPT-QA-v1", + "passed": true, + "functional_code": true, + "checks": 103, + "tests": { + "request": { + "file": "private/receipt-composition-297f4626f01f/request-result.json", + "sha256": "ed8a2f4856f4661aef1698e4b6a6164a6936b87c22a00765e1acc78122585fc8", + "checks": 30, + "result": { + "passed": true, + "checks": [ + "new composition starts with no mapped requests and an explicit cost centre", + "functional request workspace served", + "warehouse cannot prepare or inspect internal request economics", + "foreign company request is refused", + "stale host context is refused", + "procurement cannot impersonate the scoped requesting identity", + "unmapped cost centre cannot be used", + "original draft preview omits temporary identifiers", + "preview leaves request budget notices command receipts and audit unchanged", + "host origin audit failure aborts native draft confirmation", + "native request lines command receipt and audit roll back atomically", + "two workers recover one native requisition after failure", + "one draft and one original line are committed", + "same key with another payload is refused", + "requester edits draft through original lifecycle", + "submission prepared before draft edit is refused", + "submission right is checked again at commit", + "submission reserves and opens the original independent approval", + "repeated submission keeps exactly one reservation", + "requester cannot approve their own request", + "mapped department head can decide current exact request", + "department head approves through the same original service", + "approval repetition records one decision", + "new approved SGF requisition reaches original sourcing without ID rebinding", + "insufficient native budget refuses submission without a reservation", + "original rejection releases only its own reservation", + "rejection replay does not release twice", + "only approved request enters sourcing list", + "request status filter and server page are preserved", + "SGF host budget entries are unchanged across draft submission approval and rejection" + ], + "concurrency_statuses": [ + 200, + 201 + ], + "host_budget_before": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "host_budget_after": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "single_native_reservation": true, + "legacy_ir_not_transferred": true, + "source_ready_without_rebinding": true, + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "integrated_source_to_receipt": { + "file": "private/receipt-composition-297f4626f01f/sourcing-result.json", + "sha256": "2e31bc60819b08b829ab2127db09b6c51ad15418511c256f047a8c744fcc4914", + "checks": 47, + "result": { + "passed": true, + "checks": [ + "source starts with no proposal evaluation or adjudication", + "only mapped approved source request is listed", + "functional sourcing workspace is served", + "warehouse cannot access supplier comparison", + "another tenant process is refused", + "stale SGF context is refused", + "original quotation pricing supplies the preview total", + "preview savepoint commits no proposal evaluation budget or audit records", + "tampered preview is refused", + "failure to record the command receipt fails the confirmation", + "native proposal lines and audit roll back with the command receipt", + "two independent workers recover the same proposal command once", + "concurrent repetition creates one proposal and one line", + "same operation key with other contents is refused", + "explicit proposal registered 2", + "explicit proposal registered 3", + "missing evaluations cannot be bypassed to create an award", + "native evaluation preview available actor/4", + "individual evaluation recorded actor/4", + "native evaluation preview available issuer/4", + "individual evaluation recorded issuer/4", + "native evaluation preview available actor/6", + "individual evaluation recorded actor/6", + "native evaluation preview available issuer/6", + "individual evaluation recorded issuer/6", + "native evaluation preview available actor/8", + "individual evaluation recorded actor/8", + "native evaluation preview available issuer/8", + "individual evaluation recorded issuer/8", + "original comparison identifies eligible top without choosing it", + "another key cannot create a second evaluation by the same person", + "selection right is revalidated at confirmation", + "chosen proposal starts original distinct award approval", + "selection repetition creates no second adjudication", + "proposal window closes after adjudication", + "historical proposal receipt remains recoverable after the window closes", + "award preparer cannot approve their own decision", + "distinct eligible head approves through original workflow", + "approval repetition preserves one recorded decision", + "adjudication created in SGF reaches order workflow without rebinding IDs", + "approved SGF adjudication issues one canonical order", + "warehouse receives the actual order created from SGF sourcing", + "proposal-to-adjudication-to-order-to-receipt path completes", + "complete path leaves exactly the intended business facts", + "one source-budget commitment without invoice payment or consumption", + "full append-only history is paginated on server", + "history pages are distinct and expose older evidence" + ], + "quotes": 3, + "evaluations": 6, + "awards": 1, + "approved_decisions": 1, + "orders": 1, + "receipts": 1, + "movements": 1, + "commit_minor": 10000, + "whole_selected_path_complete": true, + "concurrency_statuses": [ + 200, + 201 + ], + "preview_persistent_fingerprint_unchanged": true, + "rollback_recovery": true, + "original_controllers_and_workflows": true, + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "guards": { + "file": "private/receipt-composition-297f4626f01f/request-guards.json", + "sha256": "ce9f665d2975f9f10f6cced28ec60ddba8496452002a3243fec2ffbde458aa23", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "disabled requests runtime refuses before SQL", + "disabled requests preview refuses before validation or SQL", + "production cannot activate synthetic requests" + ], + "database_queries": 0, + "business_writes": 0 + } + }, + "demonstration": { + "file": "private/receipt-composition-27afd758cfdb/request-demo-smoke.json", + "sha256": "c29fc79a54c27e4fd37a2e1a205daf4f231e4d4a9418140caa79a98f4bcc8ee0", + "checks": 11, + "result": { + "passed": true, + "checks": [ + "main demo begins before any requisition or reservation", + "live request rights match requester", + "request workspace is live", + "creation sentinel is not a readable request", + "live request rights match approver", + "live request rights match actor", + "procurement waits for an actual approved request", + "live request rights match issuer", + "live request rights match validator", + "served request script matches delivered source", + "read-only demonstration smoke changes no business evidence" + ], + "before": "4d3a0344cbde7aedab6d74c4ce143a5fa84561c87151cd1c0c9fd11b10115ba8", + "after": "4d3a0344cbde7aedab6d74c4ce143a5fa84561c87151cd1c0c9fd11b10115ba8", + "visual_review": false + } + }, + "assets": { + "file": "private/receipt-composition-27afd758cfdb/request-demo-assets.json", + "sha256": "11bad90c1facd3322ff2f1e2d91cf5b616da2967eca4febf06de346bc258407a", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "private frontend build succeeds", + "served built assets match private build", + "supplier module is served through private static whitelist" + ], + "assets": [ + "assets/app-j88n39Mi.js", + "assets/app-BLSNCrO7.css" + ], + "visual_review": false + } + }, + "package_freeze": { + "file": "private/receipt-composition-27afd758cfdb/package-freeze.json", + "sha256": "f52fa990a9546a4a46f29ec422bb2d61fd196db1fb6b51b0d968722478f1b05d", + "checks": 3, + "result": { + "passed": true, + "observed_source_manifest": "84824e230a9fd2cd84a0ed36e72ccf0539798bf0503ab812a4c94d932494c05a", + "tested_manifest": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "source_repository_written": false, + "observed_bundle_retained": true, + "tested_bundle_equal": true, + "active_manifest": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "checks": [ + "active native bundle matches tested QA artefact", + "concurrent source snapshot preserved separately without modifying its repository", + "live runtime accepts tested manifest with an unchanged empty request context" + ] + } + }, + "navigation": { + "file": "docs/proofs/request-home-20261103.json", + "sha256": "b3436e6745302e229afc5008bbd1f1660d2f048db46be37e23a4e37721a95498", + "checks": 6, + "result": { + "passed": true, + "checks": 6, + "names": [ + "scoped right and capability expose request link", + "absent right hides request link", + "foreign unit right hides request link", + "disabled composition hides request link", + "unit selection is required", + "order and receipt links remain available" + ], + "source": "resources/js/PurchasingHome.jsx", + "sha256": "e9215010b38e5b964a4dbb5588aeb6690793a67bee06074e2b9c186d1e51d62c", + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/RequestController.php", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + }, + { + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + }, + { + "file": "app/Modules/Purchasing/SourcingController.php", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + }, + { + "file": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + }, + { + "file": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "2c946b782a62e81b3ec637e2f72590ed6a6c0774f04a8082171f9c898d37c2db" + }, + { + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "633933146ae8292f2bbc6da2b52ef8fbb9c820a853d27cf23f2783d3cfb159d6" + }, + { + "file": "config/receipt_qa.php", + "sha256": "c60adb36c7cfade83c155adedf55972b5f4aad1e890a10a8f432a908c23533b4" + }, + { + "file": "routes/web.php", + "sha256": "b759f175730ae1db332cf92463a2d7f0e59343b1160e82f6f3d03fccab7d0841" + }, + { + "file": "app/Shared/Context/ModuleNavigation.php", + "sha256": "f5b78c4e0bbc2d4161631885050ec6bd259d1739c54e9163a84ed2669065e999" + }, + { + "file": "app/Modules/Identity/Services/IdentityWorkflow.php", + "sha256": "cd6b84ae1cffe44dfd253c9e18caf821e96a10506e762c233e170ee53c7b3a0e" + }, + { + "file": "resources/js/PurchasingHome.jsx", + "sha256": "e9215010b38e5b964a4dbb5588aeb6690793a67bee06074e2b9c186d1e51d62c" + }, + { + "file": "resources/views/request-workspace.blade.php", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + }, + { + "file": "public/request-workspace.mjs", + "sha256": "e878fc3c7bc5ba24aa2b17fe41ffeda3267721b5beb2a1a3a0cb11f56d7dc93d" + }, + { + "file": "scripts/order-native-setup.php", + "sha256": "0fc4614badb31412ac03f3a9eaf1b26be8cf690cd84afc003ea29194cc3f3222" + }, + { + "file": "scripts/request-host-setup.php", + "sha256": "9b95453e9d466a13b40542497b709a679cc202814a1961879005e656d489f7c0" + }, + { + "file": "scripts/request-composition-proof.php", + "sha256": "aea435734009eb3def06a5329d049bcc0d9575f5f9cf562ab3e21390e7a7771f" + }, + { + "file": "scripts/request-sourcing-resume.php", + "sha256": "63fd9c6e98c673613879386aa34d081074a66232dc42b73cffd5d562de557f97" + }, + { + "file": "scripts/receipt-composition-run.mjs", + "sha256": "597d161b218021c29bc56bfade7fe923e34e6f1baaca45dfbba6772a832dd218" + }, + { + "file": "scripts/receipt-composition-http.php", + "sha256": "bb17873b09836391eb25fed19195a3020ebffdfe06723e5b34c1184180e5e4b7" + }, + { + "file": "scripts/sourcing-composition-proof.php", + "sha256": "4fbe575f9b0e4f80d969f0bb8e5a2b2dd1c52732e43dbdddb87990432a8d5a04" + } + ], + "pinned_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "single_authority": { + "native_request_id_preserved": true, + "native_reservation_once": true, + "native_commitment_once": true, + "host_budget_unchanged": true, + "legacy_ir_transferred": false + }, + "demo": { + "url": "http://127.0.0.1:8068/qa/enter/requester?open=1", + "approver_url": "http://127.0.0.1:8068/qa/enter/approver?open=1", + "buyer_url": "http://127.0.0.1:8068/qa/enter/actor?open=1", + "finance_url": "http://127.0.0.1:8068/qa/enter/issuer?open=1", + "warehouse_url": "http://127.0.0.1:8068/qa/enter/validator?open=1", + "initial_main_requests": 0, + "initial_main_reserved_minor": 0, + "initial_main_committed_minor": 0 + }, + "qa_rights": [ + "purchasing_requests.view", + "purchasing_requests.prepare", + "purchasing_requests.submit", + "purchasing_requests.approve" + ], + "prior_proofs_preserved": [ + { + "file": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841" + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191" + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3" + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "diagnostics": { + "initial_test_host_table_name_corrected": "cb_budget_entries; initial error before commands", + "dependent_runner_now_requires_completed_request_proof": true, + "source_approval_replay_test_corrected_to_actual_department_head": true, + "source_first37_valid_checks_retained": true, + "remaining10_source_checks_resumed": true, + "replay_probe": "QA encrypted envelope reconstructed from the exact historical decision receipt; no workflow decision repeated" + }, + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "real_rights_changed": false, + "target_database_connected": false, + "previous_demo_data_written": false, + "destination_activated": false, + "publication": false, + "checkpoint": false + }, + "limitations": [ + "This delivers new requisitions through the SGF interface on the same native book; it does not migrate previously reserved SGF ir_requests.", + "Fresh synthetic identities for requester, department head, buyer, finance and warehouse. Native approvals/budget rules remain authoritative; no real grants or configuration.", + "Selected QA path100MZN, three proposals and original source-to-receipt workflow. Equipment/technical catalogues, formal regimes and later corrections are not declared complete.", + "Read/history workspace exposes recent25 request events; full native history remains retained.", + "Rollback-only previews may consume sequence values; no external notification channel is used.", + "No visual review, sustained-load or deployment-capacity validation." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/requisition-composition-20261103.json b/docs/proofs/requisition-composition-20261103.json new file mode 100644 index 0000000..e3bbaff --- /dev/null +++ b/docs/proofs/requisition-composition-20261103.json @@ -0,0 +1,214 @@ +{ + "date": "2026-11-03T07:16:26.513Z", + "increment": "SGF-REQUISITION-COMPOSITION-QA-v1", + "functional_code": true, + "passed": true, + "checks": 50, + "tests": { + "workflow": { + "file": "private/requisition-composition-63b7b6590748/result.json", + "sha256": "c18fd232ee22e9bf9861c6b68a4f7acb475eddefc0894daa07b170ccf4ba15c5", + "checks": 17, + "result": { + "passed": true, + "checks": [ + "new database; provider mount performed no migration", + "provider mounts one canonical list route", + "default off does not mount", + "configure through provider routes", + "canonical workflow screen available", + "create through shared adapter", + "create replay no duplicate", + "submit reserves common budget", + "submission replay reserves once", + "distinct approval retained", + "independent approval through mounted routes", + "approval replay no duplicate", + "stale version refused", + "read context token revalidated", + "foreign active module refused", + "revoked read permission refused", + "one request and single100MZN reserve; no automatic consumption" + ], + "requests": 1, + "reservations": 1, + "reservation_minor": 10000, + "actual_http": true, + "new_qa_database": true, + "existing_shared_core": true, + "destination_activation": false, + "visual_review": false + } + }, + "guards": { + "file": "private/requisition-composition-63b7b6590748/security-final.json", + "sha256": "87df26cc3ce243ece10f11e126ceabb3862095f7a892091dc9fae4874262728e", + "checks": 16, + "result": { + "passed": true, + "checks": [ + "disabled mount returns without database connection", + "disabled provider registers no requisition routes", + "production environment refused before connection", + "non-loopback target refused before connection", + "disabled and invalid configurations executed zero SQL", + "invalid port refused before connection", + "invalid username refused before connection", + "invalid url refused before connection", + "invalid search_path refused before connection", + "all invalid connection boundaries executed zero SQL", + "exact bundle verified", + "wrong manifest pin refused", + "missing bundle refused", + "altered core refused before execution", + "incomplete route contract refused", + "path traversal contract refused" + ], + "sql_queries": 0, + "application_commands": 0 + } + }, + "navigation": { + "file": "private/requisition-composition-63b7b6590748/navigation-final.json", + "sha256": "f6e4f883e236a72bdf6a2b771976b7e3fc5a13693a44d23ef01dfd0260d387d5", + "checks": 11, + "result": { + "passed": true, + "checks": [ + "navigation QA entry 1", + "server capability matches mounted composition 1", + "screen mounted only in enabled QA 1", + "canonical screen returns to SGF navigation", + "current reviewer reads after UI integration", + "mounted mutation keeps CSRF", + "mounted API refuses anonymous session", + "navigation QA entry 0", + "server capability matches mounted composition 0", + "screen mounted only in enabled QA 0", + "navigation and default-off probes preserve business and rights fingerprints" + ], + "actual_http": true, + "business_and_rights_fingerprint_unchanged": true, + "visual_review": false + } + }, + "ui": { + "file": "docs/proofs/requisition-home-20261103.json", + "sha256": "25db2c36df40dae317e7950ae3259accac91255e4aa1139c000056c8fc9e8f57", + "checks": 6, + "result": { + "passed": true, + "checks": 6, + "react_static_render": true, + "actual_browser": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + }, + { + "file": "config/internal_requisitions.php", + "sha256": "51e4cbc3e921165cdc2ad45adef22eda2e9334826ba302e4203e5cf8503885ae" + }, + { + "file": "app/Providers/AppServiceProvider.php", + "sha256": "4034560e5c921f44bfbd5618ef34d1e2f22d326b29419503dcfec91e30fd91f8" + }, + { + "file": "app/Shared/Context/ModuleNavigation.php", + "sha256": "e759b306b688a728d0f916f3d08bdba9be66ff975a6f8bb00b05dc545d180866" + }, + { + "file": "app/Modules/Identity/Services/IdentityWorkflow.php", + "sha256": "443691c252079702e2059b113b0c1e881f9df90eaeae31233b587ae3cad52672" + }, + { + "file": "app/Modules/Identity/Http/RequireCompanyContext.php", + "sha256": "f68c819dc015fdb0d0605ead989defe98befc56eb1fe58ac2ac1b3ee0222612b" + }, + { + "file": "resources/js/PurchasingHome.jsx", + "sha256": "738c0ee8cec2fc30139b85c172fef75c8153948a75786cc868e7416522f13c16" + }, + { + "file": "../compras/packages/purchasing/src/RequisitionPort.php", + "sha256": "46aa5f793a3f6abf7ed3561e337f3bbe7b6a63b1c25a37e230ad4e76a3492814" + }, + { + "file": "../compras/packages/purchasing/src/RequisitionFailure.php", + "sha256": "72d199f2d2d42a5a40ea9b6afc9fb15f5a7c9f1253adca5d00e9037565ed54d3" + }, + { + "file": "../compras/packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + }, + { + "file": "../compras/integrations/sgf/internal-requisitions/bootstrap.php", + "sha256": "2f40340d53406bd0b7beeb1a25cf2c32d94c80463df6dbe6e17640a5d77630fc" + }, + { + "file": "../compras/integrations/sgf/internal-requisitions/Schema.php", + "sha256": "af3cfeb011dafc5d9dc5486ab1b5e29c87f29436f8e07e8ba1f63c5f4a2deec6" + }, + { + "file": "../compras/integrations/sgf/internal-requisitions/Port.php", + "sha256": "700362c2da9728632985975f7ff5147fc41bc6b29b166adbe72d1ebaa3023c1e" + }, + { + "file": "../compras/integrations/sgf/internal-requisitions/Controller.php", + "sha256": "293f2356a56004999feed930714147fc657b804b787c95cf44e8cf1487745634" + }, + { + "file": "../compras/integrations/sgf/internal-requisitions/routes.php", + "sha256": "26fd9d26cb0338cbeeb17c7a71303b3cc2c2976a7930622453a6d4f43b0fe257" + }, + { + "file": "../compras/integrations/sgf/internal-requisitions/screen.php", + "sha256": "02485900f52cab568ccba9b018cd32efa1387bac54e0ca9503e145a954288109" + }, + { + "file": "../compras/integrations/sgf/internal-requisitions/screen.mjs", + "sha256": "04a0c0e1f96c9f54fedfc7e8394a7fb908a4971c3e84020da1627466abea0074" + } + ], + "bundle_manifest_sha256": "e9758e86ebe9ade11d88260d8d5459c8196e4ae16f9ee56ae91c1eb4c7c37a31", + "shared_source_matches_current8039_bundle": true, + "installed_purchasing_pointer": { + "version": "0.1.1", + "sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787" + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373" + }, + { + "file": "docs/proofs/module-matrix-audit-complete-20261103.json", + "sha256": "59d90b7eb3b64fb14f15bdadffed3112de7b3e0ccd576f3207fb6a34a7a5c0db" + }, + { + "file": "docs/proofs/sgf-demo-8039-reconciliation.json", + "sha256": "948ecdb75b1bba9199634856fb2e9802069f3f2226e0e4894244542653fe8307" + } + ], + "limitations": [ + "Only the isolated budget-testing composition is mounted; normal destination remains disabled.", + "One selected lifecycle, not a repeated full procurement or cross-company regression.", + "The QA runtime role owns its new database; owner/runtime deployment separation is not validated.", + "No visual review, sustained load or deployment capacity validated.", + "Receipt preparation/confirmation in SGF remains pending." + ], + "preservation": { + "existing_databases_migrated": false, + "existing_demos_written": false, + "protected_six_records_written": false, + "blocked_cache_cleared": false, + "real_or_public_rights_changed": false, + "purchasing_candidate_activated_at_destination": false, + "publication": false, + "checkpoint": false + } +} \ No newline at end of file diff --git a/docs/proofs/requisition-home-20261103.json b/docs/proofs/requisition-home-20261103.json new file mode 100644 index 0000000..68fc5b9 --- /dev/null +++ b/docs/proofs/requisition-home-20261103.json @@ -0,0 +1,6 @@ +{ + "passed": true, + "checks": 6, + "react_static_render": true, + "actual_browser": false +} \ No newline at end of file diff --git a/docs/proofs/sgf-financial-ledger-flow-20261102.json b/docs/proofs/sgf-financial-ledger-flow-20261102.json new file mode 100644 index 0000000..e6d048b --- /dev/null +++ b/docs/proofs/sgf-financial-ledger-flow-20261102.json @@ -0,0 +1,226 @@ +{ + "increment": "SGF-PAYABLE-LEDGER-FLOW-SIM-v1", + "date": "2026-11-02", + "synthetic_only": true, + "actual_functional_code": true, + "tests": { + "http": { + "passed": true, + "checks": 46, + "tag": "0beaac7382b0", + "source_id": 2, + "financial_proposal_id": 1, + "obligation_id": 1, + "ledger_proposal_id": 1, + "journal_id": 1, + "principal_minor": 6000, + "balance_minor": 6000, + "debit_minor": 6000, + "credit_minor": 6000, + "actual_http_kernel": true, + "existing_context_selection": true, + "complete_financial_to_ledger_chain": true, + "live_purchasing_source": false, + "visual_review": false + }, + "isolation": { + "passed": true, + "checks": 20, + "coherent_read": { + "isolation": "read committed", + "read_only": "off" + }, + "flow_query_count": 313, + "scope_refusals": [ + "tenant", + "company", + "unit" + ], + "revoked_rights_refused": true, + "mutating_probes_rolled_back": true, + "one_obligation_one_journal": true, + "six_qa_grants": true, + "default_enabled": false + }, + "two_effect_focus": { + "passed": true, + "checks": 11, + "two_independent_effects_tested": true, + "all_evidence_kinds_scoped": true, + "empty_page_tested": true, + "second_effect_rolled_back": true + }, + "team_readiness": { + "passed": true, + "checks": 22, + "url": "http://127.0.0.1:8049/qa/ledger-demo", + "tag": "c24bf87a54fd", + "financial_obligations": 0, + "financial_proposals": 0, + "ledger_proposals": 0, + "journals": 0, + "roles": 3, + "no_business_commands": true, + "visual_review": false, + "browser_automation": false, + "cookie_isolated": true + }, + "total_new_checks": 99, + "previous_suites_reused_not_rerun": true, + "syntax": { + "php_files": 10, + "javascript_files": 4 + } + }, + "evidence": [ + { + "file": "private/ledger-0beaac7382b0/ledger-flow-http.json", + "sha256": "e5ddc0e9f6af4547d01634456d14526724720ba10ee62cc7375c53f0890ac58f" + }, + { + "file": "private/ledger-0beaac7382b0/ledger-flow-cases.json", + "sha256": "7d7b7376437eac056df6f2e6b92f4f738cfca8e70285e32f9d20f5fa9a2da877" + }, + { + "file": "private/ledger-0beaac7382b0/ledger-flow-focus-cases.json", + "sha256": "e5e4334b91cb3a8960790e151980823a056511eba3c39b0d539ee5d1b7b19a1d" + }, + { + "file": "private/ledger-c24bf87a54fd/ledger-flow-demo-http.json", + "sha256": "6f4d18fe5010ac7dae75bad9211adb627db782a4890480ada2135c488248f3a7" + } + ], + "previous_proofs": [ + { + "file": "docs/proofs/common-ledger-payable-20261102.json", + "sha256": "330b4b15ad952d014a828d17ec810a65c4a724d64cf91fd04807e7f37f4ab44b" + }, + { + "file": "docs/proofs/sgf-payable-paged-read-20261102.json", + "sha256": "98ddb85c4819ad6e071ab69df3a19244c04e71c0d2e17539eac3c41a2d155b0b" + }, + { + "file": "docs/proofs/sgf-payable-report-20261102.json", + "sha256": "d16770a76e673972ad28dadbf5c911cd94fb867b120d51edc8a3995cdc3301dd" + }, + { + "file": "docs/proofs/sgf-settlement-read-isolation-20261102.json", + "sha256": "c83e1857931558aed6249d3acf75f08fa819fb9e35e88080abe7bddbfb3af248" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "previous_ledger_artifact_hashes_verified": 10, + "sources": [ + { + "file": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "d815eac01e922fff4d633705adc7baf01a30e1750509ec7dd8acf4fb7601e860" + }, + { + "file": "app/Modules/Accounting/GeneralLedgerController.php", + "sha256": "4ed184dfcac1af120118443135484dc00b2a2e23896acb6e269ec690de288611" + }, + { + "file": "app/Modules/Purchasing/SupplierPayablesController.php", + "sha256": "5b87561245c2fdd73ab3be570cf6b1a86b58c3fdcc1e70366413afb7c17be00f" + }, + { + "file": "packages/general-ledger/src/PayableJournal.php", + "sha256": "e89c7b6fb25c1c5519a440edd57174e7da29c3cbad1aafbd43d4a3a14fb961de" + }, + { + "file": "packages/payables/ui/page.php", + "sha256": "c78a43371b14e1530b744fae2fb91787547c8568de7425c6643f73c127b347ca" + }, + { + "file": "routes/web.php", + "sha256": "6ad06b38dcdc91cf75b5888f61aa3997eefc79d1c3f1c2a36848e19da5eff082" + }, + { + "file": "resources/views/accounting/general-ledger.blade.php", + "sha256": "0b95b9c5e6f265f45371252cee5023ac0ddbfc226dd960ac14b885a53ccf4df4" + }, + { + "file": "resources/views/accounting/payable-flow.blade.php", + "sha256": "6a9a54fac813368757181c35b24d9a5d4f77edcdf77d12122ff4aa0581639948" + }, + { + "file": "resources/views/accounting/payable-flow-entry.blade.php", + "sha256": "f741197f5ca0b3813009e3df21da2e9f8e228842f020e6b62cc8752ef51854d6" + }, + { + "file": "scripts/ledger-proof.php", + "sha256": "28fa7fae603a99186de61143b99030cc3b8d2eecf4a329cc5b77611dd4604063" + }, + { + "file": "scripts/ledger-run.mjs", + "sha256": "c4f51680c336bde11b27c12b92899a0e85cbec5de053f07eea4e9d5702c71c5c" + }, + { + "file": "scripts/ledger-http-entry.php", + "sha256": "f2e56d1b07df8573c83ce65b4dde6190dbe2d21174c5e7b34dee7a6417e0c244" + }, + { + "file": "scripts/ledger-flow-http.mjs", + "sha256": "4449ef8ad2dad7c1329c00b763a5655ca5c0bb5d66b60def9892cb8566f8c204" + }, + { + "file": "scripts/ledger-flow-cases.php", + "sha256": "d407a7b6c3b9b326e3f1c667cec51e5ac63f237b146f8fa664ec639664c1979a" + }, + { + "file": "scripts/ledger-flow-focus-cases.php", + "sha256": "2ef84d69f9be673fecc18519259e039c5bf95c21016bac2c1975ac1286946924" + }, + { + "file": "scripts/ledger-flow-demo-check.mjs", + "sha256": "51fe807d26f926c26d044ef9f6fc649c85525c6b1c80547895b2e8ad86c88409" + }, + { + "file": "scripts/summarize-ledger-flow.mjs", + "sha256": "982790fea515d5d144ebd3da773d1e5595cc1437115c6028cec7d2ececfac9da" + }, + { + "file": "docs/SGF_FINANCIAL_LEDGER_FLOW_DELIVERY.md", + "sha256": "4350c41165effbf12486c8f03f5b4b34e1de6b4ea0dc143597752b737fba4c97" + }, + { + "file": "docs/GENERAL_LEDGER_COMPLETE_SYNTHETIC_SCOPE.md", + "sha256": "e4c96d815cb4c923f7e86d74d8ea20297ec129f64adbf4d1c927647cfe2f98b4" + } + ], + "team_demo": { + "tag": "c24bf87a54fd", + "pid": 4828, + "url": "http://127.0.0.1:8049/qa/ledger-demo", + "loopback_only": true, + "cookie": "sgf_ledger_c24bf87a54fd", + "new_isolated_team_fixture": true, + "existing_demos_untouched": true, + "starts_before_recognition": true, + "regression_database_separate": true + }, + "limits": { + "live_purchasing_source": false, + "complete_erp": false, + "payment_accounting": false, + "journal_correction": false, + "period_closing": false, + "native_ledger_adapter": false, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "new_performance_measurements": false + }, + "preservation": { + "six_pending_associations_untouched": true, + "blocked_cache_not_cleared": true, + "existing_demos_preserved": true, + "real_rights_changed": false, + "operational_migrations": false, + "purchasing_activation": false, + "publication": false, + "checkpoint": false + } +} diff --git a/docs/proofs/sgf-payable-evidence-focus-20261102.json b/docs/proofs/sgf-payable-evidence-focus-20261102.json new file mode 100644 index 0000000..38bb5f1 --- /dev/null +++ b/docs/proofs/sgf-payable-evidence-focus-20261102.json @@ -0,0 +1,162 @@ +{ + "increment": "SGF-PAYABLE-EVIDENCE-FOCUS-SIM-v1", + "date": "2026-11-02", + "synthetic_only": true, + "cases": { + "increment": "SGF-PAYABLE-EVIDENCE-FOCUS-SIM-v1", + "passed": true, + "cases": [ + { + "name": "original-source-outside-first-page-has-own-evidence", + "assertions": 6, + "passed": true + }, + { + "name": "focus-survives-independent-evidence-pagination", + "assertions": 7, + "passed": true + }, + { + "name": "combined-filters-remain-intersections", + "assertions": 6, + "passed": true + }, + { + "name": "foreign-source-identities-and-invalid-input-refused", + "assertions": 11, + "passed": true + }, + { + "name": "current-source-integrity-and-command-revalidation", + "assertions": 3, + "passed": true + } + ], + "assertions": 34, + "financial_rows_preserved": true, + "rollback_only_test_rows": true, + "before_after_fingerprint": "912b25c2e52cba14962334f05044f94c65e9c8a10a719155ec4c18f5cafe8d08", + "visual_review": false + }, + "integration": { + "passed": true, + "assertions": 18, + "bounded_obligation_selection": true, + "exact_recognition_proposal": true, + "source_focus_bidirectional": true, + "no_payment_or_allocation": true, + "schema_and_test_rows_rolled_back": true, + "payment_history_pagination_implemented": false + }, + "http": { + "increment": "SGF-PAYABLE-EVIDENCE-FOCUS-SIM-v1", + "passed": true, + "checks": 20, + "real_http_kernel": true, + "read_only_actor": true, + "visual_review": false, + "browser_interactions_tested": false + }, + "preservation": { + "passed": true, + "read_only": true, + "previous_scoped_business_fingerprint_equal": true, + "scoped_business_fingerprint": "c9e93019653c35b8c1685a58ab2b68e8b279572044355895abc9360790707c68", + "temporary_settlement_schema_absent": true, + "history_default_disabled": true, + "previous_post_proof_sha256": "4165000a52cda0e94759e3d2ff92095d29e1d4d75e5cd8e63b5f8a84eb6e5432" + }, + "sources": [ + { + "file": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "e1ac4926a5d024777b39f4e5e6cc060a4be48f5323141fc1af486a1e47eb5578" + }, + { + "file": "app/Modules/Purchasing/SupplierPayablesController.php", + "sha256": "521f8d79639700b305ae4b86fb91360620e37b572e8c05467d727790e231f80f" + }, + { + "file": "app/Modules/Purchasing/SupplierPaymentsController.php", + "sha256": "d4030997c755abaf24fba6b48f4debd94af3c722ad2e79e568321d00bbdecb6a" + }, + { + "file": "packages/payables/src/SettlementHttp.php", + "sha256": "961e9ee67f097f77f4c6efe2558931baace626b407166a299446e433d196c34c" + }, + { + "file": "packages/payables/ui/page.php", + "sha256": "67af4051aff7bd9f9a528eeb8a241cab247418b129b5a36b28f30c19c6cee219" + }, + { + "file": "packages/payables/ui/settlements.php", + "sha256": "3ae0ecf2593bdfbb4e55fa20668fbf432f88c03fcd7d7203d21e33fe12265378" + }, + { + "file": "scripts/payable-history-sgf-proof.php", + "sha256": "be31498290e76a4a90b7a0108a42873aca1f15279bc379a6aaeaf240e41fdbdc" + }, + { + "file": "scripts/payable-evidence-cases.php", + "sha256": "0f63cc32dd8f01cb41e65f56da5e96bc243e70b3c5e9fe2e07ad74727fed3cbf" + }, + { + "file": "scripts/payable-evidence-settlements.php", + "sha256": "ad281e180f8ea86361e0cfbd491cf294eebe5e0876f83f10bacd1c2c73537e17" + }, + { + "file": "scripts/payable-evidence-http.mjs", + "sha256": "33b480a3f61c975c4fc52d50b372d1ed692a5116afb2af077b1519d173ab85da" + }, + { + "file": "scripts/payable-evidence-post.php", + "sha256": "073ee951d9eaf76afdf23451707f549c6b9f0ff1d4311b1cde1a94ecb5a59adb" + }, + { + "file": "scripts/summarize-payable-evidence.mjs", + "sha256": "42c04f0405c141c8a822ea077a4596f2224a05ffb266addaa9eb15239138b776" + } + ], + "prior_proofs_preserved": [ + { + "file": "docs/proofs/sgf-payable-paged-read-20261102.json", + "sha256": "98ddb85c4819ad6e071ab69df3a19244c04e71c0d2e17539eac3c41a2d155b0b" + }, + { + "file": "docs/proofs/native-payable-paged-read-20261102.json", + "sha256": "1b5a90831d6556cf5bafa620650cfd3bb1437141a464d4d96b4221530563e657" + }, + { + "file": "docs/proofs/module-association-http-lock-summary-20261102.json", + "sha256": "67547007f8f9df853639751983c5a6fd0841044cb0e04a7628db04c4b67692c6" + } + ], + "evidence": [ + { + "file": "private/payable-history-03e16d9fb37d/evidence-cases.json", + "sha256": "9866b422fb00b83dccfff3f47e540b66237cf6188870b2eed50cd6cfb6345751" + }, + { + "file": "private/payable-history-03e16d9fb37d/evidence-settlements.json", + "sha256": "a43beafe137116dd64fe5ae70d4df75e079b0c0d037f65ca6333b94df3b4c253" + }, + { + "file": "private/payable-history-03e16d9fb37d/evidence-http.json", + "sha256": "35a07ed4d29fff081b69664788c726009d77702fe653a44c1bb775736bdc0e68" + }, + { + "file": "private/payable-history-03e16d9fb37d/evidence-post.json", + "sha256": "b548c50387d950af84e36415391fedd7242bd5a67ce5b2cc6e8b16be9eb2b708" + } + ], + "limits": [ + "Source means the SGF local receipt mapping, not a native invoice ID or a cross-application ID match.", + "Financial origins remain synthetic historical receipts; no live SGF provenance authentication or financial-responsibility cutover.", + "Obligation selection follows server-paged documents; payment/allocation history retains its existing full scoped listing and writer authorization.", + "No new payment or allocation execution, native package activation, operational migration, rights, index, publication or checkpoint.", + "Existing load evidence reused without new throughput or deployment-capacity claims." + ], + "six_pending_associations_untouched": true, + "blocked_cache_untouched": true, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/sgf-payable-paged-read-20261102.json b/docs/proofs/sgf-payable-paged-read-20261102.json new file mode 100644 index 0000000..c135497 --- /dev/null +++ b/docs/proofs/sgf-payable-paged-read-20261102.json @@ -0,0 +1,546 @@ +{ + "date": "2026-11-02", + "increment": "SGF-PAYABLE-PAGED-READ-SIM-v1", + "status": "local_synthetic_implementation", + "verification": { + "sgf_existing_history_scenarios": 10, + "sgf_existing_history_assertions": 56, + "sgf_new_page_scenarios": 8, + "sgf_new_page_assertions": 34, + "native_distinct_compatibility_tests": 21, + "native_assertions": 144, + "actual_paging_http_checks": 24 + }, + "comparisons": [ + { + "volume": 1000, + "page_size": 25, + "before": { + "time_ms": 22202.595, + "queries": 25028, + "php_heap_peak_bytes": 44040192, + "php_heap_extra_peak_bytes": 18874368, + "documents_returned": 1000 + }, + "after": { + "time_ms": 69.703, + "queries": 67, + "php_heap_peak_bytes": 25165824, + "php_heap_extra_peak_bytes": 0, + "documents_returned": 25 + }, + "financial_position_fingerprint": "6ef1a9ed8a089b659b3d522144a54216a576c014be28597d5dc85f79c1227fa8", + "source_hashes": { + "legacy": "c4942438d00d3ad54c10747a5c3c0a91108872d98a2981f558f4b81a2d584c47", + "current": "22522c83c53597ed6ee15acbdd808c571aa16b09e361970d6ec43a0ee08626ef" + } + }, + { + "volume": 1000, + "page_size": 100, + "before": { + "time_ms": 22202.595, + "queries": 25028, + "php_heap_peak_bytes": 44040192, + "php_heap_extra_peak_bytes": 18874368, + "documents_returned": 1000 + }, + "after": { + "time_ms": 123.932, + "queries": 67, + "php_heap_peak_bytes": 29360128, + "php_heap_extra_peak_bytes": 4194304, + "documents_returned": 100 + }, + "financial_position_fingerprint": "b774df859c22d78f09fb6d21c3258d192c7c1d9e4b3c032ded6c17d5646a97ec", + "source_hashes": { + "legacy": "c4942438d00d3ad54c10747a5c3c0a91108872d98a2981f558f4b81a2d584c47", + "current": "e2327efdc27a17aadceffd65aa1dc5515c71fd05d60311cb1ac1d064b05995b7" + } + }, + { + "volume": 5000, + "page_size": 25, + "before": { + "time_ms": 115270.184, + "queries": 125028, + "php_heap_peak_bytes": 92274688, + "php_heap_extra_peak_bytes": 67108864, + "documents_returned": 5000 + }, + "after": { + "time_ms": 91.876, + "queries": 67, + "php_heap_peak_bytes": 25165824, + "php_heap_extra_peak_bytes": 0, + "documents_returned": 25 + }, + "financial_position_fingerprint": "0162d638b4507c8a390574a1e00661e06d0511838a27f00ee2c658be6c441089", + "source_hashes": { + "legacy": "cf6ed127faa805416c371ee988323a2b440a5099ff97934f4656e8e3532d1994", + "current": "00ba79f4f3b88d399502d2dd9275aec2d3b4158a13236100bc722fd4bc4bd57a" + } + }, + { + "volume": 5000, + "page_size": 100, + "before": { + "time_ms": 115270.184, + "queries": 125028, + "php_heap_peak_bytes": 92274688, + "php_heap_extra_peak_bytes": 67108864, + "documents_returned": 5000 + }, + "after": { + "time_ms": 151.659, + "queries": 67, + "php_heap_peak_bytes": 29360128, + "php_heap_extra_peak_bytes": 4194304, + "documents_returned": 100 + }, + "financial_position_fingerprint": "b7879b6071a874b7df588dbd5cb203608a86d01196f1d6400f8afb77b962489b", + "source_hashes": { + "legacy": "cf6ed127faa805416c371ee988323a2b440a5099ff97934f4656e8e3532d1994", + "current": "a990995c877559bd0729a46192da5fe87f6dfd8f6a7b03e2bee9df615f11a081" + } + }, + { + "volume": 10000, + "page_size": 25, + "before": { + "time_ms": 338498.531, + "queries": 250028, + "php_heap_peak_bytes": 153092096, + "php_heap_extra_peak_bytes": 127926272, + "documents_returned": 10000 + }, + "after": { + "time_ms": 139.625, + "queries": 67, + "php_heap_peak_bytes": 25165824, + "php_heap_extra_peak_bytes": 0, + "documents_returned": 25 + }, + "financial_position_fingerprint": "ddf692c62109fd5662cc98b89c9c14c80d151f279c7f0e9f3afcd0bf391e661d", + "source_hashes": { + "legacy": "5427b63fcb4286725a770da737c1f53910f3cd53e8d8b41cf9c6431985ad0405", + "current": "83ba2607c8193dc8b5252d69032fa0a1b6792f4aaf80df62d971c1c2be185da4" + } + }, + { + "volume": 10000, + "page_size": 100, + "before": { + "time_ms": 338498.531, + "queries": 250028, + "php_heap_peak_bytes": 153092096, + "php_heap_extra_peak_bytes": 127926272, + "documents_returned": 10000 + }, + "after": { + "time_ms": 166.93, + "queries": 67, + "php_heap_peak_bytes": 29360128, + "php_heap_extra_peak_bytes": 4194304, + "documents_returned": 100 + }, + "financial_position_fingerprint": "e8cad59487196e0e140a9b633b36ea716b5ebc8aa22c9faf14ffe409f04153f8", + "source_hashes": { + "legacy": "5427b63fcb4286725a770da737c1f53910f3cd53e8d8b41cf9c6431985ad0405", + "current": "f7a25e24c38b0f56d7a141aaccd513a4be37ac38c071b963a6653184064d8566" + } + } + ], + "measurement_conditions": { + "php": "8.4.27", + "memory_limit": "512M", + "same_owned_database_per_volume": true, + "independent_php_process_per_strategy": true, + "warmup": "Same bounded source search in every worker; database seeded/warm; no cache flush. Legacy runs first, followed by page25/page100.", + "samples_per_strategy": 1, + "legacy_measurement_reused_for_both_page_sizes": true, + "legacy_baseline": "Existing integral core listing plus original scoped source callbacks; includes all document/evidence rows. Does not include the old adapter post-listing permission flags. New measurement includes the full paged SGF adapter.", + "memory": "PHP allocated heap peak in independent workers, including 24 MiB framework baseline. Extra zero means reuse of existing allocation, not zero memory use. Not OS RSS.", + "index_experiments_performed": false, + "indices_added_or_removed": false, + "gain_attribution": "Combined bounded pagination, batch dependent reads and removal of writer locks from reads; not an isolated estimate for each technique. No index gain claimed.", + "no_deployment_capacity_claim": true + }, + "functional_pages": { + "kind": "financial_page_regression", + "cases": [ + { + "name": "stable-source-window-and-independent-evidence-pages", + "assertions": 8, + "passed": true + }, + { + "name": "filters-before-pagination-and-literal-search", + "assertions": 7, + "passed": true + }, + { + "name": "full-position-parity-with-original-reader", + "assertions": 3, + "passed": true + }, + { + "name": "batch-queries-do-not-grow-with-the-page", + "assertions": 5, + "passed": true + }, + { + "name": "tenant-company-unit-isolation-and-access-revocation", + "assertions": 3, + "passed": true + }, + { + "name": "receipt-changes-do-not-reuse-a-previous-page-snapshot", + "assertions": 3, + "passed": true + }, + { + "name": "allocation-reversal-aggregation-is-equivalent", + "assertions": 2, + "passed": true + }, + { + "name": "historical-decision-chain-is-validated-in-both-readers", + "assertions": 2, + "passed": true + } + ], + "scenarios": 8, + "assertions": 34, + "read_transaction": { + "isolation": "repeatable read", + "read_only": "on" + }, + "last_read_queries": 67, + "benchmark_fixture_documents": 51, + "no_new_decision_capability": true, + "decision_and_allocation_rows_rollback_only": true + }, + "existing_history_regression": { + "kind": "sgf_historical_payable_adapter_synthetic", + "cases": [ + { + "name": "default-disabled-and-old-path-preserved", + "assertions": 4, + "passed": true + }, + { + "name": "principal-confirmed-only-and-idempotency", + "assertions": 16, + "passed": true + }, + { + "name": "receipt-integrity-and-identity-refusals", + "assertions": 6, + "passed": true + }, + { + "name": "complete-compatible-payment-facts-required", + "assertions": 7, + "passed": true + }, + { + "name": "changed-history-requires-new-conference", + "assertions": 3, + "passed": true + }, + { + "name": "permissions-person-and-context-revalidated", + "assertions": 5, + "passed": true + }, + { + "name": "audit-and-import-failure-atomic-recovery", + "assertions": 3, + "passed": true + }, + { + "name": "receipt-append-only-and-existing-controller", + "assertions": 3, + "passed": true + }, + { + "name": "invalid-receipt-keeps-history-readable-and-balance-indeterminate", + "assertions": 2, + "passed": true + }, + { + "name": "concurrent-confirmations-wait-and-replay-one-import", + "assertions": 7, + "passed": true + } + ], + "tests": 10, + "assertions": 56, + "principal_minor": 6000, + "confirmed_minor": 3000, + "pending_minor": 1000, + "rejected_minor": 500, + "balance_minor": 3000, + "shared_engine_unchanged": true, + "native_source_preparation_only": true, + "actual_http_kernel_tested": false, + "browser_interactions_tested": false, + "visual_review": false, + "deployment_capacity_validated": false + }, + "http": { + "kind": "financial_pagination_actual_http", + "checks": 24, + "passed": true, + "volume": 10000, + "default_page": 25, + "larger_page": 100, + "filter_before_count": true, + "source_and_evidence_pages_disjoint": true, + "context_and_rights_enforced": true, + "unknown_parameters_refused": true, + "html_escaping": true, + "visual_review": false, + "browser_interactions_tested": false + }, + "fresh_command": { + "passed": true, + "read_cache_not_used_by_command": true, + "current_document_and_history_anchor_revalidated": true, + "test_changes_rolled_back": true + }, + "concurrent_read": { + "passed": true, + "reader_completed_before_writer_release": true, + "uncommitted_receipt_not_observed": true, + "documents": 25, + "balance_minor": 3000, + "reader_time_ms": 230.176, + "not_throughput_capacity": true + }, + "positive_recognition_and_unit_filter": { + "passed": true, + "positive_unrecognised_document_visible": true, + "recognised_filter_excludes_it": true, + "other_unit_same_company_excluded": true, + "no_other_evidence_returned": true, + "test_rows_rolled_back": true + }, + "postcheck": { + "read_only": true, + "original_workflow_receipt_unchanged": true, + "counts": { + "pa_imported_sources": 10000, + "pa_sources": 10000, + "pa_proposals": 10000, + "pa_obligations": 10000, + "pa_history_imports": 10000 + }, + "imported_payments": 30000, + "temporary_decision_and_allocation_tables_absent": true, + "scoped_business_fingerprint": "c9e93019653c35b8c1685a58ab2b68e8b279572044355895abc9360790707c68", + "benchmark_clones": 9999, + "native_workflow_sources": 1, + "no_operational_installation": true + }, + "private_proof_sha256": { + "regression.json": "3cb8d648249e22c00447602107c1939abc03650173a6d11ccb0f23df59e0fe44", + "page-cases.json": "a6b8c5a43cf4787c2be70a2b65e87426b40f8e7d6d14916f0a50e1e806899630", + "http-proof.json": "86783db1c62563f7e718297d1cbefa5d850dc00cd1f85db83491cee040f1b27a", + "page-http.json": "817b74f2ab18d36d6c6c8f2757eb28f547a01cacebf14caca995ee6dd29a9937", + "page-fresh-command.json": "349d10ff986fceedc847796cca0bb38293e403b37d7d4ea731819d1d8bc63eba", + "page-concurrent-read.json": "9eb7b544c850747d842ac7a3b4cc512f45ac5e38c711cd2f23db565f97ce590c", + "page-filter-positive.json": "8a67609459318c6028364ecdb968b9d5212f4b94eaf428d09d1dcd2d26ba0c0e", + "page-post.json": "4165000a52cda0e94759e3d2ff92095d29e1d4d75e5cd8e63b5f8a84eb6e5432" + }, + "native_compatibility": { + "proofs": [ + { + "file": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml", + "sha256": "1381ea38c6e9c8b47c8ac619f225d2c4e6d49b851fd7e77652c526f98622c2b3", + "passing_cases": 20, + "excluded_cases": 1 + }, + { + "file": "private/stock-receipt-efcf1053aa57/financial-read-affected-junit.xml", + "sha256": "f57822ab2e0ea07ae6f49ae99f76f8cca4a554e0294ed33f0da18b9259e5a919", + "passing_cases": 1, + "excluded_cases": 0 + } + ], + "selected_cases": [ + { + "name": "historical import keeps gross principal and subtracts confirmed payments exactly once", + "assertions": 26, + "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" + }, + { + "name": "a decision between proposal and validation invalidates the captured history", + "assertions": 4, + "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" + }, + { + "name": "pending-only and fully paid histories retain the correct balances with data set "('10.00', 'pending', 6000)"", + "assertions": 2, + "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" + }, + { + "name": "pending-only and fully paid histories retain the correct balances with data set "('60.00', 'confirmed', 0)"", + "assertions": 2, + "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" + }, + { + "name": "import does not enable new payments or confirmations of pending history", + "assertions": 3, + "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" + }, + { + "name": "missing audit and unapproved endpoints cannot import history", + "assertions": 3, + "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" + }, + { + "name": "failure during capture rolls back obligation and all imported facts", + "assertions": 5, + "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" + }, + { + "name": "normalizer refuses duplicated omitted or incompatible payment facts", + "assertions": 8, + "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" + }, + { + "name": "two installation identities cannot recognise two obligations for the same local invoice", + "assertions": 4, + "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" + }, + { + "name": "the original 1160 example keeps 300 confirmed and 100 pending separate", + "assertions": 3, + "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" + }, + { + "name": "imported pending decisions change the balance once and preserve the import with data set "('confirmed', 5000)"", + "assertions": 10, + "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" + }, + { + "name": "imported pending decisions change the balance once and preserve the import with data set "('rejected', 6000)"", + "assertions": 10, + "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" + }, + { + "name": "decision failure rolls back original payment audit and ledger together", + "assertions": 6, + "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" + }, + { + "name": "activation and independent eligible reviewer remain mandatory", + "assertions": 5, + "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" + }, + { + "name": "deciding historical pending does not allow new payments", + "assertions": 2, + "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" + }, + { + "name": "unauthorised original changes invalidate balance and prevent decisions", + "assertions": 3, + "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" + }, + { + "name": "decision facts cannot be updated or deleted", + "assertions": 2, + "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" + }, + { + "name": "confirmation rechecks available balance and rejection does not deduct", + "assertions": 5, + "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" + }, + { + "name": "a full confirmation leaves zero balance and prevents another confirmation", + "assertions": 2, + "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" + }, + { + "name": "task inbox delegates imported payment authority without exposing or deciding the ledger", + "assertions": 35, + "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" + }, + { + "name": "imported ledger is append-only and disabling the history cannot silently restore the old balance", + "assertions": 4, + "proof": "private/stock-receipt-efcf1053aa57/financial-read-affected-junit.xml" + } + ], + "selection": "20 valid cases reused from initial run; one test fixed to wrap expected PostgreSQL trigger violations in savepoints and rerun alone in a fresh QA database. Intermediate failed cases are retained but not counted. A reused RefreshDatabase fixture was refused by duplicate-function setup; launcher now requires a new owned database for this mode." + }, + "implementation": { + "documents_page_sizes": [ + 25, + 100 + ], + "proposal_and_event_pages_independent": true, + "filters_applied_before_pagination": [ + "number_or_supplier_literal_search", + "recognised_or_unrecognised" + ], + "stable_order": "Documents/proposals/events descending ID; obligation positions keep existing ID order.", + "history_and_allocation_algorithms_reused": true, + "write_paths_never_use_read_snapshots": true, + "actual_read_transaction": "REPEATABLE READ READ ONLY", + "no_company_writer_lock_on_read": true, + "native_production_adapter_unchanged": true + }, + "source_sha256": { + "packages/payables/src/Payables.php": "f8845ab702f9bc58fad2b39a89fbfa3cdc1582169812704f3f2f225be7854977", + "packages/payables/src/HistoricalPayments.php": "c55d3e67a8bad469184d664f7739a97af7121d685315c6d55f90d08355c632f0", + "packages/payables/src/PaymentDecisions.php": "3a54c7905783d14facf070fc59ac426264cf423daaedb47d24c018aa4d41fc39", + "packages/payables/src/SupplierSettlements.php": "dc7932608144b105a4289812cb8d0bffd94a425a3d05753b482cec826ed4a68a", + "packages/payables/ui/page.php": "36d3d6935eb3549bd9c8501c3171f5361839cffc036c228adc66cead1aaed66f", + "app/Modules/Purchasing/SupplierPayables.php": "77d3af4ba3a60d9742aeebe439d43b556658f257b6da4d1fda6f48f9f2385813", + "app/Modules/Purchasing/SupplierHistoryReceipts.php": "e91523254914ff80a363e360f1547c3b19757142955463826bbf7f535cd5c17c", + "app/Modules/Purchasing/SupplierPayablesController.php": "6671292de4bd41b382b23fc63683b5b67b97227a6c8e61fcbc865d49493a384c", + "config/supplier_payable_history.php": "5331b7987fdb5f8fdb9647e6cf74145f91aca333a7e4c21f98092827893b85ce", + "../compras/tests/Feature/PayableHistoryImportTest.php": "e9151c0befa2d1de91f7bddef5b94287218c0aae28933fabcf82f1592489dc84", + "scripts/payable-page-run.mjs": "a8fc8eda84426c3477950d5122f19e4110d98a0380ff17f95224aa8edf540181", + "scripts/payable-page-fixture.php": "124515cdf3937ddf5ee5a4520ce93ce3f42968b604643a65d3be88c246e05deb", + "scripts/payable-page-cases.php": "29a29d804f4fc34f095a51727c1e8bdd4bbba8967d03952be7db3425cd4b8a87", + "scripts/payable-page-bench.php": "90aa0f130f901859636418018097db0865eeb7e2b39b50169fb0d3747ff09966", + "scripts/payable-page-load.mjs": "9f1ab6e28cde655a112d5a85a999bb10171cdbd99ca48437ffa6d6860daa1446", + "scripts/payable-page-http.mjs": "19a44634958a5f2c449ab1e68f2791d68ce1020c794f25ad6adda8fa0073eb7c", + "scripts/payable-page-final.php": "8e48769422524380b2eb0ccef742a86b44915329f8ecd96d923f07f6b73bbcf4", + "scripts/summarize-payable-page.mjs": "d8b74681f670ff29ee48d08bd79d2eeb69d313074a63cc5d1a114cd0165270e8", + "scripts/payable-history-sgf-proof.php": "00a79c0abc369eb541e3ac67fb16d8f338eae1b387fdc521bb9b9dd0a9fb9507", + "scripts/stock-receipt-composition.mjs": "dc9288a4f419e89db26fef3a06f0218c505882220e07cdffd24d5564cb5b4d74" + }, + "reused_proofs": { + "docs/proofs/sgf-payable-history-receipt-20261102.json": "92538539020a037f8ab652c8b20da929014b6c50f2a315c35fbc5349d13e8e65", + "docs/proofs/workshop-stock-closure-20261102.json": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "docs/proofs/native-warehouse-return-20261102.json": "587795ab4d2b2e65d51feaf7ed5e368df715d69cb7a0480f5f2b1d802d019869" + }, + "preservation": { + "new_owned_qa_databases_only": true, + "one_actual_native_workflow_source_plus_explicit_benchmark_clones": true, + "previous_native_and_sgf_history_fixtures_preserved": true, + "six_pending_associations_untouched": true, + "blocked_cache_untouched": true, + "installed_and_demo_data_or_rights_unchanged": true, + "no_new_operational_migration_or_indices": true, + "publication": false, + "purchasing_activation": false, + "checkpoint": false + }, + "limits": [ + "A page includes the complete dependency history needed to validate each selected obligation; an unusually large single history still needs separate assessment.", + "Pagination snapshots are per request, not a fixed snapshot across human navigation or keyset cursor.", + "The standalone native adapter retains its old listing; compatibility was tested against the canonical package in private QA, not deployed to native/demos.", + "Read timings are local, warm, single samples; no concurrency throughput, production capacity or visual acceptance established.", + "Historical receipts remain synthetic snapshots; no live provenance authentication or operational financial-responsibility cutover added." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/sgf-payable-report-20261102.json b/docs/proofs/sgf-payable-report-20261102.json new file mode 100644 index 0000000..61990e8 --- /dev/null +++ b/docs/proofs/sgf-payable-report-20261102.json @@ -0,0 +1,313 @@ +{ + "increment": "SGF-PAYABLE-POSITION-REPORT-SIM-v1", + "date": "2026-11-02", + "synthetic_only": true, + "tests": { + "passed": true, + "cases": [ + { + "name": "filters-reproducible-positions-and-unknown-due-date", + "assertions": 6, + "passed": true + }, + { + "name": "mixed-divergent-history-never-becomes-a-global-zero", + "assertions": 5, + "passed": true + }, + { + "name": "isolation-and-fresh-authority", + "assertions": 4, + "passed": true + } + ], + "assertions": 17, + "business_fingerprint_equal": true, + "test_writes_rolled_back": true + }, + "settlement_book": { + "passed": true, + "report": { + "version": "SGF-PAYABLE-POSITION-REPORT-SIM-v1", + "synthetic_only": true, + "basis": "current_recognised_positions", + "captured_at_utc": "2026-11-02 20:15:30.106755", + "scope": { + "tenant_id": 1, + "company_id": 1, + "unit_id": 1 + }, + "criteria": { + "q": "" + }, + "currency": "MZN", + "totals": { + "count": 61, + "principal_minor": 366000, + "unknown_balance_count": 0, + "unknown_due_count": 61, + "balance_minor": 365608 + }, + "known_positions": { + "count": 61, + "principal_minor": 366000, + "historical_confirmed_minor": 0, + "net_allocated_minor": 392, + "balance_minor": 365608 + }, + "positions_sha256": "0abf8175547c82604737e396de09be559f0b25a92e93a2d99941f17d7a9b8934", + "window_size": 100, + "windows": 1 + }, + "baseline_fingerprint_equal": true, + "net_allocations_include_reversal": true + }, + "http": { + "passed": true, + "checks": 17, + "real_http_kernel": true, + "transaction": { + "transaction": { + "isolation": "repeatable read", + "read_only": "on" + }, + "writer_locks": 0 + }, + "visual_review": false, + "no_browser": true + }, + "measurements": { + "before": { + "passed": true, + "report": { + "version": "SGF-PAYABLE-POSITION-REPORT-SIM-v1", + "synthetic_only": true, + "basis": "current_recognised_positions", + "captured_at_utc": "2026-11-02 20:12:59.509723", + "scope": { + "tenant_id": 1, + "company_id": 1, + "unit_id": 1 + }, + "criteria": { + "q": "" + }, + "currency": "MZN", + "totals": { + "count": 10000, + "principal_minor": 60000000, + "unknown_balance_count": 0, + "unknown_due_count": 10000, + "balance_minor": 30000000 + }, + "known_positions": { + "count": 10000, + "principal_minor": 60000000, + "historical_confirmed_minor": 30000000, + "net_allocated_minor": 0, + "balance_minor": 30000000 + }, + "positions_sha256": "c18a0fad20deefe80e5b0dc60051cdb7ad61af7cf1290642589629bfa170466d", + "window_size": 100, + "windows": 100 + }, + "time_ms": 19066.022, + "queries": 6607, + "heap_baseline_bytes": 25165824, + "heap_peak_bytes": 35651584, + "writer_lock_queries": 0, + "transaction": { + "isolation": "repeatable read", + "read_only": "on" + }, + "prior_business_fingerprint_equal": true, + "not_deployment_capacity": true + }, + "after": { + "passed": true, + "report": { + "version": "SGF-PAYABLE-POSITION-REPORT-SIM-v1", + "synthetic_only": true, + "basis": "current_recognised_positions", + "captured_at_utc": "2026-11-02 20:17:02.120766", + "scope": { + "tenant_id": 1, + "company_id": 1, + "unit_id": 1 + }, + "criteria": { + "q": "" + }, + "currency": "MZN", + "totals": { + "count": 10000, + "principal_minor": 60000000, + "unknown_balance_count": 0, + "unknown_due_count": 10000, + "balance_minor": 30000000 + }, + "known_positions": { + "count": 10000, + "principal_minor": 60000000, + "historical_confirmed_minor": 30000000, + "net_allocated_minor": 0, + "balance_minor": 30000000 + }, + "positions_sha256": "c18a0fad20deefe80e5b0dc60051cdb7ad61af7cf1290642589629bfa170466d", + "window_size": 100, + "windows": 100 + }, + "time_ms": 12557.809, + "queries": 2313, + "heap_baseline_bytes": 25165824, + "heap_peak_bytes": 33554432, + "writer_lock_queries": 0, + "transaction": { + "isolation": "repeatable read", + "read_only": "on" + }, + "prior_business_fingerprint_equal": true, + "not_deployment_capacity": true + } + }, + "postchecks": { + "historical_book": { + "passed": true, + "read_only": true, + "business_fingerprint_equal": true, + "business_fingerprint": "c9e93019653c35b8c1685a58ab2b68e8b279572044355895abc9360790707c68" + }, + "settlement_book": { + "passed": true, + "read_only": true, + "business_fingerprint_equal": true, + "business_fingerprint": "7cbe5df4c05f5017840563e38ebff0e4c88e0e147e49f07922ce6d36de7a0318" + } + }, + "conditions": { + "php": "8.4.27", + "memory_limit": "512M", + "same_database_and_filter": true, + "independent_php_processes": true, + "one_valid_sample_per_implementation": true, + "warm_local_database": true, + "other_local_processes_not_controlled": true, + "indices_added": false, + "comparison": "Two implementations of the complete 10000-position report, not the older page or settlement benchmarks." + }, + "sources": [ + { + "file": "packages/payables/src/Payables.php", + "sha256": "cfd3f1c77c108b725e9328b5bfe4839483c6b27483ceb6182c1fdf66e36e0575" + }, + { + "file": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "a7d956badfaa917d664cb88c3cf6afedbc1b09880c2a00ad4a98823a1cc590f7" + }, + { + "file": "app/Modules/Purchasing/SupplierPayablesController.php", + "sha256": "58dd0a4e014cae0c2fd17012d08a07c108a0bc0072fc8ed0602a54aaedbd238c" + }, + { + "file": "app/Modules/Purchasing/SupplierPayableReportController.php", + "sha256": "72a0c9775a38497b996c1f257d4c2348421d751a3bcc410e6a4bc8e442ad7047" + }, + { + "file": "packages/payables/ui/page.php", + "sha256": "2d7ec23063e63a15994eb5bd6ed7bab540297a7a3751791c099d2328fe45ae80" + }, + { + "file": "resources/views/purchasing/payable-report.blade.php", + "sha256": "0b67e1c035b84d7fac2c642601acb791322f5c6f43dcfc4f47edb3ecb004eb0b" + }, + { + "file": "routes/web.php", + "sha256": "3adaf19e6b62b0b8275797b0ec027c17f3f748effb0b11b4cfbf23963daf652c" + }, + { + "file": "scripts/payable-history-sgf-proof.php", + "sha256": "4f42a67550e562c8a1ee7baba8a5f23b1186dc96ec295264763ef1f2193ced24" + }, + { + "file": "scripts/payable-report-proof.php", + "sha256": "30a21c7f4078da7d64aabc7ce3f8f24a1c7f6a2589d035957e35603726368c6b" + }, + { + "file": "scripts/payable-report-http.mjs", + "sha256": "ff4a1eff0c64526a5b0da7a9bb444a69a2b0c96fd06f7b0e70d055652da9a974" + }, + { + "file": "scripts/payable-report-http-router.php", + "sha256": "3568038609020e3967952e21a62e1b5f7f26599e98969e0dbb520eb732461853" + }, + { + "file": "scripts/summarize-payable-report.mjs", + "sha256": "41ca931ea1c347e71756397f10008af3b33ed0702a3eba55a55353cab774db56" + } + ], + "evidence": [ + { + "file": "private/payable-history-03e16d9fb37d/report-volume.json", + "sha256": "2db569379899cb3fb170a0113b25c45c9db7a48629149d891d494b637a328b33" + }, + { + "file": "private/payable-history-03e16d9fb37d/report-volume-batch.json", + "sha256": "f19b60b2f6ba5a4b6adae554196bb586ef66087740d73cbdb95b47056a92e93a" + }, + { + "file": "private/payable-history-03e16d9fb37d/report-cases.json", + "sha256": "e95f324039177a7cd162bfbbdb4ddadd2e2b60d8fac1693e08596bf6a97133e6" + }, + { + "file": "private/payable-history-03e16d9fb37d/report-cases-batch.json", + "sha256": "e95f324039177a7cd162bfbbdb4ddadd2e2b60d8fac1693e08596bf6a97133e6" + }, + { + "file": "private/payable-history-03e16d9fb37d/report-post.json", + "sha256": "83baf09656e3d66e21e79d3efeb70fdb4ffc0153025b2309b71503670404b744" + }, + { + "file": "private/settlement-page-dbd466ae44a5/report-settlements.json", + "sha256": "88091b17570a500be3464de388b58b5230d59ab7d952eb88f8de5b5c7feadb54" + }, + { + "file": "private/settlement-page-dbd466ae44a5/report-http.json", + "sha256": "032a2d9a96acbf263b5b2db205c3b146eac48a6d229341a3d592b808c151dbc2" + }, + { + "file": "private/settlement-page-dbd466ae44a5/report-http-mode.json", + "sha256": "0b420dd1f71ce9c50fcb38e2359f84c389ae0b6bc93be1c0d7bf61caac633d2c" + }, + { + "file": "private/settlement-page-dbd466ae44a5/report-post.json", + "sha256": "5e6ed88ce3e08ec1d8463ab2b9cae5520ea4a6a20362704848b69123585dd815" + } + ], + "previous_proof": { + "file": "docs/proofs/sgf-settlement-read-isolation-20261102.json", + "sha256": "c83e1857931558aed6249d3acf75f08fa819fb9e35e88080abe7bddbfb3af248", + "private_evidence_hashes_preserved": true + }, + "accounting_next": { + "state": "specification_only_authorisation_pending", + "file": "docs/GENERAL_LEDGER_FIRST_SYNTHETIC_SCOPE.md", + "sha256": "eb36d91e7532f49792287c26791892919380adefa77095c860d8201093175914", + "functional_code": false, + "new_rights_granted": false + }, + "limits": [ + "The complete 10000-position report still took 12.558 seconds in one local sample; sustained load and deployment capacity not validated.", + "Current position only. No historical cutoff, archived report recovery, bank reconciliation, general ledger or accounting recognition added.", + "The new core positionsPage reuses the existing calculation and skips presentation-only evidence pages. Each keyset window selects at most 100 sources; memory is bounded to window data and accumulators, not the full universe. A single very large history can still be material.", + "Remaining cost has not been isolated by profiling. Do not attribute it to a particular index or claim an index gain." + ], + "six_pending_associations_untouched": true, + "blocked_cache_untouched": true, + "new_operational_rights": false, + "migration_in_destination": false, + "native_activation": false, + "publication": false, + "checkpoint": false, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/sgf-payable-report-capture-20261103.json b/docs/proofs/sgf-payable-report-capture-20261103.json new file mode 100644 index 0000000..bc5e600 --- /dev/null +++ b/docs/proofs/sgf-payable-report-capture-20261103.json @@ -0,0 +1,727 @@ +{ + "increment": "SGF-PAYABLE-REPORT-CAPTURE-REUSE-v1", + "consolidated_at_utc": "2026-11-03T06:06:45.933Z", + "functional_optimization": true, + "synthetic_only": true, + "tests": { + "clone": { + "passed": true, + "tag": "b7f7d0c1c2c2", + "source_tag": "03e16d9fb37d", + "original_database_not_modified": true, + "baseline_sha256": "989d25be748f79a45f09ea174069790cf9a3318b5f1ce62b1209b2ceb77074a9", + "new_owned_database": true, + "synthetic_only": true + }, + "initial_profile": { + "passed": true, + "mode": "before", + "time_ms": 21548.229208, + "queries": 2313, + "sql_ms": 9941.689999999999, + "heap_peak_bytes": 35651584, + "stages_ms": { + "selection": 5920.124581999995, + "decode": 354.39566599999995, + "history": 3050.8870420000007, + "positions": 11710.590668000004, + "hash_totals": 424.8180839999998 + }, + "query_groups": [ + { + "queries": 100, + "sql_ms": 5767.15, + "sql": "select \"r\".* from \"pa_imported_sources\" as \"r\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and exists (select 1 from \"pa_sources\" as \"s\" inner join \"pa_obligations\" as \"o\" on \"o\".\"source_id\" = \"s\".\"id\" where \"s\".\"local_source_id\" = \"r\".\"id\" and \"s\".\"tenant_id\" = \"r\".\"tenant_id\" and \"s\".\"company_id\" = \"r\".\"company_id\" and \"s\".\"unit_id\" = \"r\".\"unit_id\" and \"o\".\"tenant_id\" = \"r\".\"tenant_id\" and \"o\".\"company_id\" = \"r\".\"company_id\" and \"o\".\"unit_id\" = \"r\".\"unit_id\") and \"r\".\"id\" < ? order by \"r\".\"id\" desc limit 100" + }, + { + "queries": 100, + "sql_ms": 1524.2599999999998, + "sql": "select * from \"pa_imported_payments\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and \"obligation_id\" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) order by \"legacy_payment_id\" asc" + }, + { + "queries": 100, + "sql_ms": 454.8600000000002, + "sql": "select * from \"pa_obligations\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and \"source_id\" in (select \"id\" from \"pa_sources\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and \"local_source_id\" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)) order by \"id\" asc" + }, + { + "queries": 100, + "sql_ms": 354.1899999999999, + "sql": "select * from \"pa_history_imports\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and \"obligation_id\" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + }, + { + "queries": 100, + "sql_ms": 347.3100000000003, + "sql": "select distinct on (\"local_source_id\") * from \"pa_source_histories\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and \"local_source_id\" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) order by \"local_source_id\" asc, \"version\" desc" + }, + { + "queries": 302, + "sql_ms": 209.15000000000006, + "sql": "select exists(select * from \"permission_grants\" where \"user_id\" = ? and \"tenant_id\" = ? and \"company_id\" = ? and \"permission\" = ? and \"unit_id\" = ?) as \"exists\"" + }, + { + "queries": 403, + "sql_ms": 201.47000000000008, + "sql": "select current_database() as d" + }, + { + "queries": 201, + "sql_ms": 167.79000000000005, + "sql": "select exists (select 1 from pg_class c, pg_namespace n where n.nspname = current_schema() and c.relname = 'pa_history_imports' and c.relkind in ('r', 'p') and n.oid = c.relnamespace)" + }, + { + "queries": 201, + "sql_ms": 156.56000000000012, + "sql": "select exists (select 1 from pg_class c, pg_namespace n where n.nspname = current_schema() and c.relname = 'pa_imported_payments' and c.relkind in ('r', 'p') and n.oid = c.relnamespace)" + }, + { + "queries": 100, + "sql_ms": 127.99999999999997, + "sql": "select * from \"pa_sources\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and \"id\" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + }, + { + "queries": 101, + "sql_ms": 127.88, + "sql": "select exists (select 1 from pg_class c, pg_namespace n where n.nspname = current_schema() and c.relname = 'pa_source_histories' and c.relkind in ('r', 'p') and n.oid = c.relnamespace)" + }, + { + "queries": 201, + "sql_ms": 122.38999999999997, + "sql": "select exists(select * from \"pa_access\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and (\"user_id\" = ? and \"action\" = ?)) as \"exists\"" + }, + { + "queries": 100, + "sql_ms": 115.45000000000002, + "sql": "select exists (select 1 from pg_class c, pg_namespace n where n.nspname = current_schema() and c.relname = 'pa_payment_decisions' and c.relkind in ('r', 'p') and n.oid = c.relnamespace)" + }, + { + "queries": 1, + "sql_ms": 104.32, + "sql": "select \"r\".* from \"pa_imported_sources\" as \"r\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and exists (select 1 from \"pa_sources\" as \"s\" inner join \"pa_obligations\" as \"o\" on \"o\".\"source_id\" = \"s\".\"id\" where \"s\".\"local_source_id\" = \"r\".\"id\" and \"s\".\"tenant_id\" = \"r\".\"tenant_id\" and \"s\".\"company_id\" = \"r\".\"company_id\" and \"s\".\"unit_id\" = \"r\".\"unit_id\" and \"o\".\"tenant_id\" = \"r\".\"tenant_id\" and \"o\".\"company_id\" = \"r\".\"company_id\" and \"o\".\"unit_id\" = \"r\".\"unit_id\") order by \"r\".\"id\" desc limit 100" + }, + { + "queries": 100, + "sql_ms": 98.35000000000004, + "sql": "select exists (select 1 from pg_class c, pg_namespace n where n.nspname = current_schema() and c.relname = 'ps_allocations' and c.relkind in ('r', 'p') and n.oid = c.relnamespace)" + }, + { + "queries": 101, + "sql_ms": 59.70999999999997, + "sql": "select \"person\" from \"pa_access\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and (\"user_id\" = ? and \"action\" = ?) limit 1" + }, + { + "queries": 1, + "sql_ms": 2.27, + "sql": "SELECT transaction_timestamp() AT TIME ZONE 'UTC' AS captured" + }, + { + "queries": 1, + "sql_ms": 0.58, + "sql": "SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY" + } + ], + "report": { + "version": "SGF-PAYABLE-POSITION-REPORT-SIM-v1", + "synthetic_only": true, + "basis": "current_recognised_positions", + "captured_at_utc": "2026-11-03 05:57:48.402683", + "scope": { + "tenant_id": 1, + "company_id": 1, + "unit_id": 1 + }, + "criteria": { + "q": "" + }, + "currency": "MZN", + "totals": { + "count": 10000, + "principal_minor": 60000000, + "unknown_balance_count": 0, + "unknown_due_count": 10000, + "balance_minor": 30000000 + }, + "known_positions": { + "count": 10000, + "principal_minor": 60000000, + "historical_confirmed_minor": 30000000, + "net_allocated_minor": 0, + "balance_minor": 30000000 + }, + "positions_sha256": "c18a0fad20deefe80e5b0dc60051cdb7ad61af7cf1290642589629bfa170466d", + "window_size": 100, + "windows": 100 + }, + "writer_locks": 0, + "private_synthetic_clone_only": true, + "not_deployment_capacity": true + }, + "statistics_only": { + "passed": true, + "only_new_synthetic_clone": true, + "new_indexes": false, + "source_data_modified": false + }, + "baseline_analyzed": { + "passed": true, + "mode": "analyzed", + "time_ms": 22021.189792, + "queries": 2313, + "sql_ms": 7196.69, + "heap_peak_bytes": 35651584, + "stages_ms": { + "selection": 2260.3873750000002, + "decode": 403.7355820000003, + "history": 4136.341622, + "positions": 14460.815956999999, + "hash_totals": 692.0970009999999 + }, + "query_groups": [ + { + "queries": 100, + "sql_ms": 2052.26, + "sql": "select \"r\".* from \"pa_imported_sources\" as \"r\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and exists (select 1 from \"pa_sources\" as \"s\" inner join \"pa_obligations\" as \"o\" on \"o\".\"source_id\" = \"s\".\"id\" where \"s\".\"local_source_id\" = \"r\".\"id\" and \"s\".\"tenant_id\" = \"r\".\"tenant_id\" and \"s\".\"company_id\" = \"r\".\"company_id\" and \"s\".\"unit_id\" = \"r\".\"unit_id\" and \"o\".\"tenant_id\" = \"r\".\"tenant_id\" and \"o\".\"company_id\" = \"r\".\"company_id\" and \"o\".\"unit_id\" = \"r\".\"unit_id\") and \"r\".\"id\" < ? order by \"r\".\"id\" desc limit 100" + }, + { + "queries": 100, + "sql_ms": 2042.45, + "sql": "select * from \"pa_imported_payments\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and \"obligation_id\" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) order by \"legacy_payment_id\" asc" + }, + { + "queries": 100, + "sql_ms": 559.5, + "sql": "select * from \"pa_obligations\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and \"source_id\" in (select \"id\" from \"pa_sources\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and \"local_source_id\" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)) order by \"id\" asc" + }, + { + "queries": 100, + "sql_ms": 426.68999999999994, + "sql": "select distinct on (\"local_source_id\") * from \"pa_source_histories\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and \"local_source_id\" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) order by \"local_source_id\" asc, \"version\" desc" + }, + { + "queries": 100, + "sql_ms": 408.56000000000023, + "sql": "select * from \"pa_history_imports\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and \"obligation_id\" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + }, + { + "queries": 302, + "sql_ms": 239.76999999999995, + "sql": "select exists(select * from \"permission_grants\" where \"user_id\" = ? and \"tenant_id\" = ? and \"company_id\" = ? and \"permission\" = ? and \"unit_id\" = ?) as \"exists\"" + }, + { + "queries": 403, + "sql_ms": 219.5200000000001, + "sql": "select current_database() as d" + }, + { + "queries": 201, + "sql_ms": 218.26999999999987, + "sql": "select exists (select 1 from pg_class c, pg_namespace n where n.nspname = current_schema() and c.relname = 'pa_history_imports' and c.relkind in ('r', 'p') and n.oid = c.relnamespace)" + }, + { + "queries": 100, + "sql_ms": 191.74999999999994, + "sql": "select * from \"pa_sources\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and \"id\" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + }, + { + "queries": 201, + "sql_ms": 179.40000000000012, + "sql": "select exists (select 1 from pg_class c, pg_namespace n where n.nspname = current_schema() and c.relname = 'pa_imported_payments' and c.relkind in ('r', 'p') and n.oid = c.relnamespace)" + }, + { + "queries": 201, + "sql_ms": 146.04999999999993, + "sql": "select exists(select * from \"pa_access\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and (\"user_id\" = ? and \"action\" = ?)) as \"exists\"" + }, + { + "queries": 100, + "sql_ms": 132.48999999999992, + "sql": "select exists (select 1 from pg_class c, pg_namespace n where n.nspname = current_schema() and c.relname = 'ps_allocations' and c.relkind in ('r', 'p') and n.oid = c.relnamespace)" + }, + { + "queries": 100, + "sql_ms": 131.83000000000004, + "sql": "select exists (select 1 from pg_class c, pg_namespace n where n.nspname = current_schema() and c.relname = 'pa_payment_decisions' and c.relkind in ('r', 'p') and n.oid = c.relnamespace)" + }, + { + "queries": 101, + "sql_ms": 128.98999999999995, + "sql": "select exists (select 1 from pg_class c, pg_namespace n where n.nspname = current_schema() and c.relname = 'pa_source_histories' and c.relkind in ('r', 'p') and n.oid = c.relnamespace)" + }, + { + "queries": 101, + "sql_ms": 74.44000000000001, + "sql": "select \"person\" from \"pa_access\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and (\"user_id\" = ? and \"action\" = ?) limit 1" + }, + { + "queries": 1, + "sql_ms": 33.32, + "sql": "select \"r\".* from \"pa_imported_sources\" as \"r\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and exists (select 1 from \"pa_sources\" as \"s\" inner join \"pa_obligations\" as \"o\" on \"o\".\"source_id\" = \"s\".\"id\" where \"s\".\"local_source_id\" = \"r\".\"id\" and \"s\".\"tenant_id\" = \"r\".\"tenant_id\" and \"s\".\"company_id\" = \"r\".\"company_id\" and \"s\".\"unit_id\" = \"r\".\"unit_id\" and \"o\".\"tenant_id\" = \"r\".\"tenant_id\" and \"o\".\"company_id\" = \"r\".\"company_id\" and \"o\".\"unit_id\" = \"r\".\"unit_id\") order by \"r\".\"id\" desc limit 100" + }, + { + "queries": 1, + "sql_ms": 10.85, + "sql": "SELECT transaction_timestamp() AT TIME ZONE 'UTC' AS captured" + }, + { + "queries": 1, + "sql_ms": 0.55, + "sql": "SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY" + } + ], + "report": { + "version": "SGF-PAYABLE-POSITION-REPORT-SIM-v1", + "synthetic_only": true, + "basis": "current_recognised_positions", + "captured_at_utc": "2026-11-03 05:59:23.860676", + "scope": { + "tenant_id": 1, + "company_id": 1, + "unit_id": 1 + }, + "criteria": { + "q": "" + }, + "currency": "MZN", + "totals": { + "count": 10000, + "principal_minor": 60000000, + "unknown_balance_count": 0, + "unknown_due_count": 10000, + "balance_minor": 30000000 + }, + "known_positions": { + "count": 10000, + "principal_minor": 60000000, + "historical_confirmed_minor": 30000000, + "net_allocated_minor": 0, + "balance_minor": 30000000 + }, + "positions_sha256": "c18a0fad20deefe80e5b0dc60051cdb7ad61af7cf1290642589629bfa170466d", + "window_size": 100, + "windows": 100 + }, + "writer_locks": 0, + "private_synthetic_clone_only": true, + "not_deployment_capacity": true + }, + "optimized_final": { + "passed": true, + "mode": "final", + "time_ms": 12939.6285, + "queries": 2313, + "sql_ms": 5511.789999999999, + "heap_peak_bytes": 35651584, + "stages_ms": { + "selection": 1603.5753820000007, + "decode": 318.49212100000005, + "history": 2902.4255440000006, + "positions": 7764.686793000003, + "hash_totals": 317.40795900000006 + }, + "query_groups": [ + { + "queries": 100, + "sql_ms": 1589.1900000000003, + "sql": "select * from \"pa_imported_payments\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and \"obligation_id\" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) order by \"legacy_payment_id\" asc" + }, + { + "queries": 100, + "sql_ms": 1502.2600000000007, + "sql": "select \"r\".* from \"pa_imported_sources\" as \"r\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and exists (select 1 from \"pa_sources\" as \"s\" inner join \"pa_obligations\" as \"o\" on \"o\".\"source_id\" = \"s\".\"id\" where \"s\".\"local_source_id\" = \"r\".\"id\" and \"s\".\"tenant_id\" = \"r\".\"tenant_id\" and \"s\".\"company_id\" = \"r\".\"company_id\" and \"s\".\"unit_id\" = \"r\".\"unit_id\" and \"o\".\"tenant_id\" = \"r\".\"tenant_id\" and \"o\".\"company_id\" = \"r\".\"company_id\" and \"o\".\"unit_id\" = \"r\".\"unit_id\") and \"r\".\"id\" < ? order by \"r\".\"id\" desc limit 100" + }, + { + "queries": 100, + "sql_ms": 420.69, + "sql": "select * from \"pa_obligations\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and \"source_id\" in (select \"id\" from \"pa_sources\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and \"local_source_id\" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)) order by \"id\" asc" + }, + { + "queries": 100, + "sql_ms": 330.52000000000015, + "sql": "select distinct on (\"local_source_id\") * from \"pa_source_histories\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and \"local_source_id\" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) order by \"local_source_id\" asc, \"version\" desc" + }, + { + "queries": 100, + "sql_ms": 325.7, + "sql": "select * from \"pa_history_imports\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and \"obligation_id\" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + }, + { + "queries": 403, + "sql_ms": 208.6600000000002, + "sql": "select current_database() as d" + }, + { + "queries": 302, + "sql_ms": 193.5700000000001, + "sql": "select exists(select * from \"permission_grants\" where \"user_id\" = ? and \"tenant_id\" = ? and \"company_id\" = ? and \"permission\" = ? and \"unit_id\" = ?) as \"exists\"" + }, + { + "queries": 201, + "sql_ms": 155.75999999999993, + "sql": "select exists (select 1 from pg_class c, pg_namespace n where n.nspname = current_schema() and c.relname = 'pa_imported_payments' and c.relkind in ('r', 'p') and n.oid = c.relnamespace)" + }, + { + "queries": 201, + "sql_ms": 151.2299999999999, + "sql": "select exists (select 1 from pg_class c, pg_namespace n where n.nspname = current_schema() and c.relname = 'pa_history_imports' and c.relkind in ('r', 'p') and n.oid = c.relnamespace)" + }, + { + "queries": 201, + "sql_ms": 120.5699999999999, + "sql": "select exists(select * from \"pa_access\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and (\"user_id\" = ? and \"action\" = ?)) as \"exists\"" + }, + { + "queries": 100, + "sql_ms": 120.56, + "sql": "select * from \"pa_sources\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and \"id\" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + }, + { + "queries": 101, + "sql_ms": 108.25000000000001, + "sql": "select exists (select 1 from pg_class c, pg_namespace n where n.nspname = current_schema() and c.relname = 'pa_source_histories' and c.relkind in ('r', 'p') and n.oid = c.relnamespace)" + }, + { + "queries": 100, + "sql_ms": 103.62999999999998, + "sql": "select exists (select 1 from pg_class c, pg_namespace n where n.nspname = current_schema() and c.relname = 'pa_payment_decisions' and c.relkind in ('r', 'p') and n.oid = c.relnamespace)" + }, + { + "queries": 100, + "sql_ms": 84.19000000000001, + "sql": "select exists (select 1 from pg_class c, pg_namespace n where n.nspname = current_schema() and c.relname = 'ps_allocations' and c.relkind in ('r', 'p') and n.oid = c.relnamespace)" + }, + { + "queries": 101, + "sql_ms": 59.07, + "sql": "select \"person\" from \"pa_access\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and (\"user_id\" = ? and \"action\" = ?) limit 1" + }, + { + "queries": 1, + "sql_ms": 36.67, + "sql": "select \"r\".* from \"pa_imported_sources\" as \"r\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" = ?) and exists (select 1 from \"pa_sources\" as \"s\" inner join \"pa_obligations\" as \"o\" on \"o\".\"source_id\" = \"s\".\"id\" where \"s\".\"local_source_id\" = \"r\".\"id\" and \"s\".\"tenant_id\" = \"r\".\"tenant_id\" and \"s\".\"company_id\" = \"r\".\"company_id\" and \"s\".\"unit_id\" = \"r\".\"unit_id\" and \"o\".\"tenant_id\" = \"r\".\"tenant_id\" and \"o\".\"company_id\" = \"r\".\"company_id\" and \"o\".\"unit_id\" = \"r\".\"unit_id\") order by \"r\".\"id\" desc limit 100" + }, + { + "queries": 1, + "sql_ms": 0.83, + "sql": "SELECT transaction_timestamp() AT TIME ZONE 'UTC' AS captured" + }, + { + "queries": 1, + "sql_ms": 0.44, + "sql": "SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY" + } + ], + "report": { + "version": "SGF-PAYABLE-POSITION-REPORT-SIM-v1", + "synthetic_only": true, + "basis": "current_recognised_positions", + "captured_at_utc": "2026-11-03 06:02:09.708492", + "scope": { + "tenant_id": 1, + "company_id": 1, + "unit_id": 1 + }, + "criteria": { + "q": "" + }, + "currency": "MZN", + "totals": { + "count": 10000, + "principal_minor": 60000000, + "unknown_balance_count": 0, + "unknown_due_count": 10000, + "balance_minor": 30000000 + }, + "known_positions": { + "count": 10000, + "principal_minor": 60000000, + "historical_confirmed_minor": 30000000, + "net_allocated_minor": 0, + "balance_minor": 30000000 + }, + "positions_sha256": "c18a0fad20deefe80e5b0dc60051cdb7ad61af7cf1290642589629bfa170466d", + "window_size": 100, + "windows": 100 + }, + "writer_locks": 0, + "private_synthetic_clone_only": true, + "not_deployment_capacity": true + }, + "query_plan": { + "passed": true, + "plan": [ + { + "QUERY PLAN": "[\n {\n \"Plan\": {\n \"Node Type\": \"Limit\",\n \"Parallel Aware\": false,\n \"Async Capable\": false,\n \"Startup Cost\": 373.66,\n \"Total Cost\": 373.67,\n \"Plan Rows\": 1,\n \"Plan Width\": 884,\n \"Actual Startup Time\": 129.119,\n \"Actual Total Time\": 129.167,\n \"Actual Rows\": 100,\n \"Actual Loops\": 1,\n \"Shared Hit Blocks\": 60185,\n \"Shared Read Blocks\": 0,\n \"Shared Dirtied Blocks\": 0,\n \"Shared Written Blocks\": 0,\n \"Local Hit Blocks\": 0,\n \"Local Read Blocks\": 0,\n \"Local Dirtied Blocks\": 0,\n \"Local Written Blocks\": 0,\n \"Temp Read Blocks\": 0,\n \"Temp Written Blocks\": 0,\n \"Plans\": [\n {\n \"Node Type\": \"Sort\",\n \"Parent Relationship\": \"Outer\",\n \"Parallel Aware\": false,\n \"Async Capable\": false,\n \"Startup Cost\": 373.66,\n \"Total Cost\": 373.67,\n \"Plan Rows\": 1,\n \"Plan Width\": 884,\n \"Actual Startup Time\": 129.113,\n \"Actual Total Time\": 129.134,\n \"Actual Rows\": 100,\n \"Actual Loops\": 1,\n \"Sort Key\": [\"r.id DESC\"],\n \"Sort Method\": \"top-N heapsort\",\n \"Sort Space Used\": 193,\n \"Sort Space Type\": \"Memory\",\n \"Shared Hit Blocks\": 60185,\n \"Shared Read Blocks\": 0,\n \"Shared Dirtied Blocks\": 0,\n \"Shared Written Blocks\": 0,\n \"Local Hit Blocks\": 0,\n \"Local Read Blocks\": 0,\n \"Local Dirtied Blocks\": 0,\n \"Local Written Blocks\": 0,\n \"Temp Read Blocks\": 0,\n \"Temp Written Blocks\": 0,\n \"Plans\": [\n {\n \"Node Type\": \"Nested Loop\",\n \"Parent Relationship\": \"Outer\",\n \"Parallel Aware\": false,\n \"Async Capable\": false,\n \"Join Type\": \"Inner\",\n \"Startup Cost\": 365.61,\n \"Total Cost\": 373.65,\n \"Plan Rows\": 1,\n \"Plan Width\": 884,\n \"Actual Startup Time\": 43.197,\n \"Actual Total Time\": 123.898,\n \"Actual Rows\": 10000,\n \"Actual Loops\": 1,\n \"Inner Unique\": true,\n \"Shared Hit Blocks\": 60182,\n \"Shared Read Blocks\": 0,\n \"Shared Dirtied Blocks\": 0,\n \"Shared Written Blocks\": 0,\n \"Local Hit Blocks\": 0,\n \"Local Read Blocks\": 0,\n \"Local Dirtied Blocks\": 0,\n \"Local Written Blocks\": 0,\n \"Temp Read Blocks\": 0,\n \"Temp Written Blocks\": 0,\n \"Plans\": [\n {\n \"Node Type\": \"Aggregate\",\n \"Strategy\": \"Hashed\",\n \"Partial Mode\": \"Simple\",\n \"Parent Relationship\": \"Outer\",\n \"Parallel Aware\": false,\n \"Async Capable\": false,\n \"Startup Cost\": 365.33,\n \"Total Cost\": 365.34,\n \"Plan Rows\": 1,\n \"Plan Width\": 56,\n \"Actual Startup Time\": 43.102,\n \"Actual Total Time\": 48.670,\n \"Actual Rows\": 10000,\n \"Actual Loops\": 1,\n \"Group Key\": [\"s.local_source_id\", \"s.tenant_id\", \"s.company_id\", \"s.unit_id\", \"o.tenant_id\", \"o.company_id\", \"o.unit_id\"],\n \"Planned Partitions\": 0,\n \"HashAgg Batches\": 1,\n \"Peak Memory Usage\": 1961,\n \"Disk Usage\": 0,\n \"Shared Hit Blocks\": 30182,\n \"Shared Read Blocks\": 0,\n \"Shared Dirtied Blocks\": 0,\n \"Shared Written Blocks\": 0,\n \"Local Hit Blocks\": 0,\n \"Local Read Blocks\": 0,\n \"Local Dirtied Blocks\": 0,\n \"Local Written Blocks\": 0,\n \"Temp Read Blocks\": 0,\n \"Temp Written Blocks\": 0,\n \"Plans\": [\n {\n \"Node Type\": \"Nested Loop\",\n \"Parent Relationship\": \"Outer\",\n \"Parallel Aware\": false,\n \"Async Capable\": false,\n \"Join Type\": \"Inner\",\n \"Startup Cost\": 0.29,\n \"Total Cost\": 365.31,\n \"Plan Rows\": 1,\n \"Plan Width\": 56,\n \"Actual Startup Time\": 0.135,\n \"Actual Total Time\": 33.130,\n \"Actual Rows\": 10000,\n \"Actual Loops\": 1,\n \"Inner Unique\": true,\n \"Shared Hit Blocks\": 30182,\n \"Shared Read Blocks\": 0,\n \"Shared Dirtied Blocks\": 0,\n \"Shared Written Blocks\": 0,\n \"Local Hit Blocks\": 0,\n \"Local Read Blocks\": 0,\n \"Local Dirtied Blocks\": 0,\n \"Local Written Blocks\": 0,\n \"Temp Read Blocks\": 0,\n \"Temp Written Blocks\": 0,\n \"Plans\": [\n {\n \"Node Type\": \"Seq Scan\",\n \"Parent Relationship\": \"Outer\",\n \"Parallel Aware\": false,\n \"Async Capable\": false,\n \"Relation Name\": \"pa_sources\",\n \"Alias\": \"s\",\n \"Startup Cost\": 0.00,\n \"Total Cost\": 357.00,\n \"Plan Rows\": 1,\n \"Plan Width\": 40,\n \"Actual Startup Time\": 0.058,\n \"Actual Total Time\": 6.064,\n \"Actual Rows\": 10000,\n \"Actual Loops\": 1,\n \"Filter\": \"((tenant_id = '1'::bigint) AND (company_id = '1'::bigint) AND (unit_id = '1'::bigint))\",\n \"Rows Removed by Filter\": 0,\n \"Shared Hit Blocks\": 182,\n \"Shared Read Blocks\": 0,\n \"Shared Dirtied Blocks\": 0,\n \"Shared Written Blocks\": 0,\n \"Local Hit Blocks\": 0,\n \"Local Read Blocks\": 0,\n \"Local Dirtied Blocks\": 0,\n \"Local Written Blocks\": 0,\n \"Temp Read Blocks\": 0,\n \"Temp Written Blocks\": 0\n },\n {\n \"Node Type\": \"Index Scan\",\n \"Parent Relationship\": \"Inner\",\n \"Parallel Aware\": false,\n \"Async Capable\": false,\n \"Scan Direction\": \"Forward\",\n \"Index Name\": \"pa_obligations_source_id_unique\",\n \"Relation Name\": \"pa_obligations\",\n \"Alias\": \"o\",\n \"Startup Cost\": 0.29,\n \"Total Cost\": 8.31,\n \"Plan Rows\": 1,\n \"Plan Width\": 32,\n \"Actual Startup Time\": 0.002,\n \"Actual Total Time\": 0.002,\n \"Actual Rows\": 1,\n \"Actual Loops\": 10000,\n \"Index Cond\": \"(source_id = s.id)\",\n \"Rows Removed by Index Recheck\": 0,\n \"Filter\": \"((tenant_id = '1'::bigint) AND (company_id = '1'::bigint) AND (unit_id = '1'::bigint))\",\n \"Rows Removed by Filter\": 0,\n \"Shared Hit Blocks\": 30000,\n \"Shared Read Blocks\": 0,\n \"Shared Dirtied Blocks\": 0,\n \"Shared Written Blocks\": 0,\n \"Local Hit Blocks\": 0,\n \"Local Read Blocks\": 0,\n \"Local Dirtied Blocks\": 0,\n \"Local Written Blocks\": 0,\n \"Temp Read Blocks\": 0,\n \"Temp Written Blocks\": 0\n }\n ]\n }\n ]\n },\n {\n \"Node Type\": \"Index Scan\",\n \"Parent Relationship\": \"Inner\",\n \"Parallel Aware\": false,\n \"Async Capable\": false,\n \"Scan Direction\": \"Forward\",\n \"Index Name\": \"pa_imported_sources_pkey\",\n \"Relation Name\": \"pa_imported_sources\",\n \"Alias\": \"r\",\n \"Startup Cost\": 0.29,\n \"Total Cost\": 8.31,\n \"Plan Rows\": 1,\n \"Plan Width\": 884,\n \"Actual Startup Time\": 0.007,\n \"Actual Total Time\": 0.007,\n \"Actual Rows\": 1,\n \"Actual Loops\": 10000,\n \"Index Cond\": \"(id = s.local_source_id)\",\n \"Rows Removed by Index Recheck\": 0,\n \"Filter\": \"((tenant_id = '1'::bigint) AND (company_id = '1'::bigint) AND (unit_id = '1'::bigint))\",\n \"Rows Removed by Filter\": 0,\n \"Shared Hit Blocks\": 30000,\n \"Shared Read Blocks\": 0,\n \"Shared Dirtied Blocks\": 0,\n \"Shared Written Blocks\": 0,\n \"Local Hit Blocks\": 0,\n \"Local Read Blocks\": 0,\n \"Local Dirtied Blocks\": 0,\n \"Local Written Blocks\": 0,\n \"Temp Read Blocks\": 0,\n \"Temp Written Blocks\": 0\n }\n ]\n }\n ]\n }\n ]\n },\n \"Planning\": {\n \"Shared Hit Blocks\": 167,\n \"Shared Read Blocks\": 0,\n \"Shared Dirtied Blocks\": 0,\n \"Shared Written Blocks\": 0,\n \"Local Hit Blocks\": 0,\n \"Local Read Blocks\": 0,\n \"Local Dirtied Blocks\": 0,\n \"Local Written Blocks\": 0,\n \"Temp Read Blocks\": 0,\n \"Temp Written Blocks\": 0\n },\n \"Planning Time\": 11.284,\n \"Triggers\": [\n ],\n \"Execution Time\": 130.136\n }\n]" + } + ], + "read_only": true + }, + "regression": { + "passed": true, + "checks": 22, + "cases": [ + { + "name": "capture-bound-to-entire-source-and-context", + "checks": 11, + "passed": true + }, + { + "name": "genuine-source-metadata-never-ignored", + "checks": 2, + "passed": true + }, + { + "name": "read-only-capability-never-feeds-commands", + "checks": 2, + "passed": true + }, + { + "name": "raw-and-captured-report-results-identical", + "checks": 5, + "passed": true + }, + { + "name": "bad-receipt-never-becomes-known-zero", + "checks": 1, + "passed": true + }, + { + "name": "revoked-permission-and-foreign-source-denied", + "checks": 1, + "passed": true + } + ], + "rollback_only": true, + "commands_use_live_history": true, + "raw_array_contract_preserved": true, + "source_binding_includes_genuine_metadata": true + }, + "http": { + "passed": true, + "checks": 17, + "real_http_kernel": true, + "transaction": { + "transaction": { + "isolation": "repeatable read", + "read_only": "on" + }, + "writer_locks": 0 + }, + "visual_review": false, + "no_browser": true + }, + "live_command": { + "passed": true, + "live_history_command": true, + "existing_recognition_preserved": true, + "same_key_replayed": true, + "rollback_only": true, + "obligations": 10000 + }, + "preservation": { + "passed": true, + "clone_matches_valid_original_business_fingerprint": true, + "fingerprint": "c9e93019653c35b8c1685a58ab2b68e8b279572044355895abc9360790707c68", + "data_writes": 0, + "new_indexes": 0 + } + }, + "targeted_checks": 39, + "additional_live_command_probe": true, + "private_evidence": [ + { + "file": "private/report-profile-b7f7d0c1c2c2/clone.json", + "sha256": "8ec1b1957cc35733ba6410abc314047c5932c9c05646d58af17693311b4285f1" + }, + { + "file": "private/report-profile-b7f7d0c1c2c2/profile-before.json", + "sha256": "05e8365023dc7688f3d8901f532593e989e79d1291c11c8bf61706564affb0da" + }, + { + "file": "private/report-profile-b7f7d0c1c2c2/profile-analyze.json", + "sha256": "c69f8404b48f61d7ebc7c300b7b73fb8a136fefadc9fdae12f00877c7a1dbb7e" + }, + { + "file": "private/report-profile-b7f7d0c1c2c2/profile-analyzed.json", + "sha256": "ba5d833e0604370ebfbadd4c6fc7a9eb90005340a6fa4d8e207c065631edf783" + }, + { + "file": "private/report-profile-b7f7d0c1c2c2/profile-final.json", + "sha256": "2e93af7934fa0f7295f1316798eafa4f64770864cfd83604d7ca818c860b0aa2" + }, + { + "file": "private/report-profile-b7f7d0c1c2c2/profile-plan.json", + "sha256": "1843e7a0944a82c2d31112216136c59b456159711d3437c4162825fe43279d0c" + }, + { + "file": "private/report-profile-b7f7d0c1c2c2/profile-cases.json", + "sha256": "29b5b73612cd3aae184555fa356620e1e27bf50c26a3607690d434ff21889545" + }, + { + "file": "private/report-profile-b7f7d0c1c2c2/profile-http.json", + "sha256": "032a2d9a96acbf263b5b2db205c3b146eac48a6d229341a3d592b808c151dbc2" + }, + { + "file": "private/report-profile-b7f7d0c1c2c2/profile-command-probe.json", + "sha256": "e94fa13f2bca835d78cc641e07317fb7b6d6722a87e6e1c595e38311bd4698b2" + }, + { + "file": "private/report-profile-b7f7d0c1c2c2/profile-preservation.json", + "sha256": "d2aa456d6d290b34ac1007b56bad0bfd83d223227a0335d44cb1ced70f08ca4e" + } + ], + "archived_baseline": { + "file": "private/report-profile-b7f7d0c1c2c2/baseline.php", + "sha256": "989d25be748f79a45f09ea174069790cf9a3318b5f1ce62b1209b2ceb77074a9" + }, + "previous_manifests": [ + { + "file": "docs/proofs/common-ledger-industrial-20261103.json", + "sha256": "1f26b2c11d565a65456f3fb5f3b11c9e0ac0726649ccef1485464e46ba753e18", + "private_artifacts_preserved": true + }, + { + "file": "docs/proofs/common-ledger-composition-20261103.json", + "sha256": "d64957d14dd6140b66fbb8569997ed941dab954046b56c38939202a2e63653a0", + "private_artifacts_preserved": true + }, + { + "file": "docs/proofs/common-ledger-direct-cost-correction-20261103.json", + "sha256": "2111a30006d24f4325c6f4292e9ffb567adf28950ffbfa76fbb9e8143a2fedb7", + "private_artifacts_preserved": true + }, + { + "file": "docs/proofs/sgf-payable-report-20261102.json", + "sha256": "d16770a76e673972ad28dadbf5c911cd94fb867b120d51edc8a3995cdc3301dd", + "private_artifacts_preserved": true + }, + { + "file": "docs/proofs/sgf-payable-paged-read-20261102.json", + "sha256": "98ddb85c4819ad6e071ab69df3a19244c04e71c0d2e17539eac3c41a2d155b0b", + "private_artifacts_preserved": true + } + ], + "previous_private_artifacts_verified": 45, + "frozen_bundles": [ + { + "files": 25, + "manifest_sha256": "6a507ea7d708a12a8e526e4c610696d8db84079d18aede470237b65505630e7e", + "preserved": true + }, + { + "files": 30, + "manifest_sha256": "cbc4ddbea15f5e396c92bc2e664b973138551928980f334bcf3eb0cf097cacb1", + "preserved": true + } + ], + "observed_comparison": { + "records": 10000, + "windows": 100, + "window_size": 100, + "before_ms": 22021.189792, + "after_ms": 12939.6285, + "queries_before": 2313, + "queries_after": 2313, + "heap_peak_before": 35651584, + "heap_peak_after": 35651584, + "totals_and_content_hash_identical": true, + "statistics_effect_separate": true, + "new_indexes": 0 + }, + "quality": { + "syntax": { + "php": 8, + "js": 3 + }, + "diff_check_both_repositories": true, + "unrelated_suites_not_repeated": true + }, + "source_files": [ + { + "file": "packages/payables/src/HistoricalCapture.php", + "sha256": "4513c497716f8642f80e1c9272332a08c7dfe8523067e47be5a6e5a198d2e140" + }, + { + "file": "packages/payables/src/Payables.php", + "sha256": "e9ffd3e870f68187b53dacd44e47be24165e4da63cea114f8b5ca312e900c353" + }, + { + "file": "packages/payables/bootstrap.php", + "sha256": "e7ad64bbb4e28cc6d3ab5f835fb3c40539cd5a3f929b44fdf5a28a3433679448" + }, + { + "file": "app/Modules/Purchasing/SupplierHistoryReceipts.php", + "sha256": "f22cd883961fc8cef01611e2140a0f8233a2998f203d03374cc8f5fe98a685d5" + }, + { + "file": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9" + }, + { + "file": "scripts/payable-history-sgf-proof.php", + "sha256": "0aa4db45e15994b43f9ef4ac5fc2359aca4c0c3f9cb56cc0e278328d8802e8cc" + }, + { + "file": "scripts/payable-report-profile-clone.mjs", + "sha256": "7c9f1b6930fe3a4f249aa50cbb4e336679d220bc6b559df0a70005453f898ce7" + }, + { + "file": "scripts/payable-report-profile.php", + "sha256": "c157a066659e83813e0a50f52e5e601d25224209cf36415871fbcd3d3aeb5df3" + }, + { + "file": "scripts/payable-report-capture-cases.php", + "sha256": "adfc239356d93521e6b7a5b72257b798317de2288ff2a561e4c4da798a482917" + }, + { + "file": "scripts/payable-report-capture-http.mjs", + "sha256": "d9d32b5aebd0e5d798a4ade927db03578bd8567c2b9fc71596b39b4c877ed660" + }, + { + "file": "scripts/summarize-payable-report-capture.mjs", + "sha256": "6e1377b9df69306d529dd21e55bfe9375468cc39f754d64db48264df44d2f43a" + }, + { + "file": "docs/SGF_PAYABLE_REPORT_CAPTURE_DELIVERY.md", + "sha256": "1efc9ac9d5f3de1edcdbadffe421fb75abc292bd27f91eb64542b296c6df115a" + }, + { + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_SCOPE.md", + "sha256": "7d41a413c1d1e5b8436b72edb0600852841dfd29ae2ba995b2a691bd7562cd1a" + }, + { + "file": "README.md", + "sha256": "4e7f42436b810680dc3dace72fef22c60ce475beb56e70954f2b2548ac638027" + }, + { + "file": "docs/SGF_MODULE_FLOW_PREPARATION.md", + "sha256": "594506975447f1e8df3ffaa081298eaf69c651b79c3d4f387298ad70bba2319c" + } + ], + "preservation": { + "six_pending_records_untouched": true, + "blocked_cache_untouched": true, + "prior_demos_not_reset": true, + "previous_evidence_preserved": true, + "destination_data_and_statistics_unchanged": true, + "real_or_public_grants": 0, + "unrelated_work_preserved": true, + "credentials_private": true + }, + "limits": { + "remaining_report_bottleneck": true, + "one_valid_sample_per_condition": true, + "local_activity_not_controlled": true, + "visual_review_pending": true, + "sustained_load_validated": false, + "deployment_capacity_validated": false, + "source_history_live_sgf_link": false, + "purchasing_activation": false, + "publication": false, + "checkpoint": false, + "acceptance_presumed": false + }, + "next_scope": { + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_SCOPE.md", + "sha256": "7d41a413c1d1e5b8436b72edb0600852841dfd29ae2ba995b2a691bd7562cd1a", + "status": "proposal_only_authorization_required" + } +} diff --git a/docs/proofs/sgf-settlement-paged-read-20261102.json b/docs/proofs/sgf-settlement-paged-read-20261102.json new file mode 100644 index 0000000..88c01fe --- /dev/null +++ b/docs/proofs/sgf-settlement-paged-read-20261102.json @@ -0,0 +1,344 @@ +{ + "increment": "SGF-SETTLEMENT-PAGED-READ-SIM-v1", + "date": "2026-11-02", + "synthetic_only": true, + "tests": { + "passed": true, + "cases": [ + { + "name": "independent-disjoint-windows-and-full-history-amounts", + "assertions": 17, + "passed": true + }, + { + "name": "state-reference-and-focus-predicates-before-counts", + "assertions": 19, + "passed": true + }, + { + "name": "isolation-covers-roots-children-and-aggregate-sums", + "assertions": 4, + "passed": true + }, + { + "name": "read-authority-revoked-and-current-cycle-rechecked", + "assertions": 4, + "passed": true + }, + { + "name": "read-failure-rolls-back-and-next-read-recovers", + "assertions": 2, + "passed": true + }, + { + "name": "controller-links-keep-independent-filters-and-source-focus", + "assertions": 6, + "passed": true + } + ], + "assertions": 53, + "baseline_fingerprint_equal": true, + "test_writes_rolled_back": true + }, + "http": { + "passed": true, + "checks": 29, + "real_http_kernel": true, + "csrf_enforced": true, + "read_only_actor": true, + "visual_review": false, + "browser_interactions_tested": false + }, + "navigation_supplement": { + "passed": true, + "source_exit_preserves_payment_filters": true, + "document_page_reset": true + }, + "preservation": { + "passed": true, + "read_only": true, + "baseline_fingerprint_equal": true, + "business_fingerprint": "7cbe5df4c05f5017840563e38ebff0e4c88e0e147e49f07922ce6d36de7a0318", + "copied_original_receipt_unchanged": true, + "payment_count": 1000, + "source_databases_and_demos_not_written": true + }, + "volume": { + "payments": 1000, + "actual_command_workflow_payments": 1, + "explicit_benchmark_clones": 999, + "indices_added": false, + "baseline_fingerprint": "7cbe5df4c05f5017840563e38ebff0e4c88e0e147e49f07922ce6d36de7a0318" + }, + "measurements": { + "legacy": { + "strategy": "legacy", + "volume": 1000, + "time_ms": 2236.559, + "queries": 3038, + "php_heap_baseline_bytes": 25165824, + "php_heap_peak_bytes": 31457280, + "window_fingerprints": { + "payments": { + "25": "b1dc582e03b800cf6efdebf23b0ba852990060eb2c5e3204d9479099d8c4b6cf", + "100": "84d7cf60e9901555fe8c39be071a8109194a1f535685fa0e8ee34ec7aa84cc7f" + }, + "proposals": { + "25": "99603f9e9ade23e2dcedc5c3e6748559cea5374f85b08e9a51c5fd4d86b79c89", + "100": "ad767cb2fb9dfce8e66c486cc57d110da5dcb462eb6661be9b7a33fae72ee2a0" + }, + "allocations": { + "25": "fd4b5b674580596c28be5e1e2be8d9512918ccf47b13009abeac31c9832b0107", + "100": "339f11f2c76091f5d27481059973fd7f1dbfec31544e898abff2689a307eb890" + }, + "events": { + "25": "fa7f72a887457ba5b7d1d551b576787c66deb594690a6673e345b2259c34b3c1", + "100": "c5ac3621cb95fa7b6e618019de9b894370c99acaec531ae0a24563401a3dd7a0" + } + }, + "original_payment_fingerprint": "f9fbb97d3aa75ed5bc05cb0e362725ea24e28419265a2fb5e0f52a0520251f0c", + "original_unallocated_minor": 41, + "rows": { + "payments": 1000, + "proposals": 336, + "allocations": 393, + "reversal_proposals": 1, + "reversals": 1, + "events": 1008 + }, + "indices_added": false, + "php": "8.4.27", + "not_deployment_capacity": true + }, + "page25": { + "strategy": "page25", + "volume": 1000, + "time_ms": 36.52, + "queries": 35, + "php_heap_baseline_bytes": 25165824, + "php_heap_peak_bytes": 25165824, + "window_fingerprints": { + "payments": { + "25": "b1dc582e03b800cf6efdebf23b0ba852990060eb2c5e3204d9479099d8c4b6cf" + }, + "proposals": { + "25": "99603f9e9ade23e2dcedc5c3e6748559cea5374f85b08e9a51c5fd4d86b79c89" + }, + "allocations": { + "25": "fd4b5b674580596c28be5e1e2be8d9512918ccf47b13009abeac31c9832b0107" + }, + "events": { + "25": "fa7f72a887457ba5b7d1d551b576787c66deb594690a6673e345b2259c34b3c1" + } + }, + "original_payment_fingerprint": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "original_unallocated_minor": null, + "rows": { + "payments": 25, + "proposals": 25, + "allocations": 25, + "events": 25, + "reversal_proposals": 0, + "reversals": 0 + }, + "indices_added": false, + "php": "8.4.27", + "not_deployment_capacity": true + }, + "page100": { + "strategy": "page100", + "volume": 1000, + "time_ms": 42.644, + "queries": 35, + "php_heap_baseline_bytes": 25165824, + "php_heap_peak_bytes": 25165824, + "window_fingerprints": { + "payments": { + "100": "84d7cf60e9901555fe8c39be071a8109194a1f535685fa0e8ee34ec7aa84cc7f" + }, + "proposals": { + "100": "ad767cb2fb9dfce8e66c486cc57d110da5dcb462eb6661be9b7a33fae72ee2a0" + }, + "allocations": { + "100": "339f11f2c76091f5d27481059973fd7f1dbfec31544e898abff2689a307eb890" + }, + "events": { + "100": "c5ac3621cb95fa7b6e618019de9b894370c99acaec531ae0a24563401a3dd7a0" + } + }, + "original_payment_fingerprint": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "original_unallocated_minor": null, + "rows": { + "payments": 100, + "proposals": 100, + "allocations": 100, + "events": 100, + "reversal_proposals": 0, + "reversals": 0 + }, + "indices_added": false, + "php": "8.4.27", + "not_deployment_capacity": true + }, + "focus": { + "strategy": "focus", + "volume": 1000, + "time_ms": 28.562, + "queries": 36, + "php_heap_baseline_bytes": 25165824, + "php_heap_peak_bytes": 25165824, + "window_fingerprints": [], + "original_payment_fingerprint": "f9fbb97d3aa75ed5bc05cb0e362725ea24e28419265a2fb5e0f52a0520251f0c", + "original_unallocated_minor": 41, + "rows": { + "payments": 1, + "proposals": 3, + "allocations": 25, + "events": 9, + "reversal_proposals": 0, + "reversals": 0 + }, + "indices_added": false, + "php": "8.4.27", + "not_deployment_capacity": true + } + }, + "conditions": { + "php": "8.4.27", + "memory_limit": "512M", + "independent_process_per_strategy": true, + "warmup": "Same original-payment focus query before each strategy", + "samples_per_strategy": 1, + "order": [ + "legacy", + "page25", + "page100", + "focus" + ], + "memory": "PHP allocated heap peak, not process RSS", + "index_experiments": false, + "benchmark_workflow": "One payment, 60 allocations and one integral reversal through common commands; 999 explicit benchmark payment clones. 61 synthetic source obligations. Not 1000 fully executed purchase/payment workflows." + }, + "sources": [ + { + "file": "packages/payables/src/SupplierSettlements.php", + "sha256": "2a8586f2781ae224f661d75fb75fc6fb9c27b454bbadf199ddca6449cd4514a2" + }, + { + "file": "packages/payables/src/SettlementHttp.php", + "sha256": "ed77fe846ea5cc475f5f85640a39051bd6ac62960e2d5e7c755f9efafc070d0c" + }, + { + "file": "packages/payables/ui/settlements.php", + "sha256": "a3ddeb204c22341958c103e1d70e5c3fffc7306336385486c53b6609680936ec" + }, + { + "file": "packages/payables/ui/settlement-navigation.php", + "sha256": "73d5c2695a06e2efeff3a2bd85b44bd9eb01d003b8cba184559e7a2918f744af" + }, + { + "file": "packages/payables/ui/settlement-allocations.php", + "sha256": "31e79e3dc779189874b64f92c97a457782e92f7d71a9b1c6da05432868dfd933" + }, + { + "file": "app/Modules/Purchasing/SupplierPaymentsController.php", + "sha256": "c5bb42442d34842c0e310eea14f924e701e75d0cd489df958ca3d685afd78bf5" + }, + { + "file": "scripts/payable-history-sgf-proof.php", + "sha256": "acc00cb5669a2fa838c41b29b55d58a4756819d15e28d213f3148faa06b5cbb2" + }, + { + "file": "scripts/settlement-page-run.mjs", + "sha256": "c4bbea0c18286b74443e36b342c1958b67c416be66ea79ca54a28ff03db2ba51" + }, + { + "file": "scripts/settlement-page-proof.php", + "sha256": "99998938d66a79229b8b1c81d85f8cc0ebea418966d4dd7caab1fd45bcc82f0b" + }, + { + "file": "scripts/settlement-page-cases.php", + "sha256": "5920562b3c27ff3314bcb06db49af264356d566e82ae1eacb8cca704ac998a21" + }, + { + "file": "scripts/settlement-page-bench.mjs", + "sha256": "983bc750b401327f76f7c413dce7fc21319da01f2ac4081b614331f32825a145" + }, + { + "file": "scripts/settlement-page-http.mjs", + "sha256": "2af9dc9c3a83fe76bde15f0a811dd9b43b870fa9c2fd1bc7b44fe266b0f8d8ed" + }, + { + "file": "scripts/settlement-page-http-router.php", + "sha256": "d0f91cd2c8d265f3da7ef6a7c3a6880dd2c7e32085753dd271a48e4dc5812fdf" + }, + { + "file": "scripts/summarize-settlement-page.mjs", + "sha256": "443c315b476e51f6704fddd9f35db12422aef36437fc6b54bca84427cd876e1b" + } + ], + "evidence": [ + { + "file": "private/settlement-page-dbd466ae44a5/settlement-fixture.json", + "sha256": "5637d426a116572a399db8f9ada7401d9ef6ad826cc989b78516f04174a3b72a" + }, + { + "file": "private/settlement-page-dbd466ae44a5/settlement-volume.json", + "sha256": "716008e3cccb5d25668e5b1a4b0ae7fa950231b1c02b666e428d7fd94b35a76b" + }, + { + "file": "private/settlement-page-dbd466ae44a5/settlement-cases.json", + "sha256": "469a18c36f84bec455809bb7a9f06604e2a57614fa7ab3d49e38ecdd1a73e35e" + }, + { + "file": "private/settlement-page-dbd466ae44a5/settlement-http.json", + "sha256": "dcb2f171f776436201f1e21693f295f032c43ff043e2679163d89c1b6b57a312" + }, + { + "file": "private/settlement-page-dbd466ae44a5/settlement-nav.json", + "sha256": "9c62e98d7084735860fa05cd2af9832a89e51402e6b0c95f665afb5e977ce761" + }, + { + "file": "private/settlement-page-dbd466ae44a5/settlement-post.json", + "sha256": "287ca22a9330f576daee32230e0f0339d8092fbe0ca2cee73ea1a898e66b2143" + }, + { + "file": "private/settlement-page-dbd466ae44a5/settlement-bench-legacy.json", + "sha256": "32b42362b79187a570725590e85099b6f89266d23a813e9fbbb77b2f5d699196" + }, + { + "file": "private/settlement-page-dbd466ae44a5/settlement-bench-page25.json", + "sha256": "755e00b3ef8b1c435394cad429164d37de6fc581015780a883c621400dba1201" + }, + { + "file": "private/settlement-page-dbd466ae44a5/settlement-bench-page100.json", + "sha256": "76f790f419a7dc1adb8710c7a6f7aa7a0e67ed1b38f42325adee1d50154ae7c3" + }, + { + "file": "private/settlement-page-dbd466ae44a5/settlement-bench-focus.json", + "sha256": "bce4ee72a39923757b34be0c8bc2fc61b82cb3fa3fb64716b3ed6fc7fd38fcd8" + } + ], + "prior_proofs_preserved": [ + { + "file": "docs/proofs/sgf-payable-evidence-focus-20261102.json", + "sha256": "413895eaaf4cad4c73afd88a4cf9e25207775e23987a5640d8fc4a2f910c9950" + } + ], + "limits": [ + "Only SGF explicitly opts into the bounded reader. Native installed package, legacy default and demos unchanged.", + "Read authorization still uses the existing writer locks; no throughput or lock-contention improvement established.", + "Counts and filters still perform database work over matching rows. Only 1000 settlement payments measured; do not merge these numbers with the earlier 1000/5000/10000 source-document benchmarks.", + "Snapshots are per request; there is no frozen snapshot across human pagination. Commands revalidate current facts and allocation cycle.", + "No live SGF historical source, operational financial cutover, bank execution, reconciliation or accounting added." + ], + "six_pending_associations_untouched": true, + "blocked_cache_untouched": true, + "new_operational_rights": false, + "operational_migrations": false, + "purchasing_candidate_activation": false, + "publication": false, + "checkpoint": false, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/sgf-settlement-read-isolation-20261102.json b/docs/proofs/sgf-settlement-read-isolation-20261102.json new file mode 100644 index 0000000..4dc289a --- /dev/null +++ b/docs/proofs/sgf-settlement-read-isolation-20261102.json @@ -0,0 +1,217 @@ +{ + "increment": "SGF-SETTLEMENT-READ-ISOLATION-SIM-v1", + "date": "2026-11-02", + "synthetic_only": true, + "cases": { + "passed": true, + "cases": [ + { + "name": "standalone-reader-and-old-constructor-contract", + "assertions": 7, + "passed": true + }, + { + "name": "rights-identity-and-authenticated-user-revalidated", + "assertions": 3, + "passed": true + }, + { + "name": "existing-page-and-financial-proofs-remain-equivalent", + "assertions": 9, + "passed": true + }, + { + "name": "read-only-database-guard-and-recovery", + "assertions": 3, + "passed": true + } + ], + "assertions": 23, + "financial_fingerprint_equal": true, + "previous_benchmarks_reused": true + }, + "race": { + "passed": true, + "blocker": "parent transaction on companies row", + "waiting": { + "command": { + "blocking_chain_reaches_parent": true, + "direct_blockers": [ + 25624 + ], + "statement": "companies FOR UPDATE", + "wait_event": "transactionid" + }, + "legacy": { + "blocking_chain_reaches_parent": true, + "direct_blockers": [ + 25724 + ], + "statement": "companies FOR UPDATE", + "wait_event": "tuple" + } + }, + "reader_completed_before_release": true, + "uncommitted_reversal_not_seen": true, + "read": { + "success": true, + "unallocated_minor": 41, + "events_total": 9, + "transaction": { + "isolation": "repeatable read", + "read_only": "on" + }, + "writer_lock_queries": 0, + "queries": 145, + "time_ms": 357.581 + }, + "legacy_read_after_release": { + "success": true, + "unallocated_minor": 41, + "transaction": { + "isolation": "read committed", + "read_only": "off" + }, + "writer_lock_queries": 2, + "time_ms": 5985.169 + }, + "confirmation_after_release": { + "success": true, + "replayed": true, + "same_result": true, + "decisions": 1, + "allocations_for_target": 1, + "worker_changes_rolled_back": true, + "time_ms": 3499.431 + }, + "financial_fingerprint_equal": true, + "not_throughput_capacity": true + }, + "http": { + "passed": true, + "checks": 11, + "real_http_kernel": true, + "json_query": { + "status": 200, + "transaction": { + "isolation": "repeatable read", + "read_only": "on" + }, + "queries": 152, + "writer_lock_queries": 0 + }, + "html_query": { + "status": 200, + "transaction": { + "isolation": "repeatable read", + "read_only": "on" + }, + "queries": 152, + "writer_lock_queries": 0 + }, + "no_browser": true, + "visual_review": false + }, + "preservation": { + "passed": true, + "read_only": true, + "financial_fingerprint_equal": true, + "business_fingerprint": "7cbe5df4c05f5017840563e38ebff0e4c88e0e147e49f07922ce6d36de7a0318", + "payment_count": 1000, + "pending_decision_absent": true, + "old_post_file_sha256": "287ca22a9330f576daee32230e0f0339d8092fbe0ca2cee73ea1a898e66b2143" + }, + "sources": [ + { + "file": "packages/payables/src/Payables.php", + "sha256": "b775958e0c319b9032f133a366e589d0cd26897c2216342e24962c8cc4fd25d7" + }, + { + "file": "packages/payables/src/SupplierSettlements.php", + "sha256": "6d090142dc4625a47d3cdeb09dcaa482a80bbc58c945d429e340888b792e3492" + }, + { + "file": "packages/payables/src/SettlementHttp.php", + "sha256": "8e24bd82587c498efbbcd04a29da31422505114a0600e54f1870f0a7bb971497" + }, + { + "file": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "6a37dd1cb04e93ddd541323b55c91b146db59e1fdc026f99a7fcc5164c34c209" + }, + { + "file": "scripts/payable-history-sgf-proof.php", + "sha256": "bc9c976b97dc66465f2fb7d90d23aa48720d44176ff5520b2a71b974080cbffc" + }, + { + "file": "scripts/settlement-page-proof.php", + "sha256": "1c5126d3ada2090899784f5f442bf15016aac6bad9a58e215843e9996a33aa92" + }, + { + "file": "scripts/settlement-read-proof.php", + "sha256": "feb70d6a52fff1d61c3d58ddf0ea73cb2766965e84277c2e947e9271511063c6" + }, + { + "file": "scripts/settlement-read-cases.php", + "sha256": "9079d0da793207ae6c20261793db587e85f8f1e0d843446a8703acccf918a68d" + }, + { + "file": "scripts/settlement-read-http.mjs", + "sha256": "e009e3abd699d4fe0f96534839eb6d46f4a835702297dbb9e98dc8414cb062d3" + }, + { + "file": "scripts/settlement-read-http-router.php", + "sha256": "2ba5debf73473a1a58026ab4d81bb035c5e2466e9fa26017cbde4e5b910ecc96" + }, + { + "file": "scripts/summarize-settlement-read.mjs", + "sha256": "e991c78199b988cb3074ee32deac4a0f4d4f169a309ea65e235abf5ee16addfd" + } + ], + "evidence": [ + { + "file": "private/settlement-page-dbd466ae44a5/settlement-read-cases.json", + "sha256": "943a561be240ec0b55a47fd0d055a099c3ad2f870e6131f8c09a245d24d4f6ca" + }, + { + "file": "private/settlement-page-dbd466ae44a5/settlement-read-race.json", + "sha256": "6fbafc4e3be83bdb8c950da30dcd71815b63ca358c6d87619768c9c4ff197240" + }, + { + "file": "private/settlement-page-dbd466ae44a5/settlement-read-http.json", + "sha256": "83a0fd8170eee9e91a52b9d15e2580dc8f22f1fb17e95d97aa03703afe4e1cb2" + }, + { + "file": "private/settlement-page-dbd466ae44a5/settlement-read-post.json", + "sha256": "ea1469c11f04b753b8c362bb84fca2432093d8dbe878954056ce64e150ba58c9" + }, + { + "file": "private/settlement-page-dbd466ae44a5/read-http-focus.json", + "sha256": "abdbcccf988d87b287dd371cba83d92c961a6920c165fa68d2b371fb27e75194" + }, + { + "file": "private/settlement-page-dbd466ae44a5/read-http-page.json", + "sha256": "abdbcccf988d87b287dd371cba83d92c961a6920c165fa68d2b371fb27e75194" + } + ], + "previous_proof": { + "file": "docs/proofs/sgf-settlement-paged-read-20261102.json", + "sha256": "42c94ee8c039eebb3c61142966a3b36178a7bb98af975749b53cf231ff996712", + "all_recorded_private_evidence_hashes_preserved": true + }, + "limits": [ + "Only the SGF paged settlement reader explicitly opts into the dedicated read callback. Native installed package and legacy constructor/listing authorization remain unchanged.", + "The reader completes during an ordinary row writer lock; it can still wait on other database resources or DDL. No sustained throughput or deployment-capacity validation.", + "Legacy reader and command elapsed times include lock waiting; legacy also loads a different, full universe. Do not use these timings as a controlled page-speed comparison.", + "The parent correction and worker confirmation/replay are real common-core commands inside outer transactions that are rolled back. The original pending proposal remains undecided.", + "Authorization and facts are checked within a per-request snapshot; a concurrent revocation becomes visible to later requests. No frozen snapshot across human navigation." + ], + "new_rights": false, + "operational_migration": false, + "native_activation": false, + "publication": false, + "checkpoint": false, + "six_pending_associations_untouched": true, + "blocked_cache_untouched": true, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/sourcing-composition-20261103.json b/docs/proofs/sourcing-composition-20261103.json new file mode 100644 index 0000000..e8dd839 --- /dev/null +++ b/docs/proofs/sourcing-composition-20261103.json @@ -0,0 +1,340 @@ +{ + "date": "2026-11-03T10:54:23.783Z", + "increment": "SGF-SOURCING-TO-RECEIPT-QA-v1", + "functional_code": true, + "passed": true, + "checks": 74, + "tests": { + "workflow": { + "file": "private/receipt-composition-d6580e15525e/sourcing-result.json", + "sha256": "2e31bc60819b08b829ab2127db09b6c51ad15418511c256f047a8c744fcc4914", + "checks": 47, + "result": { + "passed": true, + "checks": [ + "source starts with no proposal evaluation or adjudication", + "only mapped approved source request is listed", + "functional sourcing workspace is served", + "warehouse cannot access supplier comparison", + "another tenant process is refused", + "stale SGF context is refused", + "original quotation pricing supplies the preview total", + "preview savepoint commits no proposal evaluation budget or audit records", + "tampered preview is refused", + "failure to record the command receipt fails the confirmation", + "native proposal lines and audit roll back with the command receipt", + "two independent workers recover the same proposal command once", + "concurrent repetition creates one proposal and one line", + "same operation key with other contents is refused", + "explicit proposal registered 2", + "explicit proposal registered 3", + "missing evaluations cannot be bypassed to create an award", + "native evaluation preview available actor/4", + "individual evaluation recorded actor/4", + "native evaluation preview available issuer/4", + "individual evaluation recorded issuer/4", + "native evaluation preview available actor/6", + "individual evaluation recorded actor/6", + "native evaluation preview available issuer/6", + "individual evaluation recorded issuer/6", + "native evaluation preview available actor/8", + "individual evaluation recorded actor/8", + "native evaluation preview available issuer/8", + "individual evaluation recorded issuer/8", + "original comparison identifies eligible top without choosing it", + "another key cannot create a second evaluation by the same person", + "selection right is revalidated at confirmation", + "chosen proposal starts original distinct award approval", + "selection repetition creates no second adjudication", + "proposal window closes after adjudication", + "historical proposal receipt remains recoverable after the window closes", + "award preparer cannot approve their own decision", + "distinct eligible head approves through original workflow", + "approval repetition preserves one recorded decision", + "adjudication created in SGF reaches order workflow without rebinding IDs", + "approved SGF adjudication issues one canonical order", + "warehouse receives the actual order created from SGF sourcing", + "proposal-to-adjudication-to-order-to-receipt path completes", + "complete path leaves exactly the intended business facts", + "one source-budget commitment without invoice payment or consumption", + "full append-only history is paginated on server", + "history pages are distinct and expose older evidence" + ], + "quotes": 3, + "evaluations": 6, + "awards": 1, + "approved_decisions": 1, + "orders": 1, + "receipts": 1, + "movements": 1, + "commit_minor": 10000, + "whole_selected_path_complete": true, + "concurrency_statuses": [ + 200, + 201 + ], + "preview_persistent_fingerprint_unchanged": true, + "rollback_recovery": true, + "original_controllers_and_workflows": true, + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "guards": { + "file": "private/receipt-composition-d6580e15525e/sourcing-guards.json", + "sha256": "0f96fef6d39490a8d41ac91446189e45f4d2453b203b3fc1bb1407092a5ce1c9", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "disabled sourcing runtime refuses before SQL", + "disabled sourcing preview refuses before validation or SQL", + "production cannot activate synthetic sourcing" + ], + "database_queries": 0, + "business_writes": 0 + } + }, + "dependency_integrity": { + "file": "private/receipt-composition-d6580e15525e/sourcing-loader.json", + "sha256": "a2b66b78dac4ba5e79d5c4cf634e52e19a8dca42acf7cc8e13745f90be5eb51d", + "checks": 6, + "result": { + "passed": true, + "checks": [ + "known dependency is verified before execution", + "altered dependency is refused", + "unverified code is never executed", + "unlisted dependency is refused", + "class path traversal is refused", + "other namespace loaders remain available" + ], + "business_writes": 0, + "reference_bundle_modified": false + } + }, + "demonstration": { + "file": "private/receipt-composition-2c8780f3686a/sourcing-demo-smoke.json", + "sha256": "42b649b1bdf6c2deeaa5cfa44c46fff3fd2161ecdcabdd7cecb497b12f492655", + "checks": 9, + "result": { + "passed": true, + "checks": [ + "demo starts without proposals evaluations awards orders receipts or movements", + "buyer can prepare but cannot select an incomplete comparison", + "sourcing workspace is live", + "head can inspect without preparing proposals or deciding a nonexistent award", + "warehouse cannot inspect economic sourcing", + "warehouse waits for an actual issued order", + "served sourcing script matches delivered source", + "no initial commitment was created", + "read-only smoke leaves all business evidence intact" + ], + "before": "5a996f537dfd27757bcb26de0cd4f19205a541bce95d20f23d08bc9f439c7bb3", + "after": "5a996f537dfd27757bcb26de0cd4f19205a541bce95d20f23d08bc9f439c7bb3", + "quotes": 0, + "evaluations": 0, + "awards": 0, + "orders": 0, + "receipts": 0, + "movements": 0, + "visual_review": false + } + }, + "assets": { + "file": "private/receipt-composition-2c8780f3686a/sourcing-demo-assets.json", + "sha256": "79b7728e0bb7ac4c70b19b02213704176d7f9329ac0545b1adecb756515845d0", + "checks": 3, + "result": { + "passed": true, + "checks": 3, + "assets": [ + { + "file": "assets/app-DWKiMKwL.js", + "sha256": "31910657398034b9f7b7117cea5423f715a2466edcec1adf694e0da18b81f662" + }, + { + "file": "assets/app-BLSNCrO7.css", + "sha256": "ad7650d0b0f7cc40783126a677d419b058f9f1494ae25f194c6d4b32f87ce657" + } + ], + "root_status": 200, + "visual_review": false + } + }, + "navigation": { + "file": "docs/proofs/sourcing-home-20261103.json", + "sha256": "77271a96e97931f82397fd546cff878dd9bfd2617dd35dbcd164122ef31a546f", + "checks": 6, + "result": { + "passed": true, + "checks": 6, + "names": [ + "scoped right and capability expose sourcing link", + "absent right hides sourcing link", + "foreign unit right hides sourcing link", + "disabled composition hides sourcing link", + "unit selection is required", + "order and receipt links remain available" + ], + "source": "resources/js/PurchasingHome.jsx", + "sha256": "4bf82dee96c7c9746524a09564ce495da18dc27be97db5d883eca0ba51d51daf", + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/SourcingController.php", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + }, + { + "file": "app/Modules/Purchasing/OrderController.php", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "file": "config/receipt_qa.php", + "sha256": "596fba70a4b0e97cdedbda351ccf0ce73ae86a5533c1259e19860c2146cd720c" + }, + { + "file": "routes/web.php", + "sha256": "ebf72e00906f32924b6e8b12c8b0f4538692b5e00f6cb9acc167b738fb39a6c3" + }, + { + "file": "app/Shared/Context/ModuleNavigation.php", + "sha256": "bc620bd4ff07c38d41f0dd27744718739c803e02dd15551c1327b5603c135da7" + }, + { + "file": "app/Modules/Identity/Services/IdentityWorkflow.php", + "sha256": "ad1b6386c95b1d2220751575067ced34f05a8a09c4d245fa48647e3d7c1aadae" + }, + { + "file": "resources/js/PurchasingHome.jsx", + "sha256": "4bf82dee96c7c9746524a09564ce495da18dc27be97db5d883eca0ba51d51daf" + }, + { + "file": "resources/views/sourcing-workspace.blade.php", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "file": "public/sourcing-workspace.mjs", + "sha256": "15ed768992dfd8858df65ce7fa41c733906875aec98b1c347169d83571cde52e" + }, + { + "file": "scripts/sourcing-host-setup.php", + "sha256": "44c600f68a851b62942a9387b97973cd35d10e4eef59c7286ba3b954f818cd1a" + }, + { + "file": "scripts/sourcing-composition-proof.php", + "sha256": "22c81eec6604cb8cb5ad519f67a0318799c9e220732ec492196f9215dc3cbcc4" + }, + { + "file": "scripts/sourcing-guard-proof.php", + "sha256": "8479cc3ec860603ce86f514d39a5ebe2ebbad8af70a69c2bedc2a2e10a06788c" + }, + { + "file": "scripts/sourcing-loader-proof.php", + "sha256": "2d32777fd4e083ada6caa88ba7dc47c02487c5976e1d90b13704a7c73df27105" + }, + { + "file": "scripts/sourcing-demo-smoke.php", + "sha256": "f96d1232b9815727c0c9ac80ff258b0b74b0eda5fd5a1eaf548732c14251377a" + }, + { + "file": "scripts/order-native-setup.php", + "sha256": "ace7c01ac7b99fded58c7c3480068b4921395ecc3275871d3f7a1ac459a3c9cf" + }, + { + "file": "scripts/receipt-composition-run.mjs", + "sha256": "b7513259e096638b4dfbde047d770853273aeee9332e54edcae32aaa3f4e95e6" + }, + { + "file": "scripts/receipt-composition-http.php", + "sha256": "7c45973af89e728905e365012dc78143e2e8d4681141b4f6e2a006d03f4c5506" + } + ], + "workflow_package": { + "native_sha256": "61f561aff98b84096c872b29e2ac10f6b187a541bc00f38adac3ab3da1c7ca3c", + "economic_sha256": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "original_sources": { + "app/Http/Controllers/QuotationController.php": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "app/Services/ProposalComparison.php": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "app/Services/PurchaseWorkflow.php": "84f9db1286058087ecb8cf08c64fcd3afc94c91d1509b985b634a3fcafd81295" + } + }, + "preview": { + "mode": "native_commands_in_rollback_only_savepoint", + "persistent_records_unchanged": true, + "sequence_values_may_advance": true, + "external_sends": false + }, + "demo": { + "url": "http://127.0.0.1:8066/qa/enter/actor?open=1", + "reviewer_url": "http://127.0.0.1:8066/qa/enter/issuer?open=1", + "warehouse_url": "http://127.0.0.1:8066/qa/enter/validator?open=1", + "initial_quotes": 0, + "initial_evaluations": 0, + "initial_awards": 0, + "initial_orders": 0, + "initial_receipts": 0, + "initial_movements": 0, + "initial_reserved_minor": 10000 + }, + "qa_rights": [ + "purchasing_sourcing.view", + "purchasing_sourcing.prepare", + "purchasing_sourcing.evaluate", + "purchasing_sourcing.select", + "purchasing_sourcing.approve" + ], + "diagnostics": { + "initial_demo_smoke_timeout_preserved": true, + "location": "original all-file runtime package verification, before workflow", + "correction": "pinned manifest plus content verification before each dependency loads; complete artefact fingerprint verified by this summarizer", + "business_workflow_47_not_repeated": true + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/order-composition-20261103.json", + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3" + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "old_demo_bundles_intact": true, + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "real_rights_changed": false, + "existing_demos_written": false, + "purchasing_activated_at_destination": false, + "publication": false, + "checkpoint": false + }, + "limitations": [ + "Entry remains an approved native QA requisition with three synthetic source suppliers; no silent transfer from SGF internal requisitions or second host budget.", + "Registration/evaluation/selection/approval use the original controller and workflows; no automatic supplier or score choices.", + "Selected scenario three proposals100/120/140MZN, zero tax, two individual evaluators; formal tender regimes, later corrections/cancellations and real fiscal policy are not declared validated.", + "Rollback preview can consume nontransactional sequence values, but commits no quote/evaluation/award/audit/budget record; restricted to owned QA databases.", + "Dependency loading integrity is proved; this does not validate sustained load, all source modules, long-lived workers or owner/runtime deployment separation.", + "Source selector exposes at most100 configured suppliers; process index/history are server-paginated.", + "No visual review or deployment capacity validation." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/sourcing-home-20261103.json b/docs/proofs/sourcing-home-20261103.json new file mode 100644 index 0000000..ee78ac5 --- /dev/null +++ b/docs/proofs/sourcing-home-20261103.json @@ -0,0 +1,15 @@ +{ + "passed": true, + "checks": 6, + "names": [ + "scoped right and capability expose sourcing link", + "absent right hides sourcing link", + "foreign unit right hides sourcing link", + "disabled composition hides sourcing link", + "unit selection is required", + "order and receipt links remain available" + ], + "source": "resources/js/PurchasingHome.jsx", + "sha256": "4bf82dee96c7c9746524a09564ce495da18dc27be97db5d883eca0ba51d51daf", + "visual_review": false +} diff --git a/docs/proofs/stock-composed-flow-20261103.json b/docs/proofs/stock-composed-flow-20261103.json new file mode 100644 index 0000000..5016fd5 --- /dev/null +++ b/docs/proofs/stock-composed-flow-20261103.json @@ -0,0 +1,776 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "6cb7362c50f76d8a62b0b228916f29bfb9f15fd49b42ded5f7cbdff1041c7555", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "fd02da1a69f76bf1412f86f43095a0a476de49fbb7d2676a51fe3b29ec66e298", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_screen", + "repository": "sgf", + "path": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_screen", + "repository": "sgf", + "path": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "73a73bc3f33fede454d40ab7506274ec5128c317e4fc0cbc38fa3808bc6be074", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_workspace", + "repository": "sgf", + "path": "app/Modules/Purchasing/WorkspaceNavigation.php", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_navigation", + "repository": "sgf", + "path": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_picker", + "repository": "sgf", + "path": "public/supplier-picker-model.mjs", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_search_ui", + "repository": "sgf", + "path": "public/sourcing-workspace.mjs", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/DossierController.php", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_screen", + "repository": "sgf", + "path": "resources/views/purchasing-dossier.blade.php", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_ui", + "repository": "sgf", + "path": "public/purchasing-dossier.mjs", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_catalogue", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptCatalogue.php", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_workspace_ui", + "repository": "sgf", + "path": "public/receipt-workspace.mjs", + "sha256": "86421d30dc9868b10da2153f8bf0b50d9904ab5ccccbf9813464083ae1e20bd2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentsController.php", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_storage", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_ui", + "repository": "sgf", + "path": "public/supplier-documents.mjs", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_process_navigation", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessNavigation.php", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_focus", + "repository": "sgf", + "path": "public/purchasing-focus.mjs", + "sha256": "434319b8de23f5d6892666bd53232d463a0d458fe948cc6d7b476ad1228fafb6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stage_history", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessHistory.php", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_workspace_ui", + "repository": "sgf", + "path": "public/supplier-invoice-workspace.mjs", + "sha256": "a05b4f56151b8bc9735a0ba2ce47b475e22623aabb8be99a98290860efd6ae9e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_workspace_ui", + "repository": "sgf", + "path": "public/supplier-obligation-workspace.mjs", + "sha256": "7f5c8ca11ad603e55c408356c7fb2a46782662d0107caffedcd9d4966a9163e7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_history_ui", + "repository": "sgf", + "path": "public/request-history.mjs", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_workspace_ui", + "repository": "sgf", + "path": "public/request-workspace.mjs", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_matching_progress", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceMatchingProgress.php", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_matching_ui", + "repository": "sgf", + "path": "public/invoice-matching.mjs", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_evidence_ui", + "repository": "sgf", + "path": "public/obligation-evidence.mjs", + "sha256": "c47a75e69d8ea767bc7e07e6fe5fa924fcc4fbd1bd1a90f526ecf255eb2e6fb5", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_composed_stock_read", + "repository": "sgf", + "path": "app/Modules/Inventory/CompositionStockRead.php", + "sha256": "cf4a954c460226d58ae8478a23f26744b39affa12054b6299e1958488a411788", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. A subsequent scope fix filters request/sourcing audit events in SQL before limits/counts/pages, closing an alternate downstream financial-history exposure without changing original audit or writers. Empty initial supplier searches now survive middleware normalisation while closed-award and permission guards remain. Completed canonical history book is reused read-only with142 tables/sequences intact. Demo8080 removes the direct request-history25-event cap using bounded cursor pages25/100, own-stage SQL filtering and encrypted request/actor/context/size-bound cursors with600-second lifetime. Initial page is reused; history refresh does not reset unsaved request fields.127 original event ids traverse once despite a new head note; refresh includes128. Audit-volume fixtures are not operational request revisions. An inherited100MZN order setup was preserved and removed from future history harness runs. This is not a persistent MVCC snapshot, visual acceptance, sustained-load or deployment validation." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Demo8079 fixes the actual form-to-picker binding and blank initial article search. DOM-to-real-HTTP proof selects an article, transmits its revision, previews, confirms1UN and recovers a deliberately lost response with201/200, one receipt/movement. This is not browser visual acceptance or a new concurrency/load trial. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending. The integrated Purchasing QA host now observes the same physical book through a SELECT-only Stock role, explicit warehouse mapping and existing React reader (demo8083). Operational installation and real bindings remain pending; no additional valuation or availability is supplied." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8081 exposes per-line ordered/accepted/returned/reversed/validated/pending/remaining quantities using two aggregate fact queries and original correction values. Pending documents do not reserve quantity; overlap is a read warning, not a replacement for native validation. Two completed QA books are reused read-only with all tables/sequences unchanged. The display revision uses one original state observation before capability decoration; mutation/state definitions are unchanged. Full dependency materialisation, large invoice-history scaling, visual review, sustained load and deployment remain pending." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8082 separates evidence browsing from an explicitly selected proposal decision. Reason and preview survive pagination; changed observed source/actor/permissions invalidate old forms, and late reads/previews cannot reactivate them. Temporary read failure preserves the form; in-flight operations prevent selection changes.26 new simulated-UI/demo checks reuse72 native authority checks without repetition. Controller/runtime/kernel and legacy evidence branch are unchanged. No new real confirmation, financial writer, backend pagination protocol, visual/load or deployment validation." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/stock-composed-matrix-20261103.json b/docs/proofs/stock-composed-matrix-20261103.json new file mode 100644 index 0000000..ada37f7 --- /dev/null +++ b/docs/proofs/stock-composed-matrix-20261103.json @@ -0,0 +1,2534 @@ +{ + "date": "2026-11-03T19:58:48.383Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "6cb7362c50f76d8a62b0b228916f29bfb9f15fd49b42ded5f7cbdff1041c7555", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "1cb75d7bc03105e0df4211b4470bdc8837f4a659bc65318286228949779d9dc6" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_workspace", + "file": "app/Modules/Purchasing/WorkspaceNavigation.php", + "repository": "sgf", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1" + }, + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_navigation", + "file": "resources/views/partials/purchasing-navigation.blade.php", + "repository": "sgf", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_picker", + "file": "public/supplier-picker-model.mjs", + "repository": "sgf", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_search_ui", + "file": "public/sourcing-workspace.mjs", + "repository": "sgf", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "15ed768992dfd8858df65ce7fa41c733906875aec98b1c347169d83571cde52e" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_controller", + "file": "app/Modules/Purchasing/DossierController.php", + "repository": "sgf", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_screen", + "file": "resources/views/purchasing-dossier.blade.php", + "repository": "sgf", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_ui", + "file": "public/purchasing-dossier.mjs", + "repository": "sgf", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_documents", + "file": "app/Modules/Purchasing/SupplierDocumentsController.php", + "repository": "sgf", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_document_storage", + "file": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "repository": "sgf", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "a8c7fbe18d9ccd6a7e6fd27275e8827ac6a75f4b147ec02b06fabc30a15f29c8" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_document_ui", + "file": "public/supplier-documents.mjs", + "repository": "sgf", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "70e96bc60238efe6bb8a65297f7412fee9abb143dd96805713bb1deafc784820" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_process_navigation", + "file": "app/Modules/Purchasing/ProcessNavigation.php", + "repository": "sgf", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_focus", + "file": "public/purchasing-focus.mjs", + "repository": "sgf", + "sha256": "434319b8de23f5d6892666bd53232d463a0d458fe948cc6d7b476ad1228fafb6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "77a18d186c8ebb5065cf60816b7fd8d11a37fe801296a60f06ff0a6cf590b2e4" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "434319b8de23f5d6892666bd53232d463a0d458fe948cc6d7b476ad1228fafb6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stage_history", + "file": "app/Modules/Purchasing/ProcessHistory.php", + "repository": "sgf", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_history_ui", + "file": "public/request-history.mjs", + "repository": "sgf", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_workspace_ui", + "file": "public/request-workspace.mjs", + "repository": "sgf", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "e878fc3c7bc5ba24aa2b17fe41ffeda3267721b5beb2a1a3a0cb11f56d7dc93d" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "384c67310d2a7adab7a94273bab385dff74af76c293622bb3c0d087245d7e6d8" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-search-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 51 + } + ], + "sha256": "388e738da7e9b3e7f521c8d67f85dd4ef34869c74daf0c04c09067b9fbde5242", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 52 + } + ], + "sha256": "d5709128ee45b7ee1397695b06502b9386dccd13779203c13abbd54281552068", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-history-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 36 + } + ], + "sha256": "564e0fdbc6a7a1142e72dbf835a96dadf0363d3dc963fc4cdc0a40bd05b8c26e", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. A subsequent scope fix filters request/sourcing audit events in SQL before limits/counts/pages, closing an alternate downstream financial-history exposure without changing original audit or writers. Empty initial supplier searches now survive middleware normalisation while closed-award and permission guards remain. Completed canonical history book is reused read-only with142 tables/sequences intact. Demo8080 removes the direct request-history25-event cap using bounded cursor pages25/100, own-stage SQL filtering and encrypted request/actor/context/size-bound cursors with600-second lifetime. Initial page is reused; history refresh does not reset unsaved request fields.127 original event ids traverse once despite a new head note; refresh includes128. Audit-volume fixtures are not operational request revisions. An inherited100MZN order setup was preserved and removed from future history harness runs. This is not a persistent MVCC snapshot, visual acceptance, sustained-load or deployment validation.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "7ed4b9292e214b11c42af1eae3fb63d967a7e15f026648c957f8a5b54f211f69" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "51a0fa060fcce212646cf22332df352d90a5994cb7785eedc789585e02569616" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "40e7db8ac3d47b60f46fb5b8c623dec9ff9716bc9f2e1ea400d0751f0d0cf890" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_catalogue", + "file": "app/Modules/Purchasing/ReceiptCatalogue.php", + "repository": "sgf", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_workspace_ui", + "file": "public/receipt-workspace.mjs", + "repository": "sgf", + "sha256": "86421d30dc9868b10da2153f8bf0b50d9904ab5ccccbf9813464083ae1e20bd2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "f286a99bb0df5c6080e8104d501707e5a9e13046d5dd7144dec32bf0817a92a0" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "10b412a5ec6c973152f165b34caacc685e25bcf2eb0e6ba2f7f7e58df4e1f00a" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "a128926d876ae10eb2a17ec2410ba99282d782f03bb9642cbdcad93d548ce002" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "f0f242538e4131910d612da1f5b22e4955f3bdc58d4c4121d7b1242a5eb52df5" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "86421d30dc9868b10da2153f8bf0b50d9904ab5ccccbf9813464083ae1e20bd2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_documents", + "file": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "repository": "sgf", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_composed_stock_read", + "file": "app/Modules/Inventory/CompositionStockRead.php", + "repository": "sgf", + "sha256": "cf4a954c460226d58ae8478a23f26744b39affa12054b6299e1958488a411788", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-composed-source-20261103.json", + "sha256": "cf4a954c460226d58ae8478a23f26744b39affa12054b6299e1958488a411788" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-workspace-completion-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "59bb66df5d5e12f898045669a0ad24664c3d09f2d3ab6cf70f4f13d6a34c6548", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 58 + } + ], + "sha256": "b820a6b355450a79c9f244ce8eb6950e7c1cbe4427bf85bca772fb0fc5c085d2", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-composed-source-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "c778460afde5e571b58a4bf04d105ed8af0eb66b4b1725693f07da542e10d17e", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Demo8079 fixes the actual form-to-picker binding and blank initial article search. DOM-to-real-HTTP proof selects an article, transmits its revision, previews, confirms1UN and recovers a deliberately lost response with201/200, one receipt/movement. This is not browser visual acceptance or a new concurrency/load trial. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "fd02da1a69f76bf1412f86f43095a0a476de49fbb7d2676a51fe3b29ec66e298", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + }, + { + "proof": "docs/proofs/stock-composed-source-20261103.json", + "sha256": "fd02da1a69f76bf1412f86f43095a0a476de49fbb7d2676a51fe3b29ec66e298" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_composed_stock_read", + "file": "app/Modules/Inventory/CompositionStockRead.php", + "repository": "sgf", + "sha256": "cf4a954c460226d58ae8478a23f26744b39affa12054b6299e1958488a411788", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-composed-source-20261103.json", + "sha256": "cf4a954c460226d58ae8478a23f26744b39affa12054b6299e1958488a411788" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-composed-source-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "c778460afde5e571b58a4bf04d105ed8af0eb66b4b1725693f07da542e10d17e", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending. The integrated Purchasing QA host now observes the same physical book through a SELECT-only Stock role, explicit warehouse mapping and existing React reader (demo8083). Operational installation and real bindings remain pending; no additional valuation or availability is supplied.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_invoice_controller", + "file": "app/Modules/Purchasing/InvoiceController.php", + "repository": "sgf", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa" + }, + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_invoice_screen", + "file": "resources/views/supplier-invoice-workspace.blade.php", + "repository": "sgf", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "396cea98bce6c2ccff510efd917e2f336ba29657ea5a8277116c41bd70c92e15" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_workspace_ui", + "file": "public/supplier-invoice-workspace.mjs", + "repository": "sgf", + "sha256": "a05b4f56151b8bc9735a0ba2ce47b475e22623aabb8be99a98290860efd6ae9e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "68671400153a97387f77ad0cddbc0f7f6367caeaebef8fc219d84fc8cf118eb3" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "5f0112c38e805fe9ed2e733053bae77f8dd4e3e1cb6b9cba8e4bc7bb469205d7" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "f767347371e2dc1573ec29a926509c87bcdea3ec09257a6b22395fc0cf01366f" + }, + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "a05b4f56151b8bc9735a0ba2ce47b475e22623aabb8be99a98290860efd6ae9e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_matching_progress", + "file": "app/Modules/Purchasing/InvoiceMatchingProgress.php", + "repository": "sgf", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_matching_ui", + "file": "public/invoice-matching.mjs", + "repository": "sgf", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/invoice-matching-progress-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 47 + } + ], + "sha256": "6920219ec33e09abc951c10d8d862e87495b99cd77162f3aea729dcca597b66c", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8081 exposes per-line ordered/accepted/returned/reversed/validated/pending/remaining quantities using two aggregate fact queries and original correction values. Pending documents do not reserve quantity; overlap is a read warning, not a replacement for native validation. Two completed QA books are reused read-only with all tables/sequences unchanged. The display revision uses one original state observation before capability decoration; mutation/state definitions are unchanged. Full dependency materialisation, large invoice-history scaling, visual review, sustained load and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_obligation_controller", + "file": "app/Modules/Purchasing/ObligationController.php", + "repository": "sgf", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_screen", + "file": "resources/views/supplier-obligation-workspace.blade.php", + "repository": "sgf", + "sha256": "73a73bc3f33fede454d40ab7506274ec5128c317e4fc0cbc38fa3808bc6be074", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "cbcef35273b6f54158f60b67f9c2b64c0a93e47cb01ca302b525479ce051e927" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "ce0dc4159d42efcff9e09ec99a2ce5a2d378a215d4a853a37417a0ebf5445506" + }, + { + "proof": "docs/proofs/obligation-evidence-workspace-20261103.json", + "sha256": "73a73bc3f33fede454d40ab7506274ec5128c317e4fc0cbc38fa3808bc6be074" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_workspace_ui", + "file": "public/supplier-obligation-workspace.mjs", + "repository": "sgf", + "sha256": "7f5c8ca11ad603e55c408356c7fb2a46782662d0107caffedcd9d4966a9163e7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "eeb450e38dad72d9c38538ed363202d0a6cfcec466c61171028108f1bc243837" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "8f5154636553130f950d09b46ff917f91250516e10a03e93971cbe537c67f082" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "c2608e3cab7cd1810437a3a978e6f6ccbf2600a83dd0a39bd38510db8249f551" + }, + { + "proof": "docs/proofs/obligation-evidence-workspace-20261103.json", + "sha256": "7f5c8ca11ad603e55c408356c7fb2a46782662d0107caffedcd9d4966a9163e7" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_evidence_ui", + "file": "public/obligation-evidence.mjs", + "repository": "sgf", + "sha256": "c47a75e69d8ea767bc7e07e6fe5fa924fcc4fbd1bd1a90f526ecf255eb2e6fb5", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/obligation-evidence-workspace-20261103.json", + "sha256": "c47a75e69d8ea767bc7e07e6fe5fa924fcc4fbd1bd1a90f526ecf255eb2e6fb5" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 72 + } + ], + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/obligation-evidence-workspace-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 26 + } + ], + "sha256": "fa510ee89931c34d6d9483a6d8f362055a953567f2087ebb1c97ad6bb4c2e117", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8082 separates evidence browsing from an explicitly selected proposal decision. Reason and preview survive pagination; changed observed source/actor/permissions invalidate old forms, and late reads/previews cannot reactivate them. Temporary read failure preserves the form; in-flight operations prevent selection changes.26 new simulated-UI/demo checks reuse72 native authority checks without repetition. Controller/runtime/kernel and legacy evidence branch are unchanged. No new real confirmation, financial writer, backend pagination protocol, visual/load or deployment validation.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/stock-composed-source-20261103.json b/docs/proofs/stock-composed-source-20261103.json new file mode 100644 index 0000000..7fc853c --- /dev/null +++ b/docs/proofs/stock-composed-source-20261103.json @@ -0,0 +1,200 @@ +{ + "date": "2026-11-03T19:58:28.833Z", + "increment": "SGF-STOCK-COMPOSED-SOURCE-QA-v1", + "passed": true, + "functional_code": true, + "checks": 41, + "tests": { + "integration": { + "file": "private/receipt-composition-306efac9b54b/composition-stock-result.json", + "sha256": "d34dc4f24658a9ee60b22454133901e312a61a7ee69242f66cb14701ad1a74a3", + "checks": 31, + "result": { + "passed": true, + "checks": [ + "composed stock starts with a genuine empty physical book", + "purchasing authority does not grant stock access", + "stock endpoint refuses Purchasing module context", + "another unit cannot inherit the source binding", + "foreign warehouse explicitly refused", + "page bounds and unknown filters rejected", + "stale HTTP context refused before source observation", + "catalogue uses bounded pages100 and remainder", + "pages25 cover the same tenant catalogue once without foreign articles", + "search preserves literal wildcard semantics", + "only explicitly mapped warehouse is visible", + "original receipt preview has no physical effect", + "original receipt confirmation creates exactly one native movement", + "receipt replay remains idempotent across the integration", + "new native movement invalidates an earlier stock snapshot", + "Stock reads the exact canonical receipt movement and rational quantity", + "stock projection exposes no raw document or financial snapshot", + "Stock derives physical balance without inventing availability or another writer", + "renewed session context invalidates prior pagination token", + "revoked stock grant is rechecked on every page", + "incompatible tenant warehouse mapping returns unavailable rather than a zero balance", + "valid private mapping recovers without changing the book", + "source authentication failure is generic and does not expose credentials", + "source authentication recovers with original profile", + "technical reader refuses DELETE outside its capability: stock_movements", + "technical reader refuses SELECT outside its capability: FROM", + "technical reader refuses SELECT outside its capability: FROM", + "technical reader refuses SELECT outside its capability: FROM", + "new QA append-only trigger preserves revision assumptions", + "Stock read does not acquire the native tenant writer mutex", + "integration leaves one receipt/movement and creates no invoice debt or payment" + ], + "same_native_book": true, + "receipts": 1, + "movements": 1, + "physical_milli": 1000, + "catalogue_rows": 103, + "page_sizes": [ + 25, + 100 + ], + "new_permission_names": [], + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "demo": { + "file": "private/receipt-composition-f9cc0b003f44/composition-stock-demo.json", + "sha256": "cc391717feafb476003d7cea912a2cc09693e2d610ecc683c16f1137a453e47f", + "checks": 10, + "result": { + "passed": true, + "checks": [ + "new demonstration begins without main operations or physical movements", + "existing SGF React shell is served in explicit Stock context", + "served existing React bundle matches the local manifest", + "same existing Stock reader observes the new empty source without inventing balances", + "existing session API exposes only the explicit QA stock grant", + "host authority lock contention fails boundedly with unavailable", + "read recovers after host authority lock release", + "direct adapter refuses disabled before accessing a source", + "direct adapter refuses production before accessing a source", + "demo reads preserve source metadata movements audit and grants" + ], + "before": "5cc47d46df72483fd340e074302ec914e9415a514e111ed9bd1e3a999f9133a5", + "after": "5cc47d46df72483fd340e074302ec914e9415a514e111ed9bd1e3a999f9133a5", + "direct_guard_probes": 2, + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Inventory/CompositionStockRead.php", + "sha256": "cf4a954c460226d58ae8478a23f26744b39affa12054b6299e1958488a411788" + }, + { + "file": "app/Modules/Inventory/StockReadController.php", + "sha256": "fd02da1a69f76bf1412f86f43095a0a476de49fbb7d2676a51fe3b29ec66e298" + }, + { + "file": "config/receipt_qa.php", + "sha256": "2dcfe6d9d25c7c467c22e2ea691cb7b71502bdb2b5967504e1b503446dc71cc0" + } + ], + "unchanged_authority_and_ui": [ + { + "file": "resources/js/StockReadWorkspace.jsx", + "sha256": "ab29ffa445cfd68f5a9a2542dd4c375bff38e9f9a28cbf1cc033c3ceb76ea7e4" + }, + { + "file": "resources/js/StockMenuWorkspace.jsx", + "sha256": "ddef528851f6c3ab19fa8c5b3a459d6bfb157df81616810cd7da2f049aebe6a4" + }, + { + "file": "resources/js/app.jsx", + "sha256": "48ebe87adaace5a91db105ae21088990d3636209bd3854545bad0e3a5a6d7c79" + }, + { + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + }, + { + "file": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df" + }, + { + "file": "packages/inventory-read/bootstrap.php", + "sha256": "65cba0924869ba93afa00a4786b361ad71d5c2e67bd021b3d1fda172b1190476" + }, + { + "file": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + }, + { + "file": "packages/inventory-read/src/InventoryReadSession.php", + "sha256": "e5ea1ec6771e34478367218d73ba1d1d90464ddc87d1c5fa3d679622ffb81111" + }, + { + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "pinned_native_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "behaviour": { + "same_native_receipt_book": true, + "no_balance_copy": true, + "separate_select_only_source_role": true, + "no_native_writer_mutex_on_read": true, + "shared_host_authority_locks": true, + "append_only_trigger_only_in_new_qa_books": true, + "snapshot_bound_to_session_context": true, + "explicit_warehouse_mapping": true, + "default_disabled": true + }, + "demo": { + "port": 8083, + "entry": "http://127.0.0.1:8083/qa/enter/validator?module=stock&open=1", + "navigate": "Stock > Existências", + "initial_main_requests": 0, + "initial_receipts": 0, + "initial_movements": 0 + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/obligation-evidence-workspace-20261103.json", + "sha256": "fa510ee89931c34d6d9483a6d8f362055a953567f2087ebb1c97ad6bb4c2e117" + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "new_permission_names": [], + "existing_qa_right": "stock.view", + "target_database_connected": false, + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "previous_demo_data_written": false, + "real_grants": false, + "publication": false, + "checkpoint": false + }, + "limitations": [ + "One minimal request/sourcing/order setup supplies the changed receipt-to-Stock boundary. Earlier suites are reused, not counted or repeated.", + "31 integration assertions and10 demo/guard assertions; two guards invoke the adapter directly and do not measure middleware.", + "The first integration attempt stopped on a denial-status assertion: module isolation returned409 before the stock permission check. The completed source order was reused; no second order was issued.", + "Existing Stock React UI, navigation and shared reader are unchanged; served asset checks are not visual review.", + "Tenant catalogue is tenant-wide; movements and warehouses are restricted to the explicitly mapped warehouses.", + "Only physical quantities are supplied. Available/reserved/blocked quantities, valuation, costing, financial effects and direct document access are not added.", + "Append-only SQL trigger and existing stock.view grant apply only to fresh QA fixtures. No target schema or installed operational binding was changed.", + "No sustained load, deployment compatibility or deployment capacity claim follows from these tests." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/stock-ledger-menu-final-20261103.json b/docs/proofs/stock-ledger-menu-final-20261103.json new file mode 100644 index 0000000..c7f28c5 --- /dev/null +++ b/docs/proofs/stock-ledger-menu-final-20261103.json @@ -0,0 +1,7 @@ +{ + "passed": true, + "checks": 5, + "react_static_render": true, + "actual_browser": false, + "existing_other_composition_route_preserved": true +} \ No newline at end of file diff --git a/docs/proofs/stock-ledger-ui-20261103.json b/docs/proofs/stock-ledger-ui-20261103.json new file mode 100644 index 0000000..2c138b1 --- /dev/null +++ b/docs/proofs/stock-ledger-ui-20261103.json @@ -0,0 +1,9 @@ +{ + "passed": true, + "checks": 15, + "node_vm_and_react_render": true, + "actual_browser": false, + "no_automatic_command_retry": true, + "stale_receipt_responses_discarded": true, + "sgf_scoped_navigation": true +} \ No newline at end of file diff --git a/docs/proofs/stock-period-batches-20261103.json b/docs/proofs/stock-period-batches-20261103.json new file mode 100644 index 0000000..9d64329 --- /dev/null +++ b/docs/proofs/stock-period-batches-20261103.json @@ -0,0 +1,267 @@ +{ + "date": "2026-11-03T09:02:14.091Z", + "increment": "STOCK-PERIOD-BATCH-v1", + "functional_code": true, + "passed": true, + "checks": 33, + "tests": { + "period": { + "file": "private/stock-period-7339827e3722/period-batches.json", + "sha256": "af75f4c914761af74f20ad091d12761a1b7a033a28c3056582586338fb7bcfa8", + "result": { + "passed": true, + "checks": [ + "closed native three-movement period remains byte-equivalent and complete", + "existing native read-only transaction remains owned by caller", + "equivalent complete period with sparse physical IDs at 0", + "bounded movements and joint projected status at 0", + "equivalent complete period with sparse physical IDs at 1", + "bounded movements and joint projected status at 1", + "equivalent complete period with sparse physical IDs at 100", + "bounded movements and joint projected status at 100", + "equivalent complete period with sparse physical IDs at 101", + "bounded movements and joint projected status at 101", + "equivalent complete period with sparse physical IDs at 205", + "bounded movements and joint projected status at 205", + "missing last journal is pending in both readers", + "missing current journal cannot close the period", + "null projected revision retains pending semantics", + "null current revision is refused", + "other unit cannot supply current or prior accounting evidence", + "other unit leaves the physical fact pending", + "period excludes another tenant_id", + "period excludes another company_id", + "period excludes another unit_id", + "read permission refusal ends owned transaction", + "rejected rate remains pending rather than silently accepted", + "all affected rate-dependent facts remain pending", + "caller write transaction remains usable and caller-owned", + "caller rollback restores metadata probe", + "standalone period owns one consistent read-only repeatable-read snapshot" + ], + "observations": [ + { + "records": 0, + "before": { + "result": { + "facts": 0, + "pending": 0, + "hash": "d57df689684fdddf5992b3b9c8540d437b74a1801781787b63d3495a4ad2cf53" + }, + "queries": 4, + "movement_batch_rows": 0, + "joint_status_queries": 0, + "full_journal_reads": 0 + }, + "after": { + "result": { + "facts": 0, + "pending": 0, + "hash": "d57df689684fdddf5992b3b9c8540d437b74a1801781787b63d3495a4ad2cf53" + }, + "queries": 8, + "movement_batch_rows": 0, + "joint_status_queries": 0, + "full_journal_reads": 0 + } + }, + { + "records": 1, + "before": { + "result": { + "facts": 1, + "pending": 0, + "hash": "96b59ec1f5e2b4e328d784fcbd0ed35d0ac103be50e2900844b6e7aac3b3456c" + }, + "queries": 19, + "movement_batch_rows": 0, + "joint_status_queries": 0, + "full_journal_reads": 1 + }, + "after": { + "result": { + "facts": 1, + "pending": 0, + "hash": "96b59ec1f5e2b4e328d784fcbd0ed35d0ac103be50e2900844b6e7aac3b3456c" + }, + "queries": 23, + "movement_batch_rows": 0, + "joint_status_queries": 1, + "full_journal_reads": 0 + } + }, + { + "records": 100, + "before": { + "result": { + "facts": 100, + "pending": 0, + "hash": "41aef49b000c27f9d9a0581b8f6705aa79889164c80b9949ebfc086317ac36b6" + }, + "queries": 1702, + "movement_batch_rows": 0, + "joint_status_queries": 0, + "full_journal_reads": 100 + }, + "after": { + "result": { + "facts": 100, + "pending": 0, + "hash": "41aef49b000c27f9d9a0581b8f6705aa79889164c80b9949ebfc086317ac36b6" + }, + "queries": 1608, + "movement_batch_rows": 0, + "joint_status_queries": 1, + "full_journal_reads": 0 + } + }, + { + "records": 101, + "before": { + "result": { + "facts": 101, + "pending": 0, + "hash": "a013dac907764fecd1aa55393147b984a13dbd26f3236350891824375ab1b2b3" + }, + "queries": 1719, + "movement_batch_rows": 0, + "joint_status_queries": 0, + "full_journal_reads": 101 + }, + "after": { + "result": { + "facts": 101, + "pending": 0, + "hash": "a013dac907764fecd1aa55393147b984a13dbd26f3236350891824375ab1b2b3" + }, + "queries": 1625, + "movement_batch_rows": 0, + "joint_status_queries": 2, + "full_journal_reads": 0 + } + }, + { + "records": 205, + "before": { + "result": { + "facts": 205, + "pending": 0, + "hash": "f57d06fb1568f988ae71066a001f844158f153cbe9934bfa3e20153e80665f35" + }, + "queries": 3487, + "movement_batch_rows": 0, + "joint_status_queries": 0, + "full_journal_reads": 205 + }, + "after": { + "result": { + "facts": 205, + "pending": 0, + "hash": "f57d06fb1568f988ae71066a001f844158f153cbe9934bfa3e20153e80665f35" + }, + "queries": 3291, + "movement_batch_rows": 0, + "joint_status_queries": 3, + "full_journal_reads": 0 + } + } + ], + "metadata_fixture_only": true, + "new_financial_effects": 0, + "existing_native_period_read_only": true, + "deployment_capacity_validated": false + } + }, + "concurrency": { + "file": "private/stock-period-7339827e3722/period-concurrency.json", + "sha256": "396b8e137ada6b13089fdb6686c7dabe6934619e2363062ba77d91d005f0091c", + "result": { + "passed": true, + "checks": [ + "metadata period is complete before concurrent change", + "writer commits between batches without mixing snapshots in reader", + "next period read sees newly incomplete journal and refuses completeness", + "both independent connections end their owned transactions", + "only metadata mutation is restored after concurrent test", + "period concurrency leaves no prefix cursor open" + ], + "metadata_fixture_only": true, + "concurrent_writer_commits": 1, + "after_change_pending": 1, + "restored": true, + "new_financial_effects": 0, + "deployment_capacity_validated": false + } + } + }, + "sources": [ + { + "file": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + }, + { + "file": "scripts/stock-ledger-entry.php", + "sha256": "b5a39371a2b9abefeea5088a6847995aa019face9403f8516eafeebd8aa1adb1" + }, + { + "file": "scripts/stock-period-proof.php", + "sha256": "8e7b7eb62543034d1bac1e4dca33e6c67e606f60b0976217f00600e8c088c01d" + }, + { + "file": "scripts/stock-period-concurrency.php", + "sha256": "ad17347dc1e2f62028160ac99812c511317a2de45226ed9a738f82ba5a475b37" + }, + { + "file": "scripts/summarize-stock-period.mjs", + "sha256": "776061352685a588ab128d9d34815c93c87ade717b84b04df93dac7cffe897f0" + } + ], + "reference": { + "original_source_sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323", + "private_baseline_sha256": "f7baae8c34d947ee629553b2281fb13590a807763bc92317ac4551551d59a389" + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998" + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e" + } + ], + "preservation": { + "frozen_demo_bundle_sha256": "8b3ad1c600b84c8526b2d9f453a1c5c4e174a69d6acc78ace2af4f52a25dd762", + "existing_native_period_consulted_read_only": true, + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "existing_rights_changed": false, + "new_financial_effects": 0, + "indices_added": false, + "publication": false, + "purchasing_activation": false + }, + "limitations": [ + "Metadata fixtures at0/1/100/101/205 are not business postings or a sustained load test.", + "Only final-status SQL counts are compared; the raw queries counter instruments Connection.select calls, not all SQL or cursor executions. No elapsed-time, memory, throughput or deployment measurements.", + "Only final journal status is batched; per-source prior-prefix validation remains and may dominate total work.", + "Existing caller transactions retain their own isolation level; standalone period reads use repeatable read read only.", + "Frozen demos remain unchanged; visual review, full-page batching, sustained concurrency and deployment remain pending." + ], + "diagnostics": { + "incomplete_attempts_preserved": 3, + "causes": [ + "Instrumentation initially counted an EXISTS probe as a full snapshot read.", + "Test harness initially mixed transaction bookkeeping of two connection wrappers sharing one PDO.", + "Instrumented connection initially had no event dispatcher for the final isolation assertion." + ] + } +} diff --git a/docs/proofs/stock-period-flow-20261103.json b/docs/proofs/stock-period-flow-20261103.json new file mode 100644 index 0000000..585679e --- /dev/null +++ b/docs/proofs/stock-period-flow-20261103.json @@ -0,0 +1,818 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "4c771a9bf3dc5293fe578fd7be2161a948ff9507bafec051da4f99cccbff61f7", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "fd02da1a69f76bf1412f86f43095a0a476de49fbb7d2676a51fe3b29ec66e298", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_screen", + "repository": "sgf", + "path": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_screen", + "repository": "sgf", + "path": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "73a73bc3f33fede454d40ab7506274ec5128c317e4fc0cbc38fa3808bc6be074", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_workspace", + "repository": "sgf", + "path": "app/Modules/Purchasing/WorkspaceNavigation.php", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_navigation", + "repository": "sgf", + "path": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_picker", + "repository": "sgf", + "path": "public/supplier-picker-model.mjs", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_search_ui", + "repository": "sgf", + "path": "public/sourcing-workspace.mjs", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/DossierController.php", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_screen", + "repository": "sgf", + "path": "resources/views/purchasing-dossier.blade.php", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_ui", + "repository": "sgf", + "path": "public/purchasing-dossier.mjs", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_catalogue", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptCatalogue.php", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_workspace_ui", + "repository": "sgf", + "path": "public/receipt-workspace.mjs", + "sha256": "5825d0f6965f55b9e5aee437d02f6664ff29e60f50d96ccec7b6498caad063bd", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentsController.php", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_storage", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_ui", + "repository": "sgf", + "path": "public/supplier-documents.mjs", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_process_navigation", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessNavigation.php", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_focus", + "repository": "sgf", + "path": "public/purchasing-focus.mjs", + "sha256": "4faeed00b7d9c5de99932a633f4bd7ff4a0f61bc7aa5afcf9a7ff5b1aebc34b8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stage_history", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessHistory.php", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_workspace_ui", + "repository": "sgf", + "path": "public/supplier-invoice-workspace.mjs", + "sha256": "a05b4f56151b8bc9735a0ba2ce47b475e22623aabb8be99a98290860efd6ae9e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_workspace_ui", + "repository": "sgf", + "path": "public/supplier-obligation-workspace.mjs", + "sha256": "7f5c8ca11ad603e55c408356c7fb2a46782662d0107caffedcd9d4966a9163e7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_history_ui", + "repository": "sgf", + "path": "public/request-history.mjs", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_workspace_ui", + "repository": "sgf", + "path": "public/request-workspace.mjs", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_matching_progress", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceMatchingProgress.php", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_matching_ui", + "repository": "sgf", + "path": "public/invoice-matching.mjs", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_evidence_ui", + "repository": "sgf", + "path": "public/obligation-evidence.mjs", + "sha256": "c47a75e69d8ea767bc7e07e6fe5fa924fcc4fbd1bd1a90f526ecf255eb2e6fb5", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_composed_stock_read", + "repository": "sgf", + "path": "app/Modules/Inventory/CompositionStockRead.php", + "sha256": "01c558457df290879bdf6c7f8de8cd9efccad81b940731f0aaf2489cf02bfcf7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_receipt_trace", + "repository": "sgf", + "path": "app/Modules/Purchasing/StockReceiptTraceController.php", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_receipt_transition", + "repository": "sgf", + "path": "resources/js/stock-receipt-trace.js", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_receipt_focus", + "repository": "sgf", + "path": "public/stock-receipt-focus.mjs", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_period_projection", + "repository": "sgf", + "path": "app/Modules/Inventory/StockPeriodReport.php", + "sha256": "d491541c6c60bc0c661dc442b8db8ce2e757f1d63dfc4982a3631f820cfb7a06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_period_ui", + "repository": "sgf", + "path": "resources/js/StockPeriodReportWorkspace.jsx", + "sha256": "a03fa2fde5f7cc17cff4349d87feffe465888cea77bc0dfa62029bc92755ccbd", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_period_request", + "repository": "sgf", + "path": "resources/js/stock-period-request.js", + "sha256": "bfa2644100ee89e83c005c339b5110ce41cb090c843423b356e8098b76baebda", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. A subsequent scope fix filters request/sourcing audit events in SQL before limits/counts/pages, closing an alternate downstream financial-history exposure without changing original audit or writers. Empty initial supplier searches now survive middleware normalisation while closed-award and permission guards remain. Completed canonical history book is reused read-only with142 tables/sequences intact. Demo8080 removes the direct request-history25-event cap using bounded cursor pages25/100, own-stage SQL filtering and encrypted request/actor/context/size-bound cursors with600-second lifetime. Initial page is reused; history refresh does not reset unsaved request fields.127 original event ids traverse once despite a new head note; refresh includes128. Audit-volume fixtures are not operational request revisions. An inherited100MZN order setup was preserved and removed from future history harness runs. This is not a persistent MVCC snapshot, visual acceptance, sustained-load or deployment validation." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Demo8079 fixes the actual form-to-picker binding and blank initial article search. DOM-to-real-HTTP proof selects an article, transmits its revision, previews, confirms1UN and recovers a deliberately lost response with201/200, one receipt/movement. This is not browser visual acceptance or a new concurrency/load trial. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending. The integrated Purchasing QA host now observes the same physical book through a SELECT-only Stock role, explicit warehouse mapping and existing React reader (demo8083). Operational installation and real bindings remain pending; no additional valuation or availability is supplied. Demo8084 adds explicit Stock-to-Purchasing receipt evidence navigation for current receipt_in movements. The server resolves actual parent ids, current rights and scope; no inferred historical origin, business command or wider Stock reader grants. Existing Purchasing runtime locks remain; no new load/deployment claim. Demo8085 delivers a UTC-registration-period physical quantity report with opening/incoming/outgoing/closing per article/warehouse, exact numeric/text quantities, explicit dates and25/100 SQL pages. Five projection SELECTs at either page size;105 pairs are SQL fixtures, not workflow operations. No cross-unit total, valuation, availability, full export, sustained-load or deployment claim." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8081 exposes per-line ordered/accepted/returned/reversed/validated/pending/remaining quantities using two aggregate fact queries and original correction values. Pending documents do not reserve quantity; overlap is a read warning, not a replacement for native validation. Two completed QA books are reused read-only with all tables/sequences unchanged. The display revision uses one original state observation before capability decoration; mutation/state definitions are unchanged. Full dependency materialisation, large invoice-history scaling, visual review, sustained load and deployment remain pending." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8082 separates evidence browsing from an explicitly selected proposal decision. Reason and preview survive pagination; changed observed source/actor/permissions invalidate old forms, and late reads/previews cannot reactivate them. Temporary read failure preserves the form; in-flight operations prevent selection changes.26 new simulated-UI/demo checks reuse72 native authority checks without repetition. Controller/runtime/kernel and legacy evidence branch are unchanged. No new real confirmation, financial writer, backend pagination protocol, visual/load or deployment validation." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/stock-period-matrix-20261103.json b/docs/proofs/stock-period-matrix-20261103.json new file mode 100644 index 0000000..540fb67 --- /dev/null +++ b/docs/proofs/stock-period-matrix-20261103.json @@ -0,0 +1,2724 @@ +{ + "date": "2026-11-03T21:08:16.433Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "4c771a9bf3dc5293fe578fd7be2161a948ff9507bafec051da4f99cccbff61f7", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "1cb75d7bc03105e0df4211b4470bdc8837f4a659bc65318286228949779d9dc6" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_workspace", + "file": "app/Modules/Purchasing/WorkspaceNavigation.php", + "repository": "sgf", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1" + }, + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_navigation", + "file": "resources/views/partials/purchasing-navigation.blade.php", + "repository": "sgf", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_picker", + "file": "public/supplier-picker-model.mjs", + "repository": "sgf", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_search_ui", + "file": "public/sourcing-workspace.mjs", + "repository": "sgf", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "15ed768992dfd8858df65ce7fa41c733906875aec98b1c347169d83571cde52e" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_controller", + "file": "app/Modules/Purchasing/DossierController.php", + "repository": "sgf", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_screen", + "file": "resources/views/purchasing-dossier.blade.php", + "repository": "sgf", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_ui", + "file": "public/purchasing-dossier.mjs", + "repository": "sgf", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_documents", + "file": "app/Modules/Purchasing/SupplierDocumentsController.php", + "repository": "sgf", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_document_storage", + "file": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "repository": "sgf", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "a8c7fbe18d9ccd6a7e6fd27275e8827ac6a75f4b147ec02b06fabc30a15f29c8" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_document_ui", + "file": "public/supplier-documents.mjs", + "repository": "sgf", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "70e96bc60238efe6bb8a65297f7412fee9abb143dd96805713bb1deafc784820" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_process_navigation", + "file": "app/Modules/Purchasing/ProcessNavigation.php", + "repository": "sgf", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_focus", + "file": "public/purchasing-focus.mjs", + "repository": "sgf", + "sha256": "4faeed00b7d9c5de99932a633f4bd7ff4a0f61bc7aa5afcf9a7ff5b1aebc34b8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "77a18d186c8ebb5065cf60816b7fd8d11a37fe801296a60f06ff0a6cf590b2e4" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "434319b8de23f5d6892666bd53232d463a0d458fe948cc6d7b476ad1228fafb6" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_stage_history", + "file": "app/Modules/Purchasing/ProcessHistory.php", + "repository": "sgf", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_history_ui", + "file": "public/request-history.mjs", + "repository": "sgf", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_workspace_ui", + "file": "public/request-workspace.mjs", + "repository": "sgf", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "e878fc3c7bc5ba24aa2b17fe41ffeda3267721b5beb2a1a3a0cb11f56d7dc93d" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "384c67310d2a7adab7a94273bab385dff74af76c293622bb3c0d087245d7e6d8" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-search-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 51 + } + ], + "sha256": "388e738da7e9b3e7f521c8d67f85dd4ef34869c74daf0c04c09067b9fbde5242", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 52 + } + ], + "sha256": "d5709128ee45b7ee1397695b06502b9386dccd13779203c13abbd54281552068", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-history-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 36 + } + ], + "sha256": "564e0fdbc6a7a1142e72dbf835a96dadf0363d3dc963fc4cdc0a40bd05b8c26e", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. A subsequent scope fix filters request/sourcing audit events in SQL before limits/counts/pages, closing an alternate downstream financial-history exposure without changing original audit or writers. Empty initial supplier searches now survive middleware normalisation while closed-award and permission guards remain. Completed canonical history book is reused read-only with142 tables/sequences intact. Demo8080 removes the direct request-history25-event cap using bounded cursor pages25/100, own-stage SQL filtering and encrypted request/actor/context/size-bound cursors with600-second lifetime. Initial page is reused; history refresh does not reset unsaved request fields.127 original event ids traverse once despite a new head note; refresh includes128. Audit-volume fixtures are not operational request revisions. An inherited100MZN order setup was preserved and removed from future history harness runs. This is not a persistent MVCC snapshot, visual acceptance, sustained-load or deployment validation.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "7ed4b9292e214b11c42af1eae3fb63d967a7e15f026648c957f8a5b54f211f69" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "51a0fa060fcce212646cf22332df352d90a5994cb7785eedc789585e02569616" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "40e7db8ac3d47b60f46fb5b8c623dec9ff9716bc9f2e1ea400d0751f0d0cf890" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_catalogue", + "file": "app/Modules/Purchasing/ReceiptCatalogue.php", + "repository": "sgf", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_workspace_ui", + "file": "public/receipt-workspace.mjs", + "repository": "sgf", + "sha256": "5825d0f6965f55b9e5aee437d02f6664ff29e60f50d96ccec7b6498caad063bd", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "f286a99bb0df5c6080e8104d501707e5a9e13046d5dd7144dec32bf0817a92a0" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "10b412a5ec6c973152f165b34caacc685e25bcf2eb0e6ba2f7f7e58df4e1f00a" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "a128926d876ae10eb2a17ec2410ba99282d782f03bb9642cbdcad93d548ce002" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "f0f242538e4131910d612da1f5b22e4955f3bdc58d4c4121d7b1242a5eb52df5" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "86421d30dc9868b10da2153f8bf0b50d9904ab5ccccbf9813464083ae1e20bd2" + }, + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "5825d0f6965f55b9e5aee437d02f6664ff29e60f50d96ccec7b6498caad063bd" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_documents", + "file": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "repository": "sgf", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_composed_stock_read", + "file": "app/Modules/Inventory/CompositionStockRead.php", + "repository": "sgf", + "sha256": "01c558457df290879bdf6c7f8de8cd9efccad81b940731f0aaf2489cf02bfcf7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-composed-source-20261103.json", + "sha256": "cf4a954c460226d58ae8478a23f26744b39affa12054b6299e1958488a411788" + }, + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "22891dc1a346caca14cb9d03c2d2f7d772a11d937774fae9e5fc041c8aacf4e2" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_stock_receipt_trace", + "file": "app/Modules/Purchasing/StockReceiptTraceController.php", + "repository": "sgf", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_transition", + "file": "resources/js/stock-receipt-trace.js", + "repository": "sgf", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_focus", + "file": "public/stock-receipt-focus.mjs", + "repository": "sgf", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-workspace-completion-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "59bb66df5d5e12f898045669a0ad24664c3d09f2d3ab6cf70f4f13d6a34c6548", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 58 + } + ], + "sha256": "b820a6b355450a79c9f244ce8eb6950e7c1cbe4427bf85bca772fb0fc5c085d2", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-composed-source-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "7f1fc61962e68b1676fad694068761158edc41623dee73238b012c37da593caa", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-trace-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 46 + } + ], + "sha256": "29ffe0d5e588af175d926444e84faa655560999dfcff58dcf8eb37a3423f07b7", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Demo8079 fixes the actual form-to-picker binding and blank initial article search. DOM-to-real-HTTP proof selects an article, transmits its revision, previews, confirms1UN and recovers a deliberately lost response with201/200, one receipt/movement. This is not browser visual acceptance or a new concurrency/load trial. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "fd02da1a69f76bf1412f86f43095a0a476de49fbb7d2676a51fe3b29ec66e298", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + }, + { + "proof": "docs/proofs/stock-composed-source-20261103.json", + "sha256": "fd02da1a69f76bf1412f86f43095a0a476de49fbb7d2676a51fe3b29ec66e298" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_composed_stock_read", + "file": "app/Modules/Inventory/CompositionStockRead.php", + "repository": "sgf", + "sha256": "01c558457df290879bdf6c7f8de8cd9efccad81b940731f0aaf2489cf02bfcf7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-composed-source-20261103.json", + "sha256": "cf4a954c460226d58ae8478a23f26744b39affa12054b6299e1958488a411788" + }, + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "22891dc1a346caca14cb9d03c2d2f7d772a11d937774fae9e5fc041c8aacf4e2" + }, + { + "proof": "docs/proofs/stock-period-report-20261103.json", + "sha256": "01c558457df290879bdf6c7f8de8cd9efccad81b940731f0aaf2489cf02bfcf7" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_trace", + "file": "app/Modules/Purchasing/StockReceiptTraceController.php", + "repository": "sgf", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_transition", + "file": "resources/js/stock-receipt-trace.js", + "repository": "sgf", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_focus", + "file": "public/stock-receipt-focus.mjs", + "repository": "sgf", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_period_projection", + "file": "app/Modules/Inventory/StockPeriodReport.php", + "repository": "sgf", + "sha256": "d491541c6c60bc0c661dc442b8db8ce2e757f1d63dfc4982a3631f820cfb7a06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-period-report-20261103.json", + "sha256": "d491541c6c60bc0c661dc442b8db8ce2e757f1d63dfc4982a3631f820cfb7a06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_period_ui", + "file": "resources/js/StockPeriodReportWorkspace.jsx", + "repository": "sgf", + "sha256": "a03fa2fde5f7cc17cff4349d87feffe465888cea77bc0dfa62029bc92755ccbd", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-period-report-20261103.json", + "sha256": "a03fa2fde5f7cc17cff4349d87feffe465888cea77bc0dfa62029bc92755ccbd" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_period_request", + "file": "resources/js/stock-period-request.js", + "repository": "sgf", + "sha256": "bfa2644100ee89e83c005c339b5110ce41cb090c843423b356e8098b76baebda", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-period-report-20261103.json", + "sha256": "bfa2644100ee89e83c005c339b5110ce41cb090c843423b356e8098b76baebda" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-composed-source-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "7f1fc61962e68b1676fad694068761158edc41623dee73238b012c37da593caa", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-trace-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 46 + } + ], + "sha256": "29ffe0d5e588af175d926444e84faa655560999dfcff58dcf8eb37a3423f07b7", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-report-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 52 + } + ], + "sha256": "0ab25af6ffbff7d8ecb651df833771b082bf92d52f97eca4278fcac3fd5ea53b", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending. The integrated Purchasing QA host now observes the same physical book through a SELECT-only Stock role, explicit warehouse mapping and existing React reader (demo8083). Operational installation and real bindings remain pending; no additional valuation or availability is supplied. Demo8084 adds explicit Stock-to-Purchasing receipt evidence navigation for current receipt_in movements. The server resolves actual parent ids, current rights and scope; no inferred historical origin, business command or wider Stock reader grants. Existing Purchasing runtime locks remain; no new load/deployment claim. Demo8085 delivers a UTC-registration-period physical quantity report with opening/incoming/outgoing/closing per article/warehouse, exact numeric/text quantities, explicit dates and25/100 SQL pages. Five projection SELECTs at either page size;105 pairs are SQL fixtures, not workflow operations. No cross-unit total, valuation, availability, full export, sustained-load or deployment claim.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_invoice_controller", + "file": "app/Modules/Purchasing/InvoiceController.php", + "repository": "sgf", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa" + }, + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_invoice_screen", + "file": "resources/views/supplier-invoice-workspace.blade.php", + "repository": "sgf", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "396cea98bce6c2ccff510efd917e2f336ba29657ea5a8277116c41bd70c92e15" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_workspace_ui", + "file": "public/supplier-invoice-workspace.mjs", + "repository": "sgf", + "sha256": "a05b4f56151b8bc9735a0ba2ce47b475e22623aabb8be99a98290860efd6ae9e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "68671400153a97387f77ad0cddbc0f7f6367caeaebef8fc219d84fc8cf118eb3" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "5f0112c38e805fe9ed2e733053bae77f8dd4e3e1cb6b9cba8e4bc7bb469205d7" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "f767347371e2dc1573ec29a926509c87bcdea3ec09257a6b22395fc0cf01366f" + }, + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "a05b4f56151b8bc9735a0ba2ce47b475e22623aabb8be99a98290860efd6ae9e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_matching_progress", + "file": "app/Modules/Purchasing/InvoiceMatchingProgress.php", + "repository": "sgf", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_matching_ui", + "file": "public/invoice-matching.mjs", + "repository": "sgf", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/invoice-matching-progress-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 47 + } + ], + "sha256": "6920219ec33e09abc951c10d8d862e87495b99cd77162f3aea729dcca597b66c", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8081 exposes per-line ordered/accepted/returned/reversed/validated/pending/remaining quantities using two aggregate fact queries and original correction values. Pending documents do not reserve quantity; overlap is a read warning, not a replacement for native validation. Two completed QA books are reused read-only with all tables/sequences unchanged. The display revision uses one original state observation before capability decoration; mutation/state definitions are unchanged. Full dependency materialisation, large invoice-history scaling, visual review, sustained load and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_obligation_controller", + "file": "app/Modules/Purchasing/ObligationController.php", + "repository": "sgf", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_screen", + "file": "resources/views/supplier-obligation-workspace.blade.php", + "repository": "sgf", + "sha256": "73a73bc3f33fede454d40ab7506274ec5128c317e4fc0cbc38fa3808bc6be074", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "cbcef35273b6f54158f60b67f9c2b64c0a93e47cb01ca302b525479ce051e927" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "ce0dc4159d42efcff9e09ec99a2ce5a2d378a215d4a853a37417a0ebf5445506" + }, + { + "proof": "docs/proofs/obligation-evidence-workspace-20261103.json", + "sha256": "73a73bc3f33fede454d40ab7506274ec5128c317e4fc0cbc38fa3808bc6be074" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_workspace_ui", + "file": "public/supplier-obligation-workspace.mjs", + "repository": "sgf", + "sha256": "7f5c8ca11ad603e55c408356c7fb2a46782662d0107caffedcd9d4966a9163e7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "eeb450e38dad72d9c38538ed363202d0a6cfcec466c61171028108f1bc243837" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "8f5154636553130f950d09b46ff917f91250516e10a03e93971cbe537c67f082" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "c2608e3cab7cd1810437a3a978e6f6ccbf2600a83dd0a39bd38510db8249f551" + }, + { + "proof": "docs/proofs/obligation-evidence-workspace-20261103.json", + "sha256": "7f5c8ca11ad603e55c408356c7fb2a46782662d0107caffedcd9d4966a9163e7" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_evidence_ui", + "file": "public/obligation-evidence.mjs", + "repository": "sgf", + "sha256": "c47a75e69d8ea767bc7e07e6fe5fa924fcc4fbd1bd1a90f526ecf255eb2e6fb5", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/obligation-evidence-workspace-20261103.json", + "sha256": "c47a75e69d8ea767bc7e07e6fe5fa924fcc4fbd1bd1a90f526ecf255eb2e6fb5" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 72 + } + ], + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/obligation-evidence-workspace-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 26 + } + ], + "sha256": "fa510ee89931c34d6d9483a6d8f362055a953567f2087ebb1c97ad6bb4c2e117", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8082 separates evidence browsing from an explicitly selected proposal decision. Reason and preview survive pagination; changed observed source/actor/permissions invalidate old forms, and late reads/previews cannot reactivate them. Temporary read failure preserves the form; in-flight operations prevent selection changes.26 new simulated-UI/demo checks reuse72 native authority checks without repetition. Controller/runtime/kernel and legacy evidence branch are unchanged. No new real confirmation, financial writer, backend pagination protocol, visual/load or deployment validation.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/stock-period-report-20261103.json b/docs/proofs/stock-period-report-20261103.json new file mode 100644 index 0000000..a938be9 --- /dev/null +++ b/docs/proofs/stock-period-report-20261103.json @@ -0,0 +1,277 @@ +{ + "date": "2026-11-03T21:07:36.428Z", + "increment": "SGF-STOCK-PERIOD-REPORT-QA-v1", + "passed": true, + "functional_code": true, + "checks": 52, + "tests": { + "api": { + "file": "private/receipt-composition-1c6d78bf0bf8/stock-period-result.json", + "sha256": "1b37de8a6c6efed5bcc2d19e1e003b920286c8d5a4d2bf022c29bcba505a5f4b", + "checks": 28, + "result": { + "passed": true, + "checks": [ + "period report groups105 eligible pairs and returns only25 rows", + "stable reference admits period page1", + "stable reference admits period page2", + "stable reference admits period page3", + "stable reference admits period page4", + "stable reference admits period page5", + "all period pairs are reachable once without pagination overlap", + "UTC boundary includes first midnight and last second but excludes next midnight", + "same article in another mapped warehouse has its own opening and closing", + "opening-only pair remains visible without inventing period movements or mixing units", + "SQL numeric sums remain exact beyond JavaScript safe integers", + "future-only foreign tenant and unmapped warehouse pairs are absent", + "pages100 and5 cover the same report universe", + "period search treats percent and underscore literally", + "warehouse filter applies to opening entries issues and closing together", + "explicit unmapped and foreign warehouse filters are refused", + "reversed impossible dates and excessive page size are rejected", + "period requires explicit dates and legacy views reject report-only fields", + "date or page-size change cannot reuse another report reference", + "tampered report reference is rejected", + "Purchasing authority alone cannot read the physical period report", + "Purchasing module context cannot bypass Stock report isolation", + "another unit cannot reuse the report binding", + "new session context invalidates an older report reference", + "all report reads leave fixture metadata movements audit and grants unchanged", + "new append invalidates a previously observed report", + "new reference recovers the updated exact physical closing", + "report fixture and reads produce no business receipt invoice obligation or payment" + ], + "period_pairs": 105, + "page_sizes": [ + 25, + 100 + ], + "fixture": { + "passed": true, + "second": 3, + "excluded": 4, + "opening_only": 3, + "large": 4, + "future": 5, + "report_pairs": 105, + "fixture_movements": 114, + "business_workflow_claim": false + }, + "read_fingerprint_before": "37a1b59474ed430dd13282f241941d59e8f080901b136e8bb8094cbcf7877e25", + "read_fingerprint_after_before_explicit_append": "37a1b59474ed430dd13282f241941d59e8f080901b136e8bb8094cbcf7877e25", + "explicit_revision_fixture_appends": 1, + "sql_fixture_not_workflow": true, + "business_commands": 0, + "visual_review": false + } + }, + "ui": { + "file": "private/receipt-composition-1c6d78bf0bf8/stock-period-ui.json", + "sha256": "c6848eb11322dffd0e7262340480882e6dc3242047a538261b12f7fb4c39097c", + "checks": 12, + "result": { + "passed": true, + "checks": [ + "starting another period immediately clears stale rows errors and enters loading", + "report request preserves dates literal search warehouse page and reference", + "successful active read supplies the current result without a business command", + "older period response cannot replace rows or release a newer loading state", + "newest period response owns the visible result", + "rejected reference shows an error without retaining previous report rows", + "late failure after cancellation cannot overwrite another context message", + "actual report form requires an explicit period without choosing dates or fetching on mount", + "actual report explains registration time current metadata and physical-only scope", + "actual report table renders exact three-decimal quantities beyond JS safe integer limits", + "actual report preserves each unit and does not invent a grand quantity total", + "actual report labels all four reconciliation quantities" + ], + "react_render": true, + "async_race_simulation": true, + "business_commands": 0, + "visual_review": false + } + }, + "queries": { + "file": "private/receipt-composition-1c6d78bf0bf8/stock-period-queries.json", + "sha256": "041984d9c8a7bfeb5a8a096bda6dd6c4897fc524bb72c6c11f0927143a28419f", + "checks": 2, + "result": { + "passed": true, + "checks": [ + "projection SELECT count is independent of page size25/100 and bounded by6", + "projection materialises only the requested25/100 report rows" + ], + "select_queries": { + "25": 5, + "100": 5 + }, + "returned_rows": { + "25": 25, + "100": 100 + }, + "scope": "direct projection only; authentication/middleware/physical-source checks excluded", + "sustained_load": false, + "deployment_capacity_validated": false + } + }, + "guards": { + "file": "private/receipt-composition-1c6d78bf0bf8/stock-period-guards.json", + "sha256": "980cab714afff497a28449ae2268031c8cd7fb41b4303ed44d3d44121177ed8c", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "expired report reference requires refresh", + "future-dated report reference is refused", + "disabled report refuses before selecting a context or source" + ], + "scope": "direct report/adapter probes, not middleware", + "business_commands": 0, + "visual_review": false + } + }, + "demo": { + "file": "private/receipt-composition-cc50a276c10c/stock-period-demo.json", + "sha256": "bee8528d7e2d971e44c4f944036ce6ef86f7c8b5890d69cbbe896fa03fe20ec7", + "checks": 7, + "result": { + "passed": true, + "checks": [ + "new demo starts without main requests or physical fixtures", + "existing session enables the period report only in its QA composition", + "empty source supplies an authorised empty report without invented zero balances", + "existing current-balance view remains available without report date parameters", + "existing React shell is served for report navigation", + "served report bundle matches the local build manifest", + "demo report reads preserve metadata stock audit and grants" + ], + "before": "89a598405da503fc59f205987080d51dc9ef7f46a20a6b5c213042ff542a5396", + "after": "89a598405da503fc59f205987080d51dc9ef7f46a20a6b5c213042ff542a5396", + "business_commands": 0, + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Inventory/StockPeriodReport.php", + "sha256": "d491541c6c60bc0c661dc442b8db8ce2e757f1d63dfc4982a3631f820cfb7a06" + }, + { + "file": "app/Modules/Inventory/CompositionStockRead.php", + "sha256": "01c558457df290879bdf6c7f8de8cd9efccad81b940731f0aaf2489cf02bfcf7" + }, + { + "file": "app/Modules/Identity/Services/IdentityWorkflow.php", + "sha256": "be1f044a20f8847134fac8c8092c7b5322d169f616207b4d986a1a4dfff58b4e" + }, + { + "file": "config/receipt_qa.php", + "sha256": "78193f0646d726628b66a3458f77ce53d1c4a9bf817dd84b41ced7573d1f790e" + }, + { + "file": "resources/js/StockPeriodReportWorkspace.jsx", + "sha256": "a03fa2fde5f7cc17cff4349d87feffe465888cea77bc0dfa62029bc92755ccbd" + }, + { + "file": "resources/js/stock-period-request.js", + "sha256": "bfa2644100ee89e83c005c339b5110ce41cb090c843423b356e8098b76baebda" + }, + { + "file": "resources/js/StockMenuWorkspace.jsx", + "sha256": "8dcfe2cef641744cab073df8f2e9477c5cf2e8d39cfc51f1fb58e94cab700219" + } + ], + "unchanged_authority": [ + { + "file": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + }, + { + "file": "packages/inventory-read/src/InventoryReadSession.php", + "sha256": "e5ea1ec6771e34478367218d73ba1d1d90464ddc87d1c5fa3d679622ffb81111" + }, + { + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + }, + { + "file": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df" + }, + { + "file": "app/Modules/Purchasing/StockReceiptTraceController.php", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594" + }, + { + "file": "resources/js/app.jsx", + "sha256": "d0d3db22cfd3121e4c674285285f4ae45360c6e70a582f016997bbd6679334ab" + }, + { + "file": "resources/js/context-transition.js", + "sha256": "3d76e21eca185ae97c1a6a6f5965ab33c242a28391c8c50f5af30dfc0a4a3c6a" + }, + { + "file": "app/Shared/Context/ModuleNavigation.php", + "sha256": "397d7a4af7d16547ff60ea20a6733aa994d98a6ecf0cbca4b1437da14c3c55a1" + } + ], + "existing_physical_source_and_permission_guard_unchanged": true, + "pinned_native_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "build": { + "manifest_sha256": "8f0650b1ef61c6492b7c1205b63efcb66de5594b172365829ece8e1c328e33e5", + "entry_sha256": "aa39cb22206a2fa51e0fff5e1d136f221e8798da602e11fa2cd60fb9d6aeab0c" + }, + "demo": { + "port": 8085, + "entry": "http://127.0.0.1:8085/qa/enter/validator?module=stock&open=1", + "navigate": "Stock > Relatórios > Movimentos de stock", + "initial_main_requests": 0, + "initial_movements": 0 + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "29ffe0d5e588af175d926444e84faa655560999dfcff58dcf8eb37a3423f07b7" + }, + { + "file": "docs/proofs/stock-composed-source-20261103.json", + "sha256": "7f1fc61962e68b1676fad694068761158edc41623dee73238b012c37da593caa" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "new_permission_names": [], + "new_real_grants": false, + "stock_reader_grants_widened": false, + "source_package_modified": false, + "new_source_or_target_indexes": false, + "target_database_connected": false, + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "previous_demo_data_written": false, + "publication": false, + "checkpoint": false + }, + "limitations": [ + "UTC registration timestamps are used, not effective receipt dates. Deployment must validate the source timestamp convention; current QA source application is configured UTC.", + "Opening/entries/issues/closing are quantities per article and warehouse. Current item/warehouse metadata are shown; no cross-unit grand total, valuation, reservation, blocked or available quantity is inferred.", + "105 eligible pairs with114 initial SQL fixture movements; one explicit additional append verifies reference invalidation. These fixtures are not business receipts, stock-operation workflow proofs or financial transactions.", + "Existing receipt and Stock-trace proofs are reused without rerunning commands or suites.", + "Five projection SELECTs were observed for both25 and100 rows. This excludes host authentication, middleware and source-identity checks, and is not sustained load, memory profiling or deployment capacity evidence.", + "SQL aggregates examine the authorised history to the closing boundary with a3-second statement timeout; only the requested page is materialised in PHP. Large histories may time out and require later measurement.", + "12 UI checks use asynchronous reply simulation and actual React server rendering; no browser visual proof. New report dates are selected explicitly.", + "Three guards are direct report/adapter probes, not middleware. A harness bootstrap initially loaded duplicate copies of an unchanged reader class; corrected by loading the adapter bootstrap once before those guards.", + "Document-level period export/printing, historical names, other Stock reports, visual review, accessibility, sustained load and operational deployment remain pending." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/stock-prefix-stream-20261103.json b/docs/proofs/stock-prefix-stream-20261103.json new file mode 100644 index 0000000..699a505 --- /dev/null +++ b/docs/proofs/stock-prefix-stream-20261103.json @@ -0,0 +1,641 @@ +{ + "date": "2026-11-03T08:50:30.043Z", + "increment": "STOCK-PRIOR-STREAM-v1", + "functional_code": true, + "passed": true, + "checks": 48, + "tests": { + "metadata": { + "file": "private/stock-prefix-248a2edca17f/prefix-review-safe.json", + "sha256": "0eff16462c6ee634a617ae04fea158dab0df69219394e5aee09aec97569b653b", + "checks": 43, + "result": { + "passed": true, + "checks": [ + "small source snapshot remains byte-equivalent 1", + "accepted posted evidence and revisions remain exact 1", + "small source snapshot remains byte-equivalent 2", + "accepted posted evidence and revisions remain exact 2", + "small source snapshot remains byte-equivalent 3", + "accepted posted evidence and revisions remain exact 3", + "exact legacy representation at prefix 0", + "exact legacy representation at prefix 1", + "exact legacy representation at prefix 25", + "full evidence digest and bounded preview at prefix 26", + "full evidence digest and bounded preview at prefix 501", + "change outside preview changes evidence digest", + "missing predecessor refused", + "changed rate in late chunk refused", + "incomplete evidence in late chunk refused", + "other tenant excluded", + "other company cannot complete coverage", + "other unit cannot complete coverage", + "movement reference JSON type preserved exactly", + "baseline refuses string rate ID", + "projection also refuses string rate ID", + "baseline refuses fractional JSON rate ID", + "projection also refuses fractional JSON rate ID", + "normal completion and refusal leave no open prefix cursors", + "bounded preview sample 1000/0", + "actual result batch bounded 1000/0", + "bounded preview sample 1000/1", + "actual result batch bounded 1000/1", + "bounded preview sample 1000/2", + "actual result batch bounded 1000/2", + "bounded preview sample 5000/0", + "actual result batch bounded 5000/0", + "bounded preview sample 5000/1", + "actual result batch bounded 5000/1", + "bounded preview sample 5000/2", + "actual result batch bounded 5000/2", + "bounded preview sample 10000/0", + "actual result batch bounded 10000/0", + "bounded preview sample 10000/1", + "actual result batch bounded 10000/1", + "bounded preview sample 10000/2", + "actual result batch bounded 10000/2", + "measurements close all prefix cursors" + ], + "metadata_only_fixture": true, + "new_financial_effects": 0, + "no_indices_added": true, + "batch_limit": 500, + "inline_reference_limit": 25, + "payload_bytes_per_historical_snapshot": 8192, + "metrics": [ + { + "prefix_records": 1000, + "samples": { + "before": [ + { + "elapsed_ms": 160.246833, + "queries": 2, + "incremental_peak_php_bytes": 13368488, + "max_result_rows": 1000, + "dependency_count": 1000, + "digest": "77f426abc87e509425acea28a444a4bed357d58412a2558c2885bdb3a4a5034a", + "evidence_bytes": 204787 + }, + { + "elapsed_ms": 157.848875, + "queries": 2, + "incremental_peak_php_bytes": 13368488, + "max_result_rows": 1000, + "dependency_count": 1000, + "digest": "77f426abc87e509425acea28a444a4bed357d58412a2558c2885bdb3a4a5034a", + "evidence_bytes": 204787 + }, + { + "elapsed_ms": 179.651792, + "queries": 2, + "incremental_peak_php_bytes": 13368488, + "max_result_rows": 1000, + "dependency_count": 1000, + "digest": "77f426abc87e509425acea28a444a4bed357d58412a2558c2885bdb3a4a5034a", + "evidence_bytes": 204787 + } + ], + "after": [ + { + "elapsed_ms": 45.996834, + "queries": 6, + "incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "dependency_count": 1000, + "digest": "77f426abc87e509425acea28a444a4bed357d58412a2558c2885bdb3a4a5034a", + "evidence_bytes": 5226 + }, + { + "elapsed_ms": 55.725167, + "queries": 6, + "incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "dependency_count": 1000, + "digest": "77f426abc87e509425acea28a444a4bed357d58412a2558c2885bdb3a4a5034a", + "evidence_bytes": 5226 + }, + { + "elapsed_ms": 45.0585, + "queries": 6, + "incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "dependency_count": 1000, + "digest": "77f426abc87e509425acea28a444a4bed357d58412a2558c2885bdb3a4a5034a", + "evidence_bytes": 5226 + } + ] + } + }, + { + "prefix_records": 5000, + "samples": { + "before": [ + { + "elapsed_ms": 1403.80075, + "queries": 2, + "incremental_peak_php_bytes": 66915240, + "max_result_rows": 5000, + "dependency_count": 5000, + "digest": "65315986e3b68c594d078758497bd619f07b767d495a6cff5de990e0d9e631b0", + "evidence_bytes": 1032787 + }, + { + "elapsed_ms": 1212.303875, + "queries": 2, + "incremental_peak_php_bytes": 66915240, + "max_result_rows": 5000, + "dependency_count": 5000, + "digest": "65315986e3b68c594d078758497bd619f07b767d495a6cff5de990e0d9e631b0", + "evidence_bytes": 1032787 + }, + { + "elapsed_ms": 1167.604084, + "queries": 2, + "incremental_peak_php_bytes": 66915240, + "max_result_rows": 5000, + "dependency_count": 5000, + "digest": "65315986e3b68c594d078758497bd619f07b767d495a6cff5de990e0d9e631b0", + "evidence_bytes": 1032787 + } + ], + "after": [ + { + "elapsed_ms": 202.49675, + "queries": 14, + "incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "dependency_count": 5000, + "digest": "65315986e3b68c594d078758497bd619f07b767d495a6cff5de990e0d9e631b0", + "evidence_bytes": 5227 + }, + { + "elapsed_ms": 207.827625, + "queries": 14, + "incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "dependency_count": 5000, + "digest": "65315986e3b68c594d078758497bd619f07b767d495a6cff5de990e0d9e631b0", + "evidence_bytes": 5227 + }, + { + "elapsed_ms": 267.432, + "queries": 14, + "incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "dependency_count": 5000, + "digest": "65315986e3b68c594d078758497bd619f07b767d495a6cff5de990e0d9e631b0", + "evidence_bytes": 5227 + } + ] + } + }, + { + "prefix_records": 10000, + "samples": { + "before": [ + { + "elapsed_ms": 3132.44025, + "queries": 2, + "incremental_peak_php_bytes": 133799528, + "max_result_rows": 10000, + "dependency_count": 10000, + "digest": "59e6dd5dc6edbd607bfd3c5de90eece23e4c832d3a4b1ed7dc464e0d27ac2552", + "evidence_bytes": 2067789 + }, + { + "elapsed_ms": 2836.689875, + "queries": 2, + "incremental_peak_php_bytes": 133799528, + "max_result_rows": 10000, + "dependency_count": 10000, + "digest": "59e6dd5dc6edbd607bfd3c5de90eece23e4c832d3a4b1ed7dc464e0d27ac2552", + "evidence_bytes": 2067789 + }, + { + "elapsed_ms": 2410.170292, + "queries": 2, + "incremental_peak_php_bytes": 133799528, + "max_result_rows": 10000, + "dependency_count": 10000, + "digest": "59e6dd5dc6edbd607bfd3c5de90eece23e4c832d3a4b1ed7dc464e0d27ac2552", + "evidence_bytes": 2067789 + } + ], + "after": [ + { + "elapsed_ms": 583.647, + "queries": 24, + "incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "dependency_count": 10000, + "digest": "59e6dd5dc6edbd607bfd3c5de90eece23e4c832d3a4b1ed7dc464e0d27ac2552", + "evidence_bytes": 5228 + }, + { + "elapsed_ms": 416.437125, + "queries": 24, + "incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "dependency_count": 10000, + "digest": "59e6dd5dc6edbd607bfd3c5de90eece23e4c832d3a4b1ed7dc464e0d27ac2552", + "evidence_bytes": 5228 + }, + { + "elapsed_ms": 565.058834, + "queries": 24, + "incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "dependency_count": 10000, + "digest": "59e6dd5dc6edbd607bfd3c5de90eece23e4c832d3a4b1ed7dc464e0d27ac2552", + "evidence_bytes": 5228 + } + ] + } + } + ], + "measurement": "warm sequential, three samples, alternating order, incremental peak PHP memory; SQL/server memory excluded", + "old_published_three_source_snapshots_unchanged": true, + "deployment_capacity_validated": false + } + }, + "transaction": { + "file": "private/stock-prefix-248a2edca17f/prefix-context-current.json", + "sha256": "f22d1a3f274bd02f964011b01bd759f31a3529430b590cdd873b285ab3bfa439", + "checks": 5, + "result": { + "passed": true, + "checks": [ + "standalone prefix capture owns and ends repeatable-read read-only transaction", + "prefix capture preserves caller write transaction and identical evidence", + "late dependency refusal leaves rollback ownership with caller", + "cursor closed even after refusal inside caller write transaction", + "caller rollback restores all metadata probes" + ], + "metadata_only_fixture": true, + "new_financial_effects": 0, + "caller_transaction_preserved": true + } + }, + "plan": { + "file": "private/stock-prefix-248a2edca17f/prefix-plan.json", + "sha256": "89a7346bbe0ee67cc21716bcc4b1d9ae8a91715dd13cc019b37fd74f821395ce", + "explain_only": true, + "comparison": { + "text_join": [ + { + "type": "Nested Loop", + "join": "Inner", + "relation": null, + "index": null, + "estimated_rows": 2500 + }, + { + "type": "Index Scan", + "join": null, + "relation": "gl_journals", + "index": "gl_journals_pkey", + "estimated_rows": 50 + }, + { + "type": "Materialize", + "join": null, + "relation": null, + "index": null, + "estimated_rows": 10000 + }, + { + "type": "Seq Scan", + "join": null, + "relation": "stock_movements", + "index": null, + "estimated_rows": 10000 + } + ], + "numeric_guarded_join": [ + { + "type": "Nested Loop", + "join": "Inner", + "relation": null, + "index": null, + "estimated_rows": 50 + }, + { + "type": "Index Scan", + "join": null, + "relation": "gl_journals", + "index": "gl_journals_pkey", + "estimated_rows": 50 + }, + { + "type": "Index Scan", + "join": null, + "relation": "stock_movements", + "index": "stock_movements_pkey", + "estimated_rows": 1 + } + ] + } + } + }, + "metrics": [ + { + "prefix_records": 1000, + "before": { + "median_ms": 160.246833, + "queries": [ + 2 + ], + "max_incremental_peak_php_bytes": 13368488, + "max_result_rows": 1000, + "evidence_bytes": 204787, + "samples": [ + { + "elapsed_ms": 160.246833, + "queries": 2, + "incremental_peak_php_bytes": 13368488, + "max_result_rows": 1000, + "dependency_count": 1000, + "digest": "77f426abc87e509425acea28a444a4bed357d58412a2558c2885bdb3a4a5034a", + "evidence_bytes": 204787 + }, + { + "elapsed_ms": 157.848875, + "queries": 2, + "incremental_peak_php_bytes": 13368488, + "max_result_rows": 1000, + "dependency_count": 1000, + "digest": "77f426abc87e509425acea28a444a4bed357d58412a2558c2885bdb3a4a5034a", + "evidence_bytes": 204787 + }, + { + "elapsed_ms": 179.651792, + "queries": 2, + "incremental_peak_php_bytes": 13368488, + "max_result_rows": 1000, + "dependency_count": 1000, + "digest": "77f426abc87e509425acea28a444a4bed357d58412a2558c2885bdb3a4a5034a", + "evidence_bytes": 204787 + } + ] + }, + "after": { + "median_ms": 45.996834, + "queries": [ + 6 + ], + "max_incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "evidence_bytes": 5226, + "samples": [ + { + "elapsed_ms": 45.996834, + "queries": 6, + "incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "dependency_count": 1000, + "digest": "77f426abc87e509425acea28a444a4bed357d58412a2558c2885bdb3a4a5034a", + "evidence_bytes": 5226 + }, + { + "elapsed_ms": 55.725167, + "queries": 6, + "incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "dependency_count": 1000, + "digest": "77f426abc87e509425acea28a444a4bed357d58412a2558c2885bdb3a4a5034a", + "evidence_bytes": 5226 + }, + { + "elapsed_ms": 45.0585, + "queries": 6, + "incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "dependency_count": 1000, + "digest": "77f426abc87e509425acea28a444a4bed357d58412a2558c2885bdb3a4a5034a", + "evidence_bytes": 5226 + } + ] + } + }, + { + "prefix_records": 5000, + "before": { + "median_ms": 1212.303875, + "queries": [ + 2 + ], + "max_incremental_peak_php_bytes": 66915240, + "max_result_rows": 5000, + "evidence_bytes": 1032787, + "samples": [ + { + "elapsed_ms": 1403.80075, + "queries": 2, + "incremental_peak_php_bytes": 66915240, + "max_result_rows": 5000, + "dependency_count": 5000, + "digest": "65315986e3b68c594d078758497bd619f07b767d495a6cff5de990e0d9e631b0", + "evidence_bytes": 1032787 + }, + { + "elapsed_ms": 1212.303875, + "queries": 2, + "incremental_peak_php_bytes": 66915240, + "max_result_rows": 5000, + "dependency_count": 5000, + "digest": "65315986e3b68c594d078758497bd619f07b767d495a6cff5de990e0d9e631b0", + "evidence_bytes": 1032787 + }, + { + "elapsed_ms": 1167.604084, + "queries": 2, + "incremental_peak_php_bytes": 66915240, + "max_result_rows": 5000, + "dependency_count": 5000, + "digest": "65315986e3b68c594d078758497bd619f07b767d495a6cff5de990e0d9e631b0", + "evidence_bytes": 1032787 + } + ] + }, + "after": { + "median_ms": 207.827625, + "queries": [ + 14 + ], + "max_incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "evidence_bytes": 5227, + "samples": [ + { + "elapsed_ms": 202.49675, + "queries": 14, + "incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "dependency_count": 5000, + "digest": "65315986e3b68c594d078758497bd619f07b767d495a6cff5de990e0d9e631b0", + "evidence_bytes": 5227 + }, + { + "elapsed_ms": 207.827625, + "queries": 14, + "incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "dependency_count": 5000, + "digest": "65315986e3b68c594d078758497bd619f07b767d495a6cff5de990e0d9e631b0", + "evidence_bytes": 5227 + }, + { + "elapsed_ms": 267.432, + "queries": 14, + "incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "dependency_count": 5000, + "digest": "65315986e3b68c594d078758497bd619f07b767d495a6cff5de990e0d9e631b0", + "evidence_bytes": 5227 + } + ] + } + }, + { + "prefix_records": 10000, + "before": { + "median_ms": 2836.689875, + "queries": [ + 2 + ], + "max_incremental_peak_php_bytes": 133799528, + "max_result_rows": 10000, + "evidence_bytes": 2067789, + "samples": [ + { + "elapsed_ms": 3132.44025, + "queries": 2, + "incremental_peak_php_bytes": 133799528, + "max_result_rows": 10000, + "dependency_count": 10000, + "digest": "59e6dd5dc6edbd607bfd3c5de90eece23e4c832d3a4b1ed7dc464e0d27ac2552", + "evidence_bytes": 2067789 + }, + { + "elapsed_ms": 2836.689875, + "queries": 2, + "incremental_peak_php_bytes": 133799528, + "max_result_rows": 10000, + "dependency_count": 10000, + "digest": "59e6dd5dc6edbd607bfd3c5de90eece23e4c832d3a4b1ed7dc464e0d27ac2552", + "evidence_bytes": 2067789 + }, + { + "elapsed_ms": 2410.170292, + "queries": 2, + "incremental_peak_php_bytes": 133799528, + "max_result_rows": 10000, + "dependency_count": 10000, + "digest": "59e6dd5dc6edbd607bfd3c5de90eece23e4c832d3a4b1ed7dc464e0d27ac2552", + "evidence_bytes": 2067789 + } + ] + }, + "after": { + "median_ms": 565.058834, + "queries": [ + 24 + ], + "max_incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "evidence_bytes": 5228, + "samples": [ + { + "elapsed_ms": 583.647, + "queries": 24, + "incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "dependency_count": 10000, + "digest": "59e6dd5dc6edbd607bfd3c5de90eece23e4c832d3a4b1ed7dc464e0d27ac2552", + "evidence_bytes": 5228 + }, + { + "elapsed_ms": 416.437125, + "queries": 24, + "incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "dependency_count": 10000, + "digest": "59e6dd5dc6edbd607bfd3c5de90eece23e4c832d3a4b1ed7dc464e0d27ac2552", + "evidence_bytes": 5228 + }, + { + "elapsed_ms": 565.058834, + "queries": 24, + "incremental_peak_php_bytes": 372432, + "max_result_rows": 500, + "dependency_count": 10000, + "digest": "59e6dd5dc6edbd607bfd3c5de90eece23e4c832d3a4b1ed7dc464e0d27ac2552", + "evidence_bytes": 5228 + } + ] + } + } + ], + "reference": { + "original_source_sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3", + "private_baseline_sha256": "d444f9ab6ba085df9d6e6fcae7cfbd1447e27e5cef9a45c560265e0490f72864" + }, + "sources": [ + { + "file": "packages/general-ledger/src/StockValuation.php", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "file": "scripts/stock-prefix-proof.php", + "sha256": "b1c45414e4c28f9b823b374daaa8a975698b14c6aee31290a315ed153be4b87c" + }, + { + "file": "scripts/stock-prefix-context.php", + "sha256": "fff9adc41f547e1cb0d3ecd14c322a4a1b8d4c5b2097cdd8ccc29e6dc02e0734" + }, + { + "file": "scripts/stock-prefix-plan.php", + "sha256": "1a8babb3f1ad5a3ba4a45e802a8e241e87f7e35b31a24e502a7842f76812264e" + }, + { + "file": "scripts/stock-prefix-run.mjs", + "sha256": "6ed8d136605c5c6e623f093bae8c9d1fafbf84b1e580995a6c2d1058743b3dc6" + } + ], + "prior_proofs_preserved": [ + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e" + } + ], + "preservation": { + "frozen_demo_bundle_sha256": "8b3ad1c600b84c8526b2d9f453a1c5c4e174a69d6acc78ace2af4f52a25dd762", + "existing_three_posted_snapshots_byte_equivalent": true, + "no_existing_record_or_grant_changed": true, + "no_indices_added": true, + "new_financial_effects": 0, + "blocked_cache_cleared": false, + "publication": false, + "purchasing_activation": false + }, + "limitations": [ + "Metadata-only infrastructure fixture; not1000/5000/10000 validated stock movements or a full-page/period load test.", + "Three warm samples in alternating order, equal read-only repeatable-read transactions. Peak PHP memory excludes PostgreSQL and process RSS.", + "The deployed/frozen demonstration bundle is preserved, not upgraded by this source change.", + "Long prefixes use an explicit summary format with all-reference digest and first25 references; accepted three-movement snapshots remain exact.", + "Total work and query count grow with prefix size; full-page/period batching and deployment capacity remain unvalidated." + ], + "diagnostics_preserved": { + "partial_instrumentation_run": "prefix-review-selected", + "cancelled_read_only_text_join_run": "prefix-review-types", + "other_intermediate_results_kept": true + } +} \ No newline at end of file diff --git a/docs/proofs/stock-receipt-trace-20261103.json b/docs/proofs/stock-receipt-trace-20261103.json new file mode 100644 index 0000000..b088f64 --- /dev/null +++ b/docs/proofs/stock-receipt-trace-20261103.json @@ -0,0 +1,2408 @@ +{ + "date": "2026-11-03T20:53:45.615Z", + "increment": "SGF-STOCK-RECEIPT-TRACE-QA-v1", + "passed": true, + "functional_code": true, + "checks": 46, + "tests": { + "read": { + "file": "private/stock-trace-read-c8fbd4cec515/stock-trace-read-result.json", + "sha256": "381d5912ee7ed62ed5126369b2d3d133f62eef488ef69eb23dee7f1f38c8fffd", + "checks": 16, + "result": { + "passed": true, + "checks": [ + "Stock offers an explicit receipt handoff for the actual existing movement", + "receipt resolver requires explicit Purchasing module selection", + "resolver returns only canonical ids and a local read destination", + "resolved movement receipt and parent agree with the actual native book", + "destination uses the actual receipt and order rather than browser supplied parents", + "existing focused receipt workspace is mounted at the exact resolved destination", + "existing evidence API correlates the same receipt and physical movement", + "Purchasing receipt access alone does not grant Stock-origin tracing", + "invoice reviewer cannot inherit physical receipt trace authority", + "caller cannot replace the parent or receipt through query parameters", + "unknown or unmapped movement has no inferred origin", + "another unit cannot reuse the physical origin mapping", + "old context token is rejected at the destination", + "disabled trace refuses before reading source or context", + "preservation suffix observes the same Stock movement and current receipt origin without command replay", + "all reused host/native tables and sequences remain unchanged" + ], + "valid_prefix_reused": 14, + "source_receipt": 1, + "source_movement": 1, + "before": { + "host": { + "a_billing_drafts": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "a_clients": [ + 2, + "f9aeb1b7847a76b741e3691bf3af90f6" + ], + "a_commands": [ + 1, + "122f90f714c62ef1725ab3a9aab6db63" + ], + "a_events": [ + 1, + "a3c5f41dbc09d12ebbe35cd8ba276433" + ], + "a_history": [ + 1, + "e440d76c21f5f3ff18e9678150856741" + ], + "a_outbox": [ + 1, + "3f0e84536a1692cd18084b647048cd66" + ], + "a_pending": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "a_service_drafts": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "a_services": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "cb_audit": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "cb_budget_consumptions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "cb_budget_entries": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "cb_budget_reinforcements": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "cb_budgets": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "cb_centres": [ + 1, + "9fdcaf2920a19808fe165c955d032292" + ], + "cb_origins": [ + 1, + "54f47fd8edfc961a9bd697ee6f7bec23" + ], + "companies": [ + 2, + "a98165cd6755267463d9a1403426d855" + ], + "company_memberships": [ + 7, + "803fb8f4b30d7537c81350767b417bb5" + ], + "geo_catalogue_state": [ + 1, + "b60296fc0c59b444ef59e7a895abb4b5" + ], + "geo_commands": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "geo_location_history": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "geo_locations": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "geo_territories": [ + 20407, + "6dec1d1e0ad0b7add87c15f2cce959f6" + ], + "geo_versions": [ + 1, + "7ae31c77856c675eac19b10fe75c3d3a" + ], + "identity_audit": [ + 2, + "180eae005c8c7272a76f0465c448b047" + ], + "password_reset_tokens": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "permission_grants": [ + 65, + "d83457ec0bea3eb71f2bd3b70696314f" + ], + "sessions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "tenants": [ + 1, + "297edfac9c301da9bfb05a4150e5ce45" + ], + "units": [ + 3, + "e6a1f42feb3ecf692dada02610e379a9" + ], + "users": [ + 7, + "6d9655816f197007e30840a9a22c823f" + ], + "sequences": [ + { + "sequencename": "a_billing_drafts_id_seq", + "last_value": null + }, + { + "sequencename": "a_clients_id_seq", + "last_value": 2 + }, + { + "sequencename": "a_commands_id_seq", + "last_value": 1 + }, + { + "sequencename": "a_events_id_seq", + "last_value": 1 + }, + { + "sequencename": "a_history_id_seq", + "last_value": 1 + }, + { + "sequencename": "a_pending_id_seq", + "last_value": null + }, + { + "sequencename": "a_service_drafts_id_seq", + "last_value": null + }, + { + "sequencename": "a_services_id_seq", + "last_value": null + }, + { + "sequencename": "cb_audit_id_seq", + "last_value": null + }, + { + "sequencename": "cb_budget_consumptions_id_seq", + "last_value": null + }, + { + "sequencename": "cb_budget_entries_id_seq", + "last_value": null + }, + { + "sequencename": "cb_budget_reinforcements_id_seq", + "last_value": null + }, + { + "sequencename": "cb_budgets_id_seq", + "last_value": null + }, + { + "sequencename": "cb_centres_id_seq", + "last_value": 1 + }, + { + "sequencename": "cb_origins_id_seq", + "last_value": 1 + }, + { + "sequencename": "companies_id_seq", + "last_value": 2 + }, + { + "sequencename": "geo_location_history_id_seq", + "last_value": null + }, + { + "sequencename": "identity_audit_id_seq", + "last_value": 2 + }, + { + "sequencename": "permission_grants_id_seq", + "last_value": 82 + }, + { + "sequencename": "tenants_id_seq", + "last_value": 1 + }, + { + "sequencename": "units_id_seq", + "last_value": 3 + }, + { + "sequencename": "users_id_seq", + "last_value": 7 + } + ] + }, + "native": { + "admission_adoptions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "admission_decisions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "admission_policies": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "admission_reviews": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "approval_steps": [ + 2, + "b6cc4afd594d6cf09a34d9bb89dd6093" + ], + "audit_logs": [ + 40, + "544e3c69a37221627d1a941ca3d29e7d" + ], + "award_cancellations": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "budget_consumptions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "budget_entries": [ + 4, + "11550cb54dc673bd081f433c413a76fa" + ], + "budget_reinforcements": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "budgets": [ + 2, + "d69dff6d190bb4b7dcf5e5fcb5e26e2d" + ], + "cache": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "cache_locks": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "candidate_access_tokens": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "candidate_accounts": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "candidate_events": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "candidate_opportunity_publications": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "candidate_portal_versions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "candidate_profile_versions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "candidate_submission_documents": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "candidate_submissions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "candidate_triage": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "conflict_declarations": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "cost_centers": [ + 2, + "ab0c64c9f959bba22958dda10126bfea" + ], + "criticality_levels": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "departments": [ + 2, + "e9fc3dde81bb9e1a127062f5d81ffde4" + ], + "equipment": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "equipment_spare_parts": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "external_payments": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "failed_jobs": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "goods_receipt_items": [ + 1, + "f756b5d54ad9c3dd0561aa17eeb58b0d" + ], + "goods_receipts": [ + 1, + "56f0044f5a6eec1e87014ad1cbea407c" + ], + "inventory_lot_allocations": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "investment_policies": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "investment_policy_reviews": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "invoice_items": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "invoices": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "job_batches": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "jobs": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "migrations": [ + 59, + "85704abff601413f68780d503e192954" + ], + "order_cancellation_policies": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "order_cancellation_policy_reviews": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "order_cancellations": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "organization_access": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "organization_memberships": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "organization_profiles": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "pa_access": [ + 7, + "68aef32b0f2fb866485dde0c5318fbcf" + ], + "pa_commands": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "pa_events": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "pa_history_imports": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "pa_imported_payments": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "pa_obligations": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "pa_outbox": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "pa_payment_decisions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "pa_proposals": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "pa_sources": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "password_reset_tokens": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "people_access_states": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "people_applications": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "people_clarifications": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "people_process_access": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "people_processes": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "people_registry": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "people_reviews": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "proposal_evaluations": [ + 6, + "d69a6d828f181e574cdea6398a13305c" + ], + "proposal_openings": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "purchase_award_approvals": [ + 1, + "76690e7eeec9059a9d9e9a1e0a532c19" + ], + "purchase_awards": [ + 1, + "fdd69ecdfba1d0016658a3295325f89a" + ], + "purchase_control_policies": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "purchase_control_reviews": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "purchase_order_items": [ + 1, + "17000674fb6d4ae3067312af906aabe0" + ], + "purchase_orders": [ + 1, + "75c1e778d180ef78ca6d8b0617d0c0c1" + ], + "purchase_plan_items": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "purchase_plan_milestones": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "purchase_revisions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "qualification_assessments": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "qualification_sets": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "quotation_items": [ + 3, + "a997a2c190d467ef9e8617fc33986691" + ], + "quotations": [ + 3, + "b83713bf489c3c6e2c7e47a520fe51f3" + ], + "receipt_documents": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "recommendation_adoptions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "recommendation_attempts": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "recommendation_policies": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "recommendation_reviews": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "replenishment_work": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "requisition_catalogue": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "requisition_commands": [ + 3, + "af40dba77ce32494ab43be9a84ab396f" + ], + "requisition_items": [ + 2, + "a000404ef3f0532f0acc1cd1ba335c9e" + ], + "requisitions": [ + 2, + "e005770c14d0fc1962bd3a7b92faf13a" + ], + "sessions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "spare_parts": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "stock_items": [ + 104, + "b5515f8ea00a295674caa63d565134fa" + ], + "stock_movements": [ + 1, + "b278f002da6594089bc82d6185cffc7c" + ], + "stock_operations": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "submission_forms": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "supplier_bank_details": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "supplier_bank_reviews": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "supplier_documents": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "supplier_evaluations": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "supplier_improvements": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "supplier_responses": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "suppliers": [ + 6, + "8966e0f4072ba49dc6a98bd080fba07c" + ], + "supply_records": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "technical_reviews": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "tenants": [ + 2, + "acfb5c31e99c86a30b938aa77044bf50" + ], + "users": [ + 16, + "a9b8df6557614c40059f91266f75d014" + ], + "warehouse_request_events": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "warehouse_requests": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "warehouse_reservations": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "warehouses": [ + 2, + "0016999422a1a64be49876d44785f8f7" + ], + "workflow_notices": [ + 2, + "a2c9a88377910c06b7358375ac88d243" + ], + "sequences": [ + { + "sequencename": "admission_adoptions_id_seq", + "last_value": null + }, + { + "sequencename": "admission_decisions_id_seq", + "last_value": null + }, + { + "sequencename": "admission_policies_id_seq", + "last_value": null + }, + { + "sequencename": "admission_reviews_id_seq", + "last_value": null + }, + { + "sequencename": "approval_steps_id_seq", + "last_value": 3 + }, + { + "sequencename": "audit_logs_id_seq", + "last_value": 56 + }, + { + "sequencename": "award_cancellations_id_seq", + "last_value": null + }, + { + "sequencename": "budget_consumptions_id_seq", + "last_value": null + }, + { + "sequencename": "budget_entries_id_seq", + "last_value": 6 + }, + { + "sequencename": "budget_reinforcements_id_seq", + "last_value": null + }, + { + "sequencename": "budgets_id_seq", + "last_value": 2 + }, + { + "sequencename": "candidate_access_tokens_id_seq", + "last_value": null + }, + { + "sequencename": "candidate_accounts_id_seq", + "last_value": null + }, + { + "sequencename": "candidate_events_id_seq", + "last_value": null + }, + { + "sequencename": "candidate_opportunity_publications_id_seq", + "last_value": null + }, + { + "sequencename": "candidate_portal_versions_id_seq", + "last_value": null + }, + { + "sequencename": "candidate_profile_versions_id_seq", + "last_value": null + }, + { + "sequencename": "candidate_submission_documents_id_seq", + "last_value": null + }, + { + "sequencename": "candidate_submissions_id_seq", + "last_value": null + }, + { + "sequencename": "candidate_triage_id_seq", + "last_value": null + }, + { + "sequencename": "conflict_declarations_id_seq", + "last_value": null + }, + { + "sequencename": "cost_centers_id_seq", + "last_value": 2 + }, + { + "sequencename": "criticality_levels_id_seq", + "last_value": null + }, + { + "sequencename": "departments_id_seq", + "last_value": 2 + }, + { + "sequencename": "equipment_id_seq", + "last_value": null + }, + { + "sequencename": "equipment_spare_parts_id_seq", + "last_value": null + }, + { + "sequencename": "external_payments_id_seq", + "last_value": null + }, + { + "sequencename": "failed_jobs_id_seq", + "last_value": null + }, + { + "sequencename": "goods_receipt_items_id_seq", + "last_value": 1 + }, + { + "sequencename": "goods_receipts_id_seq", + "last_value": 1 + }, + { + "sequencename": "inventory_lot_allocations_id_seq", + "last_value": null + }, + { + "sequencename": "investment_policies_id_seq", + "last_value": null + }, + { + "sequencename": "investment_policy_reviews_id_seq", + "last_value": null + }, + { + "sequencename": "invoice_items_id_seq", + "last_value": null + }, + { + "sequencename": "invoices_id_seq", + "last_value": null + }, + { + "sequencename": "jobs_id_seq", + "last_value": null + }, + { + "sequencename": "migrations_id_seq", + "last_value": 59 + }, + { + "sequencename": "order_cancellation_policies_id_seq", + "last_value": null + }, + { + "sequencename": "order_cancellation_policy_reviews_id_seq", + "last_value": null + }, + { + "sequencename": "order_cancellations_id_seq", + "last_value": null + }, + { + "sequencename": "organization_access_id_seq", + "last_value": null + }, + { + "sequencename": "organization_memberships_id_seq", + "last_value": null + }, + { + "sequencename": "organization_profiles_id_seq", + "last_value": null + }, + { + "sequencename": "pa_access_id_seq", + "last_value": 7 + }, + { + "sequencename": "pa_commands_id_seq", + "last_value": null + }, + { + "sequencename": "pa_events_id_seq", + "last_value": null + }, + { + "sequencename": "pa_history_imports_id_seq", + "last_value": null + }, + { + "sequencename": "pa_imported_payments_id_seq", + "last_value": null + }, + { + "sequencename": "pa_obligations_id_seq", + "last_value": null + }, + { + "sequencename": "pa_payment_decisions_id_seq", + "last_value": null + }, + { + "sequencename": "pa_proposals_id_seq", + "last_value": null + }, + { + "sequencename": "pa_sources_id_seq", + "last_value": null + }, + { + "sequencename": "people_access_states_id_seq", + "last_value": null + }, + { + "sequencename": "people_applications_id_seq", + "last_value": null + }, + { + "sequencename": "people_clarifications_id_seq", + "last_value": null + }, + { + "sequencename": "people_process_access_id_seq", + "last_value": null + }, + { + "sequencename": "people_processes_id_seq", + "last_value": null + }, + { + "sequencename": "people_registry_id_seq", + "last_value": null + }, + { + "sequencename": "people_reviews_id_seq", + "last_value": null + }, + { + "sequencename": "proposal_evaluations_id_seq", + "last_value": 12 + }, + { + "sequencename": "proposal_openings_id_seq", + "last_value": null + }, + { + "sequencename": "purchase_award_approvals_id_seq", + "last_value": 2 + }, + { + "sequencename": "purchase_awards_id_seq", + "last_value": 2 + }, + { + "sequencename": "purchase_control_policies_id_seq", + "last_value": null + }, + { + "sequencename": "purchase_control_reviews_id_seq", + "last_value": null + }, + { + "sequencename": "purchase_order_items_id_seq", + "last_value": 1 + }, + { + "sequencename": "purchase_orders_id_seq", + "last_value": 1 + }, + { + "sequencename": "purchase_plan_items_id_seq", + "last_value": null + }, + { + "sequencename": "purchase_plan_milestones_id_seq", + "last_value": null + }, + { + "sequencename": "purchase_revisions_id_seq", + "last_value": null + }, + { + "sequencename": "qualification_assessments_id_seq", + "last_value": null + }, + { + "sequencename": "qualification_sets_id_seq", + "last_value": null + }, + { + "sequencename": "quotation_items_id_seq", + "last_value": 6 + }, + { + "sequencename": "quotations_id_seq", + "last_value": 6 + }, + { + "sequencename": "receipt_documents_id_seq", + "last_value": null + }, + { + "sequencename": "recommendation_adoptions_id_seq", + "last_value": null + }, + { + "sequencename": "recommendation_attempts_id_seq", + "last_value": null + }, + { + "sequencename": "recommendation_policies_id_seq", + "last_value": null + }, + { + "sequencename": "recommendation_reviews_id_seq", + "last_value": null + }, + { + "sequencename": "replenishment_work_id_seq", + "last_value": null + }, + { + "sequencename": "requisition_catalogue_id_seq", + "last_value": null + }, + { + "sequencename": "requisition_commands_id_seq", + "last_value": 6 + }, + { + "sequencename": "requisition_items_id_seq", + "last_value": 3 + }, + { + "sequencename": "requisitions_id_seq", + "last_value": 3 + }, + { + "sequencename": "spare_parts_id_seq", + "last_value": null + }, + { + "sequencename": "stock_items_id_seq", + "last_value": 104 + }, + { + "sequencename": "stock_movements_id_seq", + "last_value": 1 + }, + { + "sequencename": "stock_operations_id_seq", + "last_value": null + }, + { + "sequencename": "submission_forms_id_seq", + "last_value": null + }, + { + "sequencename": "supplier_bank_details_id_seq", + "last_value": null + }, + { + "sequencename": "supplier_bank_reviews_id_seq", + "last_value": null + }, + { + "sequencename": "supplier_documents_id_seq", + "last_value": null + }, + { + "sequencename": "supplier_evaluations_id_seq", + "last_value": null + }, + { + "sequencename": "supplier_improvements_id_seq", + "last_value": null + }, + { + "sequencename": "supplier_responses_id_seq", + "last_value": null + }, + { + "sequencename": "suppliers_id_seq", + "last_value": 6 + }, + { + "sequencename": "supply_records_id_seq", + "last_value": null + }, + { + "sequencename": "technical_reviews_id_seq", + "last_value": null + }, + { + "sequencename": "tenants_id_seq", + "last_value": 2 + }, + { + "sequencename": "users_id_seq", + "last_value": 16 + }, + { + "sequencename": "warehouse_request_events_id_seq", + "last_value": null + }, + { + "sequencename": "warehouse_requests_id_seq", + "last_value": null + }, + { + "sequencename": "warehouse_reservations_id_seq", + "last_value": null + }, + { + "sequencename": "warehouses_id_seq", + "last_value": 2 + }, + { + "sequencename": "workflow_notices_id_seq", + "last_value": 4 + } + ] + } + }, + "after": { + "host": { + "a_billing_drafts": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "a_clients": [ + 2, + "f9aeb1b7847a76b741e3691bf3af90f6" + ], + "a_commands": [ + 1, + "122f90f714c62ef1725ab3a9aab6db63" + ], + "a_events": [ + 1, + "a3c5f41dbc09d12ebbe35cd8ba276433" + ], + "a_history": [ + 1, + "e440d76c21f5f3ff18e9678150856741" + ], + "a_outbox": [ + 1, + "3f0e84536a1692cd18084b647048cd66" + ], + "a_pending": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "a_service_drafts": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "a_services": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "cb_audit": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "cb_budget_consumptions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "cb_budget_entries": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "cb_budget_reinforcements": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "cb_budgets": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "cb_centres": [ + 1, + "9fdcaf2920a19808fe165c955d032292" + ], + "cb_origins": [ + 1, + "54f47fd8edfc961a9bd697ee6f7bec23" + ], + "companies": [ + 2, + "a98165cd6755267463d9a1403426d855" + ], + "company_memberships": [ + 7, + "803fb8f4b30d7537c81350767b417bb5" + ], + "geo_catalogue_state": [ + 1, + "b60296fc0c59b444ef59e7a895abb4b5" + ], + "geo_commands": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "geo_location_history": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "geo_locations": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "geo_territories": [ + 20407, + "6dec1d1e0ad0b7add87c15f2cce959f6" + ], + "geo_versions": [ + 1, + "7ae31c77856c675eac19b10fe75c3d3a" + ], + "identity_audit": [ + 2, + "180eae005c8c7272a76f0465c448b047" + ], + "password_reset_tokens": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "permission_grants": [ + 65, + "d83457ec0bea3eb71f2bd3b70696314f" + ], + "sessions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "tenants": [ + 1, + "297edfac9c301da9bfb05a4150e5ce45" + ], + "units": [ + 3, + "e6a1f42feb3ecf692dada02610e379a9" + ], + "users": [ + 7, + "6d9655816f197007e30840a9a22c823f" + ], + "sequences": [ + { + "sequencename": "a_billing_drafts_id_seq", + "last_value": null + }, + { + "sequencename": "a_clients_id_seq", + "last_value": 2 + }, + { + "sequencename": "a_commands_id_seq", + "last_value": 1 + }, + { + "sequencename": "a_events_id_seq", + "last_value": 1 + }, + { + "sequencename": "a_history_id_seq", + "last_value": 1 + }, + { + "sequencename": "a_pending_id_seq", + "last_value": null + }, + { + "sequencename": "a_service_drafts_id_seq", + "last_value": null + }, + { + "sequencename": "a_services_id_seq", + "last_value": null + }, + { + "sequencename": "cb_audit_id_seq", + "last_value": null + }, + { + "sequencename": "cb_budget_consumptions_id_seq", + "last_value": null + }, + { + "sequencename": "cb_budget_entries_id_seq", + "last_value": null + }, + { + "sequencename": "cb_budget_reinforcements_id_seq", + "last_value": null + }, + { + "sequencename": "cb_budgets_id_seq", + "last_value": null + }, + { + "sequencename": "cb_centres_id_seq", + "last_value": 1 + }, + { + "sequencename": "cb_origins_id_seq", + "last_value": 1 + }, + { + "sequencename": "companies_id_seq", + "last_value": 2 + }, + { + "sequencename": "geo_location_history_id_seq", + "last_value": null + }, + { + "sequencename": "identity_audit_id_seq", + "last_value": 2 + }, + { + "sequencename": "permission_grants_id_seq", + "last_value": 82 + }, + { + "sequencename": "tenants_id_seq", + "last_value": 1 + }, + { + "sequencename": "units_id_seq", + "last_value": 3 + }, + { + "sequencename": "users_id_seq", + "last_value": 7 + } + ] + }, + "native": { + "admission_adoptions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "admission_decisions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "admission_policies": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "admission_reviews": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "approval_steps": [ + 2, + "b6cc4afd594d6cf09a34d9bb89dd6093" + ], + "audit_logs": [ + 40, + "544e3c69a37221627d1a941ca3d29e7d" + ], + "award_cancellations": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "budget_consumptions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "budget_entries": [ + 4, + "11550cb54dc673bd081f433c413a76fa" + ], + "budget_reinforcements": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "budgets": [ + 2, + "d69dff6d190bb4b7dcf5e5fcb5e26e2d" + ], + "cache": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "cache_locks": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "candidate_access_tokens": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "candidate_accounts": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "candidate_events": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "candidate_opportunity_publications": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "candidate_portal_versions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "candidate_profile_versions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "candidate_submission_documents": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "candidate_submissions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "candidate_triage": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "conflict_declarations": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "cost_centers": [ + 2, + "ab0c64c9f959bba22958dda10126bfea" + ], + "criticality_levels": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "departments": [ + 2, + "e9fc3dde81bb9e1a127062f5d81ffde4" + ], + "equipment": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "equipment_spare_parts": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "external_payments": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "failed_jobs": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "goods_receipt_items": [ + 1, + "f756b5d54ad9c3dd0561aa17eeb58b0d" + ], + "goods_receipts": [ + 1, + "56f0044f5a6eec1e87014ad1cbea407c" + ], + "inventory_lot_allocations": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "investment_policies": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "investment_policy_reviews": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "invoice_items": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "invoices": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "job_batches": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "jobs": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "migrations": [ + 59, + "85704abff601413f68780d503e192954" + ], + "order_cancellation_policies": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "order_cancellation_policy_reviews": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "order_cancellations": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "organization_access": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "organization_memberships": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "organization_profiles": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "pa_access": [ + 7, + "68aef32b0f2fb866485dde0c5318fbcf" + ], + "pa_commands": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "pa_events": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "pa_history_imports": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "pa_imported_payments": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "pa_obligations": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "pa_outbox": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "pa_payment_decisions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "pa_proposals": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "pa_sources": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "password_reset_tokens": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "people_access_states": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "people_applications": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "people_clarifications": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "people_process_access": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "people_processes": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "people_registry": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "people_reviews": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "proposal_evaluations": [ + 6, + "d69a6d828f181e574cdea6398a13305c" + ], + "proposal_openings": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "purchase_award_approvals": [ + 1, + "76690e7eeec9059a9d9e9a1e0a532c19" + ], + "purchase_awards": [ + 1, + "fdd69ecdfba1d0016658a3295325f89a" + ], + "purchase_control_policies": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "purchase_control_reviews": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "purchase_order_items": [ + 1, + "17000674fb6d4ae3067312af906aabe0" + ], + "purchase_orders": [ + 1, + "75c1e778d180ef78ca6d8b0617d0c0c1" + ], + "purchase_plan_items": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "purchase_plan_milestones": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "purchase_revisions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "qualification_assessments": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "qualification_sets": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "quotation_items": [ + 3, + "a997a2c190d467ef9e8617fc33986691" + ], + "quotations": [ + 3, + "b83713bf489c3c6e2c7e47a520fe51f3" + ], + "receipt_documents": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "recommendation_adoptions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "recommendation_attempts": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "recommendation_policies": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "recommendation_reviews": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "replenishment_work": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "requisition_catalogue": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "requisition_commands": [ + 3, + "af40dba77ce32494ab43be9a84ab396f" + ], + "requisition_items": [ + 2, + "a000404ef3f0532f0acc1cd1ba335c9e" + ], + "requisitions": [ + 2, + "e005770c14d0fc1962bd3a7b92faf13a" + ], + "sessions": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "spare_parts": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "stock_items": [ + 104, + "b5515f8ea00a295674caa63d565134fa" + ], + "stock_movements": [ + 1, + "b278f002da6594089bc82d6185cffc7c" + ], + "stock_operations": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "submission_forms": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "supplier_bank_details": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "supplier_bank_reviews": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "supplier_documents": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "supplier_evaluations": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "supplier_improvements": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "supplier_responses": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "suppliers": [ + 6, + "8966e0f4072ba49dc6a98bd080fba07c" + ], + "supply_records": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "technical_reviews": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "tenants": [ + 2, + "acfb5c31e99c86a30b938aa77044bf50" + ], + "users": [ + 16, + "a9b8df6557614c40059f91266f75d014" + ], + "warehouse_request_events": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "warehouse_requests": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "warehouse_reservations": [ + 0, + "d41d8cd98f00b204e9800998ecf8427e" + ], + "warehouses": [ + 2, + "0016999422a1a64be49876d44785f8f7" + ], + "workflow_notices": [ + 2, + "a2c9a88377910c06b7358375ac88d243" + ], + "sequences": [ + { + "sequencename": "admission_adoptions_id_seq", + "last_value": null + }, + { + "sequencename": "admission_decisions_id_seq", + "last_value": null + }, + { + "sequencename": "admission_policies_id_seq", + "last_value": null + }, + { + "sequencename": "admission_reviews_id_seq", + "last_value": null + }, + { + "sequencename": "approval_steps_id_seq", + "last_value": 3 + }, + { + "sequencename": "audit_logs_id_seq", + "last_value": 56 + }, + { + "sequencename": "award_cancellations_id_seq", + "last_value": null + }, + { + "sequencename": "budget_consumptions_id_seq", + "last_value": null + }, + { + "sequencename": "budget_entries_id_seq", + "last_value": 6 + }, + { + "sequencename": "budget_reinforcements_id_seq", + "last_value": null + }, + { + "sequencename": "budgets_id_seq", + "last_value": 2 + }, + { + "sequencename": "candidate_access_tokens_id_seq", + "last_value": null + }, + { + "sequencename": "candidate_accounts_id_seq", + "last_value": null + }, + { + "sequencename": "candidate_events_id_seq", + "last_value": null + }, + { + "sequencename": "candidate_opportunity_publications_id_seq", + "last_value": null + }, + { + "sequencename": "candidate_portal_versions_id_seq", + "last_value": null + }, + { + "sequencename": "candidate_profile_versions_id_seq", + "last_value": null + }, + { + "sequencename": "candidate_submission_documents_id_seq", + "last_value": null + }, + { + "sequencename": "candidate_submissions_id_seq", + "last_value": null + }, + { + "sequencename": "candidate_triage_id_seq", + "last_value": null + }, + { + "sequencename": "conflict_declarations_id_seq", + "last_value": null + }, + { + "sequencename": "cost_centers_id_seq", + "last_value": 2 + }, + { + "sequencename": "criticality_levels_id_seq", + "last_value": null + }, + { + "sequencename": "departments_id_seq", + "last_value": 2 + }, + { + "sequencename": "equipment_id_seq", + "last_value": null + }, + { + "sequencename": "equipment_spare_parts_id_seq", + "last_value": null + }, + { + "sequencename": "external_payments_id_seq", + "last_value": null + }, + { + "sequencename": "failed_jobs_id_seq", + "last_value": null + }, + { + "sequencename": "goods_receipt_items_id_seq", + "last_value": 1 + }, + { + "sequencename": "goods_receipts_id_seq", + "last_value": 1 + }, + { + "sequencename": "inventory_lot_allocations_id_seq", + "last_value": null + }, + { + "sequencename": "investment_policies_id_seq", + "last_value": null + }, + { + "sequencename": "investment_policy_reviews_id_seq", + "last_value": null + }, + { + "sequencename": "invoice_items_id_seq", + "last_value": null + }, + { + "sequencename": "invoices_id_seq", + "last_value": null + }, + { + "sequencename": "jobs_id_seq", + "last_value": null + }, + { + "sequencename": "migrations_id_seq", + "last_value": 59 + }, + { + "sequencename": "order_cancellation_policies_id_seq", + "last_value": null + }, + { + "sequencename": "order_cancellation_policy_reviews_id_seq", + "last_value": null + }, + { + "sequencename": "order_cancellations_id_seq", + "last_value": null + }, + { + "sequencename": "organization_access_id_seq", + "last_value": null + }, + { + "sequencename": "organization_memberships_id_seq", + "last_value": null + }, + { + "sequencename": "organization_profiles_id_seq", + "last_value": null + }, + { + "sequencename": "pa_access_id_seq", + "last_value": 7 + }, + { + "sequencename": "pa_commands_id_seq", + "last_value": null + }, + { + "sequencename": "pa_events_id_seq", + "last_value": null + }, + { + "sequencename": "pa_history_imports_id_seq", + "last_value": null + }, + { + "sequencename": "pa_imported_payments_id_seq", + "last_value": null + }, + { + "sequencename": "pa_obligations_id_seq", + "last_value": null + }, + { + "sequencename": "pa_payment_decisions_id_seq", + "last_value": null + }, + { + "sequencename": "pa_proposals_id_seq", + "last_value": null + }, + { + "sequencename": "pa_sources_id_seq", + "last_value": null + }, + { + "sequencename": "people_access_states_id_seq", + "last_value": null + }, + { + "sequencename": "people_applications_id_seq", + "last_value": null + }, + { + "sequencename": "people_clarifications_id_seq", + "last_value": null + }, + { + "sequencename": "people_process_access_id_seq", + "last_value": null + }, + { + "sequencename": "people_processes_id_seq", + "last_value": null + }, + { + "sequencename": "people_registry_id_seq", + "last_value": null + }, + { + "sequencename": "people_reviews_id_seq", + "last_value": null + }, + { + "sequencename": "proposal_evaluations_id_seq", + "last_value": 12 + }, + { + "sequencename": "proposal_openings_id_seq", + "last_value": null + }, + { + "sequencename": "purchase_award_approvals_id_seq", + "last_value": 2 + }, + { + "sequencename": "purchase_awards_id_seq", + "last_value": 2 + }, + { + "sequencename": "purchase_control_policies_id_seq", + "last_value": null + }, + { + "sequencename": "purchase_control_reviews_id_seq", + "last_value": null + }, + { + "sequencename": "purchase_order_items_id_seq", + "last_value": 1 + }, + { + "sequencename": "purchase_orders_id_seq", + "last_value": 1 + }, + { + "sequencename": "purchase_plan_items_id_seq", + "last_value": null + }, + { + "sequencename": "purchase_plan_milestones_id_seq", + "last_value": null + }, + { + "sequencename": "purchase_revisions_id_seq", + "last_value": null + }, + { + "sequencename": "qualification_assessments_id_seq", + "last_value": null + }, + { + "sequencename": "qualification_sets_id_seq", + "last_value": null + }, + { + "sequencename": "quotation_items_id_seq", + "last_value": 6 + }, + { + "sequencename": "quotations_id_seq", + "last_value": 6 + }, + { + "sequencename": "receipt_documents_id_seq", + "last_value": null + }, + { + "sequencename": "recommendation_adoptions_id_seq", + "last_value": null + }, + { + "sequencename": "recommendation_attempts_id_seq", + "last_value": null + }, + { + "sequencename": "recommendation_policies_id_seq", + "last_value": null + }, + { + "sequencename": "recommendation_reviews_id_seq", + "last_value": null + }, + { + "sequencename": "replenishment_work_id_seq", + "last_value": null + }, + { + "sequencename": "requisition_catalogue_id_seq", + "last_value": null + }, + { + "sequencename": "requisition_commands_id_seq", + "last_value": 6 + }, + { + "sequencename": "requisition_items_id_seq", + "last_value": 3 + }, + { + "sequencename": "requisitions_id_seq", + "last_value": 3 + }, + { + "sequencename": "spare_parts_id_seq", + "last_value": null + }, + { + "sequencename": "stock_items_id_seq", + "last_value": 104 + }, + { + "sequencename": "stock_movements_id_seq", + "last_value": 1 + }, + { + "sequencename": "stock_operations_id_seq", + "last_value": null + }, + { + "sequencename": "submission_forms_id_seq", + "last_value": null + }, + { + "sequencename": "supplier_bank_details_id_seq", + "last_value": null + }, + { + "sequencename": "supplier_bank_reviews_id_seq", + "last_value": null + }, + { + "sequencename": "supplier_documents_id_seq", + "last_value": null + }, + { + "sequencename": "supplier_evaluations_id_seq", + "last_value": null + }, + { + "sequencename": "supplier_improvements_id_seq", + "last_value": null + }, + { + "sequencename": "supplier_responses_id_seq", + "last_value": null + }, + { + "sequencename": "suppliers_id_seq", + "last_value": 6 + }, + { + "sequencename": "supply_records_id_seq", + "last_value": null + }, + { + "sequencename": "technical_reviews_id_seq", + "last_value": null + }, + { + "sequencename": "tenants_id_seq", + "last_value": 2 + }, + { + "sequencename": "users_id_seq", + "last_value": 16 + }, + { + "sequencename": "warehouse_request_events_id_seq", + "last_value": null + }, + { + "sequencename": "warehouse_requests_id_seq", + "last_value": null + }, + { + "sequencename": "warehouse_reservations_id_seq", + "last_value": null + }, + { + "sequencename": "warehouses_id_seq", + "last_value": 2 + }, + { + "sequencename": "workflow_notices_id_seq", + "last_value": 4 + } + ] + } + }, + "read_only_overlay": true, + "business_commands": 0, + "direct_guard_probes": 1, + "visual_review": false + } + }, + "ui": { + "file": "private/stock-trace-read-c8fbd4cec515/stock-trace-ui.json", + "sha256": "d9a1d37d7fa2a630486542ddc90ad1705b87a16ecb73fc6a1626df62229a1aff", + "checks": 20, + "result": { + "passed": true, + "checks": [ + "explicit handoff selects the same company/unit before committing token and navigating locally", + "invalid movement identifiers cannot become navigation targets", + "missing rights unit module or capability cannot initiate a context change", + "stale source context is rejected before requesting a transition", + "refused module transition leaves navigation and committed token unchanged", + "late transition response cannot navigate after another context wins", + "unexpected destination scope cannot be committed or navigated", + "movement startup and existing order/receipt deep links remain explicit", + "ambiguous mixed or external origin hints are rejected", + "destination resolves the exact current parent and receipt before opening evidence", + "source resolution arriving after another selection cannot open an old receipt", + "inconsistent resolver response opens no fallback receipt", + "actual React origin action uses only the displayed movement id", + "actual origin action is absent without capability for other movement kinds or invalid ids", + "origin action is disabled while its source query is loading", + "actual receipt workspace opens resolved evidence even outside its first list page", + "actual movement-focused startup performs no preview or business confirmation", + "actual startup refusal preserves empty evidence and chooses no fallback order", + "actual receipt workspace still rejects a parent mismatch before rendering evidence", + "actual mixed link lists only and never resolves a guessed source" + ], + "simulated_dom": true, + "react_component": true, + "context_selection_only": true, + "business_commands": 0, + "visual_review": false + } + }, + "demo": { + "file": "private/receipt-composition-73a9188da342/stock-trace-demo.json", + "sha256": "d61eae2fa20fa84b1081a134c62772cf833abd3f971cc930f392fcb4ced2646f", + "checks": 10, + "result": { + "passed": true, + "checks": [ + "fresh trace demonstration begins without main business operations", + "authorised Stock capability is present without inventing a movement or selected receipt", + "existing React host is mounted for explicit Stock entry", + "served build contains the current trace integration artifact", + "real existing context API changes only the selected module and renews its token", + "old Stock token cannot be reused at Purchasing destination", + "current destination refuses a nonexistent movement rather than selecting another source", + "new receipt startup is mounted without preparing an operation", + "served receipt resolver helper matches the reviewed local artifact", + "module selection adds only its existing context audit while physical evidence and rights stay unchanged" + ], + "physical_before": "c55603fa198fb14aa35396c7d7bc209a6b1b0d2524d2a75c2506ba241203c4c4", + "physical_after": "c55603fa198fb14aa35396c7d7bc209a6b1b0d2524d2a75c2506ba241203c4c4", + "context_changes": 1, + "business_commands": 0, + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/StockReceiptTraceController.php", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594" + }, + { + "file": "app/Modules/Inventory/CompositionStockRead.php", + "sha256": "22891dc1a346caca14cb9d03c2d2f7d772a11d937774fae9e5fc041c8aacf4e2" + }, + { + "file": "routes/web.php", + "sha256": "39caa160f9ed0a4e51bd0fdb5dbfd4b11351e66a87ef74decd51d88b1ef24c7f" + }, + { + "file": "config/receipt_qa.php", + "sha256": "0bf380dc8750313163afd38c8e3a17596a834bca72dbd2884c679db6d7e10813" + }, + { + "file": "resources/js/app.jsx", + "sha256": "d0d3db22cfd3121e4c674285285f4ae45360c6e70a582f016997bbd6679334ab" + }, + { + "file": "resources/js/stock-receipt-trace.js", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6" + }, + { + "file": "resources/js/StockReadWorkspace.jsx", + "sha256": "e581400a2192c0a48d49d2c30b0544ad75003bc6e3c1fa6bbffcc3c0a1c7fb52" + }, + { + "file": "resources/js/StockMenuWorkspace.jsx", + "sha256": "27688a4483a02080a1cd739d1310f8be82d403c83b2b56f37fd2ebafc2797591" + }, + { + "file": "public/purchasing-focus.mjs", + "sha256": "4faeed00b7d9c5de99932a633f4bd7ff4a0f61bc7aa5afcf9a7ff5b1aebc34b8" + }, + { + "file": "public/stock-receipt-focus.mjs", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827" + }, + { + "file": "public/receipt-workspace.mjs", + "sha256": "5825d0f6965f55b9e5aee437d02f6664ff29e60f50d96ccec7b6498caad063bd" + } + ], + "unchanged_authority": [ + { + "file": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df" + }, + { + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + }, + { + "file": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + }, + { + "file": "packages/inventory-read/src/InventoryReadSession.php", + "sha256": "e5ea1ec6771e34478367218d73ba1d1d90464ddc87d1c5fa3d679622ffb81111" + }, + { + "file": "resources/js/context-transition.js", + "sha256": "3d76e21eca185ae97c1a6a6f5965ab33c242a28391c8c50f5af30dfc0a4a3c6a" + }, + { + "file": "app/Modules/Identity/Services/IdentityWorkflow.php", + "sha256": "28a075a5819181ebd07c45066c4272f15a38bd532d4df0bd7ba0b7886b2d9bf0" + }, + { + "file": "app/Shared/Context/ModuleNavigation.php", + "sha256": "397d7a4af7d16547ff60ea20a6733aa994d98a6ecf0cbca4b1437da14c3c55a1" + } + ], + "accepted_navigation_function_unchanged": true, + "pinned_native_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "build": { + "manifest_sha256": "feb3d69929c99a697b57c6471e9b182079ef97afb7b76505daafd8b3492395d4", + "entry_sha256": "5f3906e46ae7ad5465807961bac535913912d43f51af265e2c0dbc29d8b427e5" + }, + "demo": { + "port": 8084, + "entry": "http://127.0.0.1:8084/qa/enter/validator?module=stock&open=1", + "navigate": "Stock > Existências > Movimentos > Conferir recepção em Compras", + "initial_main_requests": 0, + "initial_receipts": 0, + "initial_movements": 0 + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/stock-composed-source-20261103.json", + "sha256": "7f1fc61962e68b1676fad694068761158edc41623dee73238b012c37da593caa" + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "new_permission_names": [], + "new_real_grants": false, + "stock_reader_grants_widened": false, + "reused_host_tables": 31, + "reused_native_tables": 111, + "reused_business_commands": 0, + "target_database_connected": false, + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "previous_demo_data_written": false, + "publication": false, + "checkpoint": false + }, + "limitations": [ + "The resolver is only for receipt_in movements created by the current writer with a consistent receipt_id. Historical unlinked movements and other movement kinds are not inferred.", + "The Stock SELECT-only connection remains limited to three tables. Receipt resolution uses the existing authorised Purchasing runtime and its locking model, not the Stock technical reader.", + "Existing 14 backend assertions are reused after fixing object-identity comparison in the preservation harness. The additional suffix observes both APIs and proves31 host/111 native tables and sequences unchanged. No business source setup is replayed.", + "20 UI checks use helper calls, actual React component rendering/callback and simulated DOM startup. No browser visual proof or unsaved-form acceptance is claimed.", + "The fresh demo verifies a real context-selection POST and renewed token with one existing context audit, then refuses an unknown origin. Its book starts empty; the positive receipt correlation is proved in the read-only overlay of the completed QA book.", + "A demo harness initially queried an incorrectly named audit table; corrected to identity_audit before testing the actual module transition. No business operation was issued.", + "No new movement, payment, valuation, ledger entry, operational installation, sustained-load or deployment-capacity validation." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/stock-trace-flow-20261103.json b/docs/proofs/stock-trace-flow-20261103.json new file mode 100644 index 0000000..0eae9dd --- /dev/null +++ b/docs/proofs/stock-trace-flow-20261103.json @@ -0,0 +1,797 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "e515906103a045c3f1cafc18753e1ef4157bcc80be349bf702d322fe4a4c8c20", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "fd02da1a69f76bf1412f86f43095a0a476de49fbb7d2676a51fe3b29ec66e298", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_screen", + "repository": "sgf", + "path": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_screen", + "repository": "sgf", + "path": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "73a73bc3f33fede454d40ab7506274ec5128c317e4fc0cbc38fa3808bc6be074", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_workspace", + "repository": "sgf", + "path": "app/Modules/Purchasing/WorkspaceNavigation.php", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_navigation", + "repository": "sgf", + "path": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_picker", + "repository": "sgf", + "path": "public/supplier-picker-model.mjs", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_search_ui", + "repository": "sgf", + "path": "public/sourcing-workspace.mjs", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/DossierController.php", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_screen", + "repository": "sgf", + "path": "resources/views/purchasing-dossier.blade.php", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_ui", + "repository": "sgf", + "path": "public/purchasing-dossier.mjs", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_catalogue", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptCatalogue.php", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_workspace_ui", + "repository": "sgf", + "path": "public/receipt-workspace.mjs", + "sha256": "5825d0f6965f55b9e5aee437d02f6664ff29e60f50d96ccec7b6498caad063bd", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentsController.php", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_storage", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_ui", + "repository": "sgf", + "path": "public/supplier-documents.mjs", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_process_navigation", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessNavigation.php", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_focus", + "repository": "sgf", + "path": "public/purchasing-focus.mjs", + "sha256": "4faeed00b7d9c5de99932a633f4bd7ff4a0f61bc7aa5afcf9a7ff5b1aebc34b8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stage_history", + "repository": "sgf", + "path": "app/Modules/Purchasing/ProcessHistory.php", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_workspace_ui", + "repository": "sgf", + "path": "public/supplier-invoice-workspace.mjs", + "sha256": "a05b4f56151b8bc9735a0ba2ce47b475e22623aabb8be99a98290860efd6ae9e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_workspace_ui", + "repository": "sgf", + "path": "public/supplier-obligation-workspace.mjs", + "sha256": "7f5c8ca11ad603e55c408356c7fb2a46782662d0107caffedcd9d4966a9163e7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_history_ui", + "repository": "sgf", + "path": "public/request-history.mjs", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_workspace_ui", + "repository": "sgf", + "path": "public/request-workspace.mjs", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_matching_progress", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceMatchingProgress.php", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_invoice_matching_ui", + "repository": "sgf", + "path": "public/invoice-matching.mjs", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_evidence_ui", + "repository": "sgf", + "path": "public/obligation-evidence.mjs", + "sha256": "c47a75e69d8ea767bc7e07e6fe5fa924fcc4fbd1bd1a90f526ecf255eb2e6fb5", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_composed_stock_read", + "repository": "sgf", + "path": "app/Modules/Inventory/CompositionStockRead.php", + "sha256": "22891dc1a346caca14cb9d03c2d2f7d772a11d937774fae9e5fc041c8aacf4e2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_receipt_trace", + "repository": "sgf", + "path": "app/Modules/Purchasing/StockReceiptTraceController.php", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_receipt_transition", + "repository": "sgf", + "path": "resources/js/stock-receipt-trace.js", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_stock_receipt_focus", + "repository": "sgf", + "path": "public/stock-receipt-focus.mjs", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. A subsequent scope fix filters request/sourcing audit events in SQL before limits/counts/pages, closing an alternate downstream financial-history exposure without changing original audit or writers. Empty initial supplier searches now survive middleware normalisation while closed-award and permission guards remain. Completed canonical history book is reused read-only with142 tables/sequences intact. Demo8080 removes the direct request-history25-event cap using bounded cursor pages25/100, own-stage SQL filtering and encrypted request/actor/context/size-bound cursors with600-second lifetime. Initial page is reused; history refresh does not reset unsaved request fields.127 original event ids traverse once despite a new head note; refresh includes128. Audit-volume fixtures are not operational request revisions. An inherited100MZN order setup was preserved and removed from future history harness runs. This is not a persistent MVCC snapshot, visual acceptance, sustained-load or deployment validation." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Demo8079 fixes the actual form-to-picker binding and blank initial article search. DOM-to-real-HTTP proof selects an article, transmits its revision, previews, confirms1UN and recovers a deliberately lost response with201/200, one receipt/movement. This is not browser visual acceptance or a new concurrency/load trial. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending. The integrated Purchasing QA host now observes the same physical book through a SELECT-only Stock role, explicit warehouse mapping and existing React reader (demo8083). Operational installation and real bindings remain pending; no additional valuation or availability is supplied. Demo8084 adds explicit Stock-to-Purchasing receipt evidence navigation for current receipt_in movements. The server resolves actual parent ids, current rights and scope; no inferred historical origin, business command or wider Stock reader grants. Existing Purchasing runtime locks remain; no new load/deployment claim." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8081 exposes per-line ordered/accepted/returned/reversed/validated/pending/remaining quantities using two aggregate fact queries and original correction values. Pending documents do not reserve quantity; overlap is a read warning, not a replacement for native validation. Two completed QA books are reused read-only with all tables/sequences unchanged. The display revision uses one original state observation before capability decoration; mutation/state definitions are unchanged. Full dependency materialisation, large invoice-history scaling, visual review, sustained load and deployment remain pending." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8082 separates evidence browsing from an explicitly selected proposal decision. Reason and preview survive pagination; changed observed source/actor/permissions invalidate old forms, and late reads/previews cannot reactivate them. Temporary read failure preserves the form; in-flight operations prevent selection changes.26 new simulated-UI/demo checks reuse72 native authority checks without repetition. Controller/runtime/kernel and legacy evidence branch are unchanged. No new real confirmation, financial writer, backend pagination protocol, visual/load or deployment validation." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/stock-trace-matrix-20261103.json b/docs/proofs/stock-trace-matrix-20261103.json new file mode 100644 index 0000000..c3b22c0 --- /dev/null +++ b/docs/proofs/stock-trace-matrix-20261103.json @@ -0,0 +1,2662 @@ +{ + "date": "2026-11-03T20:53:55.009Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "e515906103a045c3f1cafc18753e1ef4157bcc80be349bf702d322fe4a4c8c20", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "c6e066c436ba7002feef63f3fa280c5a0d158fe01dfe0091cfd03fac8e61d959" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "84d807fe841a47335836e281677813157d78ed28c4e46cf1a4267121b7aedf17" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "67123c60d74807568c53a0c8d9ce8a7685a3b77115cb9fd37bef874e63a2c980" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "1cb75d7bc03105e0df4211b4470bdc8837f4a659bc65318286228949779d9dc6" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "c5c2b78866be7f0e1c8ba09c1af538cefcfbafbea81197833b50821bba0fcbca" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "6d1a344e62958b3ae654f6c519cf420906ac3bb3aa257839ce58d77d795af86b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_workspace", + "file": "app/Modules/Purchasing/WorkspaceNavigation.php", + "repository": "sgf", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1" + }, + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_navigation", + "file": "resources/views/partials/purchasing-navigation.blade.php", + "repository": "sgf", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_picker", + "file": "public/supplier-picker-model.mjs", + "repository": "sgf", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_search_ui", + "file": "public/sourcing-workspace.mjs", + "repository": "sgf", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "15ed768992dfd8858df65ce7fa41c733906875aec98b1c347169d83571cde52e" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "81bcbf8bc45d7005b9de635c6476437d3ce13e2f17d98dfc2aad4a4892eb2c52" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_controller", + "file": "app/Modules/Purchasing/DossierController.php", + "repository": "sgf", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "73133fd4075c76a4933d4475275d017fb0392e64076ff3bd7b284e0b967781d7" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_screen", + "file": "resources/views/purchasing-dossier.blade.php", + "repository": "sgf", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "f8c1466cf669fe69a70320c8851ffe1b511a351934902fa77f1354a9eb1d4f56" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_ui", + "file": "public/purchasing-dossier.mjs", + "repository": "sgf", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "3a632080b0952e28e2dbeb65367f76acb72025d43c850567cf655419710c1384" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_documents", + "file": "app/Modules/Purchasing/SupplierDocumentsController.php", + "repository": "sgf", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_document_storage", + "file": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "repository": "sgf", + "sha256": "cc140b5c56781fbcb8f582972b6030e8602fd1fe4ad02d435ae6676f177819db", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "a8c7fbe18d9ccd6a7e6fd27275e8827ac6a75f4b147ec02b06fabc30a15f29c8" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_document_ui", + "file": "public/supplier-documents.mjs", + "repository": "sgf", + "sha256": "accfc25b8c20a975032e30a01443a2286de0212ed34cd9d9c321ef5c87aa0b36", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "70e96bc60238efe6bb8a65297f7412fee9abb143dd96805713bb1deafc784820" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_process_navigation", + "file": "app/Modules/Purchasing/ProcessNavigation.php", + "repository": "sgf", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "6e1f5e6e3db88be7ab91e233e4bb8225df524b71b06ea68ab967fd2541f9303d" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_focus", + "file": "public/purchasing-focus.mjs", + "repository": "sgf", + "sha256": "4faeed00b7d9c5de99932a633f4bd7ff4a0f61bc7aa5afcf9a7ff5b1aebc34b8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "77a18d186c8ebb5065cf60816b7fd8d11a37fe801296a60f06ff0a6cf590b2e4" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "434319b8de23f5d6892666bd53232d463a0d458fe948cc6d7b476ad1228fafb6" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_stage_history", + "file": "app/Modules/Purchasing/ProcessHistory.php", + "repository": "sgf", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "255a4ca5901cf323e3fd16e2fb16509962710c5d5b67e2e425cdc1f7e7a257a2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_history_ui", + "file": "public/request-history.mjs", + "repository": "sgf", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "523b8d018d0191c68628922b180b8798e567b8bb4b54ce986002fcbb6c5a809e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_workspace_ui", + "file": "public/request-workspace.mjs", + "repository": "sgf", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "e878fc3c7bc5ba24aa2b17fe41ffeda3267721b5beb2a1a3a0cb11f56d7dc93d" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "384c67310d2a7adab7a94273bab385dff74af76c293622bb3c0d087245d7e6d8" + }, + { + "proof": "docs/proofs/request-history-composition-20261103.json", + "sha256": "9a44d4153b8a158dc310ff157ecc0b108888661c6c467f46a099e2abee869cb4" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-search-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 51 + } + ], + "sha256": "388e738da7e9b3e7f521c8d67f85dd4ef34869c74daf0c04c09067b9fbde5242", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 52 + } + ], + "sha256": "d5709128ee45b7ee1397695b06502b9386dccd13779203c13abbd54281552068", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-history-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 36 + } + ], + "sha256": "564e0fdbc6a7a1142e72dbf835a96dadf0363d3dc963fc4cdc0a40bd05b8c26e", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. A subsequent scope fix filters request/sourcing audit events in SQL before limits/counts/pages, closing an alternate downstream financial-history exposure without changing original audit or writers. Empty initial supplier searches now survive middleware normalisation while closed-award and permission guards remain. Completed canonical history book is reused read-only with142 tables/sequences intact. Demo8080 removes the direct request-history25-event cap using bounded cursor pages25/100, own-stage SQL filtering and encrypted request/actor/context/size-bound cursors with600-second lifetime. Initial page is reused; history refresh does not reset unsaved request fields.127 original event ids traverse once despite a new head note; refresh includes128. Audit-volume fixtures are not operational request revisions. An inherited100MZN order setup was preserved and removed from future history harness runs. This is not a persistent MVCC snapshot, visual acceptance, sustained-load or deployment validation.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "7ed4b9292e214b11c42af1eae3fb63d967a7e15f026648c957f8a5b54f211f69" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "51a0fa060fcce212646cf22332df352d90a5994cb7785eedc789585e02569616" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "0226b354db20a0eab19598ff35dbb35e0fa7f117de0c477e0b870159024d49df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "40e7db8ac3d47b60f46fb5b8c623dec9ff9716bc9f2e1ea400d0751f0d0cf890" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "57018d5cc586e2ff03bbf09f97853a2eb297fc1ad7e7f3b8b3dc2f8d76008d3d" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_catalogue", + "file": "app/Modules/Purchasing/ReceiptCatalogue.php", + "repository": "sgf", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_workspace_ui", + "file": "public/receipt-workspace.mjs", + "repository": "sgf", + "sha256": "5825d0f6965f55b9e5aee437d02f6664ff29e60f50d96ccec7b6498caad063bd", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "f286a99bb0df5c6080e8104d501707e5a9e13046d5dd7144dec32bf0817a92a0" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "10b412a5ec6c973152f165b34caacc685e25bcf2eb0e6ba2f7f7e58df4e1f00a" + }, + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "a128926d876ae10eb2a17ec2410ba99282d782f03bb9642cbdcad93d548ce002" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "f0f242538e4131910d612da1f5b22e4955f3bdc58d4c4121d7b1242a5eb52df5" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "86421d30dc9868b10da2153f8bf0b50d9904ab5ccccbf9813464083ae1e20bd2" + }, + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "5825d0f6965f55b9e5aee437d02f6664ff29e60f50d96ccec7b6498caad063bd" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_documents", + "file": "app/Modules/Purchasing/ReceiptDocumentsController.php", + "repository": "sgf", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-documents-composition-20261103.json", + "sha256": "ae238ccec6628949dac4d18cc3514849303dda432ec371f7507e84498108e03c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_composed_stock_read", + "file": "app/Modules/Inventory/CompositionStockRead.php", + "repository": "sgf", + "sha256": "22891dc1a346caca14cb9d03c2d2f7d772a11d937774fae9e5fc041c8aacf4e2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-composed-source-20261103.json", + "sha256": "cf4a954c460226d58ae8478a23f26744b39affa12054b6299e1958488a411788" + }, + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "22891dc1a346caca14cb9d03c2d2f7d772a11d937774fae9e5fc041c8aacf4e2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_trace", + "file": "app/Modules/Purchasing/StockReceiptTraceController.php", + "repository": "sgf", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_transition", + "file": "resources/js/stock-receipt-trace.js", + "repository": "sgf", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_focus", + "file": "public/stock-receipt-focus.mjs", + "repository": "sgf", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-workspace-completion-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "59bb66df5d5e12f898045669a0ad24664c3d09f2d3ab6cf70f4f13d6a34c6548", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 58 + } + ], + "sha256": "b820a6b355450a79c9f244ce8eb6950e7c1cbe4427bf85bca772fb0fc5c085d2", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-composed-source-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "7f1fc61962e68b1676fad694068761158edc41623dee73238b012c37da593caa", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-trace-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 46 + } + ], + "sha256": "29ffe0d5e588af175d926444e84faa655560999dfcff58dcf8eb37a3423f07b7", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim. Receipt delivery/quality/other binary evidence is delivered in demo8077 through the pinned native attachment service and private download, with bounded pages15 and dossier events. Individual reason, current source/context/revision/bytes, idempotent keys, content reuse within receipt/type and verified rollback compensation are proven. One HTTP-created document and15 native volume fixtures preserve one1000milli physical movement. Attachment is not a new acceptance/quality decision or authenticity certification. Orphan reconciliation, retention/quotas, other origins, visual review, sustained load and deployment remain separate. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Demo8079 fixes the actual form-to-picker binding and blank initial article search. DOM-to-real-HTTP proof selects an article, transmits its revision, previews, confirms1UN and recovers a deliberately lost response with201/200, one receipt/movement. This is not browser visual acceptance or a new concurrency/load trial. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "fd02da1a69f76bf1412f86f43095a0a476de49fbb7d2676a51fe3b29ec66e298", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + }, + { + "proof": "docs/proofs/stock-composed-source-20261103.json", + "sha256": "fd02da1a69f76bf1412f86f43095a0a476de49fbb7d2676a51fe3b29ec66e298" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_composed_stock_read", + "file": "app/Modules/Inventory/CompositionStockRead.php", + "repository": "sgf", + "sha256": "22891dc1a346caca14cb9d03c2d2f7d772a11d937774fae9e5fc041c8aacf4e2", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-composed-source-20261103.json", + "sha256": "cf4a954c460226d58ae8478a23f26744b39affa12054b6299e1958488a411788" + }, + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "22891dc1a346caca14cb9d03c2d2f7d772a11d937774fae9e5fc041c8aacf4e2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_trace", + "file": "app/Modules/Purchasing/StockReceiptTraceController.php", + "repository": "sgf", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "33238278600f358265211212949cea4cbe511ddec6225f3c9c5e902d03136594" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_transition", + "file": "resources/js/stock-receipt-trace.js", + "repository": "sgf", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "bdf4dc2273cbc25f24079ebc3170b973c662f9f1a645b0a418db8e86854741f6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_stock_receipt_focus", + "file": "public/stock-receipt-focus.mjs", + "repository": "sgf", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-trace-20261103.json", + "sha256": "7b1bdf5d6b690c5e81ccc219cb0712c93ddca6e44682a6a3a747d4fff8c13827" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-composed-source-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "7f1fc61962e68b1676fad694068761158edc41623dee73238b012c37da593caa", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-trace-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 46 + } + ], + "sha256": "29ffe0d5e588af175d926444e84faa655560999dfcff58dcf8eb37a3423f07b7", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending. The integrated Purchasing QA host now observes the same physical book through a SELECT-only Stock role, explicit warehouse mapping and existing React reader (demo8083). Operational installation and real bindings remain pending; no additional valuation or availability is supplied. Demo8084 adds explicit Stock-to-Purchasing receipt evidence navigation for current receipt_in movements. The server resolves actual parent ids, current rights and scope; no inferred historical origin, business command or wider Stock reader grants. Existing Purchasing runtime locks remain; no new load/deployment claim.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_invoice_controller", + "file": "app/Modules/Purchasing/InvoiceController.php", + "repository": "sgf", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa" + }, + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "85eb46ca7e65c60bed190e592a134eb48db5762c0a90b8cd4c9d6fbd81198ba4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_invoice_screen", + "file": "resources/views/supplier-invoice-workspace.blade.php", + "repository": "sgf", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "396cea98bce6c2ccff510efd917e2f336ba29657ea5a8277116c41bd70c92e15" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "916c7243f78953a9afa2d495f5dc0a4ea687dd876598bd880a60875913ab2063" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_workspace_ui", + "file": "public/supplier-invoice-workspace.mjs", + "repository": "sgf", + "sha256": "a05b4f56151b8bc9735a0ba2ce47b475e22623aabb8be99a98290860efd6ae9e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "68671400153a97387f77ad0cddbc0f7f6367caeaebef8fc219d84fc8cf118eb3" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "5f0112c38e805fe9ed2e733053bae77f8dd4e3e1cb6b9cba8e4bc7bb469205d7" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "f767347371e2dc1573ec29a926509c87bcdea3ec09257a6b22395fc0cf01366f" + }, + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "a05b4f56151b8bc9735a0ba2ce47b475e22623aabb8be99a98290860efd6ae9e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_matching_progress", + "file": "app/Modules/Purchasing/InvoiceMatchingProgress.php", + "repository": "sgf", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "111f279dae49475d2959327155fd6b8d12ba75c42b3a20d6f18ddc3004505c8e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_invoice_matching_ui", + "file": "public/invoice-matching.mjs", + "repository": "sgf", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/invoice-matching-progress-20261103.json", + "sha256": "e575a82b6c8b5cf531cff0a4d9dfe6e05234e73573bd025811c4bdf85baaed7c" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/invoice-matching-progress-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 47 + } + ], + "sha256": "6920219ec33e09abc951c10d8d862e87495b99cd77162f3aea729dcca597b66c", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8081 exposes per-line ordered/accepted/returned/reversed/validated/pending/remaining quantities using two aggregate fact queries and original correction values. Pending documents do not reserve quantity; overlap is a read warning, not a replacement for native validation. Two completed QA books are reused read-only with all tables/sequences unchanged. The display revision uses one original state observation before capability decoration; mutation/state definitions are unchanged. Full dependency materialisation, large invoice-history scaling, visual review, sustained load and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_obligation_controller", + "file": "app/Modules/Purchasing/ObligationController.php", + "repository": "sgf", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_screen", + "file": "resources/views/supplier-obligation-workspace.blade.php", + "repository": "sgf", + "sha256": "73a73bc3f33fede454d40ab7506274ec5128c317e4fc0cbc38fa3808bc6be074", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "cbcef35273b6f54158f60b67f9c2b64c0a93e47cb01ca302b525479ce051e927" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "ce0dc4159d42efcff9e09ec99a2ce5a2d378a215d4a853a37417a0ebf5445506" + }, + { + "proof": "docs/proofs/obligation-evidence-workspace-20261103.json", + "sha256": "73a73bc3f33fede454d40ab7506274ec5128c317e4fc0cbc38fa3808bc6be074" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_workspace_ui", + "file": "public/supplier-obligation-workspace.mjs", + "repository": "sgf", + "sha256": "7f5c8ca11ad603e55c408356c7fb2a46782662d0107caffedcd9d4966a9163e7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "eeb450e38dad72d9c38538ed363202d0a6cfcec466c61171028108f1bc243837" + }, + { + "proof": "docs/proofs/purchasing-focus-composition-20261103.json", + "sha256": "8f5154636553130f950d09b46ff917f91250516e10a03e93971cbe537c67f082" + }, + { + "proof": "docs/proofs/purchasing-continuity-composition-20261103.json", + "sha256": "c2608e3cab7cd1810437a3a978e6f6ccbf2600a83dd0a39bd38510db8249f551" + }, + { + "proof": "docs/proofs/obligation-evidence-workspace-20261103.json", + "sha256": "7f5c8ca11ad603e55c408356c7fb2a46782662d0107caffedcd9d4966a9163e7" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_evidence_ui", + "file": "public/obligation-evidence.mjs", + "repository": "sgf", + "sha256": "c47a75e69d8ea767bc7e07e6fe5fa924fcc4fbd1bd1a90f526ecf255eb2e6fb5", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/obligation-evidence-workspace-20261103.json", + "sha256": "c47a75e69d8ea767bc7e07e6fe5fa924fcc4fbd1bd1a90f526ecf255eb2e6fb5" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 72 + } + ], + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-focus-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "dd5a086443bbf0a0f327b0c2dd2d4d56eb028bd1f1e471bbae236e03048adcbf", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-continuity-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 55 + } + ], + "sha256": "6135df7c6dca784297b3a5f70a571585dc6d6a0d401a491c1d17ab91b780ce35", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/obligation-evidence-workspace-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 26 + } + ], + "sha256": "fa510ee89931c34d6d9483a6d8f362055a953567f2087ebb1c97ad6bb4c2e117", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. Contextual read navigation is delivered in demo8078: authorised dossier cards open exact source ids across seven workspaces, including receipt evidence and invoice-specific obligation consultation. Strict parameter parsing, destination authority, parent matching and stale startup cancellation avoid first-page dependence and automatic fallback. The completed canonical QA book is reused without command replay;142 tables and sequences are unchanged. This does not decide readiness, execute a next stage, grant access, validate visual rendering, sustained load or deployment. Inline receipt/invoice/obligation source links now preserve ids and follow the currently presented menu; destination APIs remain authoritative. No new financial effect, permission, deployment or operational-readiness claim. Demo8082 separates evidence browsing from an explicitly selected proposal decision. Reason and preview survive pagination; changed observed source/actor/permissions invalidate old forms, and late reads/previews cannot reactivate them. Temporary read failure preserves the form; in-flight operations prevent selection changes.26 new simulated-UI/demo checks reuse72 native authority checks without repetition. Controller/runtime/kernel and legacy evidence branch are unchanged. No new real confirmation, financial writer, backend pagination protocol, visual/load or deployment validation.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/supplier-composition-20261103.json b/docs/proofs/supplier-composition-20261103.json new file mode 100644 index 0000000..b7a568e --- /dev/null +++ b/docs/proofs/supplier-composition-20261103.json @@ -0,0 +1,313 @@ +{ + "date": "2026-11-03T11:17:50.348Z", + "increment": "SGF-SUPPLIER-REGISTRY-QA-v1", + "passed": true, + "functional_code": true, + "checks": 64, + "tests": { + "workflow": { + "file": "private/receipt-composition-bead400917da/supplier-result.json", + "sha256": "84cad0ab602624680416ffcaf408c6cd3e6649023f9d90c1534000ea0e623147", + "checks": 34, + "result": { + "passed": true, + "checks": [ + "supplier workspace served", + "only three explicitly bound seed suppliers are listed", + "warehouse cannot view supplier economic registry", + "foreign tenant supplier is inaccessible", + "unmapped unit is refused", + "outdated company context is refused", + "invalid status filter is rejected", + "native create preview displays pending state without activation", + "supplier preview commits neither supplier nor history", + "tampered preview is refused", + "history receipt failure aborts supplier confirmation", + "supplier and original audit roll back together", + "independent workers recover one supplier after failure", + "one supplier and one immutable command receipt", + "same key with other contents is refused", + "distinct finance identity can inspect newly prepared supplier without rebinding", + "preparer cannot review own supplier", + "pending supplier is neither selectable nor accepted by native quotation rules", + "independent review displays before and after states", + "native update increments version and retains pending review", + "review prepared against old version is refused", + "review right revalidated on confirmation", + "finance activates exact current version", + "review repetition does not increment version twice", + "reviewed supplier automatically becomes eligible in the same scoped sourcing registry", + "reviewed supplier reaches original quotation pricing", + "finance suspension is explicit and versioned", + "supplier suspension after preview is revalidated before quote commit", + "new supplier reviewed in SGF supplies an actual native quotation", + "blocked supplier cannot be reactivated", + "editing active supplier clears earlier reviewer and status", + "server filters and stable pagination produce 15 plus 1 disjoint rows", + "original and SGF history retain author date before and after without unrelated suppliers", + "supplier integration adds no order stock or budget commitment" + ], + "concurrency_statuses": [ + 200, + 201 + ], + "preview_no_persistent_changes": true, + "atomic_failure_recovery": true, + "new_supplier_reaches_native_quotation": true, + "selected_supplier_history_count": 12, + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "boundaries": { + "file": "private/receipt-composition-bead400917da/supplier-boundary.json", + "sha256": "0f120500699a3d284e059f74f15dd971583bbbac50be262ef25399a7981c13bd", + "checks": 6, + "result": { + "passed": true, + "checks": [ + "native finance role cannot review a record last changed by the same identity", + "expired diligence cannot be activated", + "bound supplier still reaches the original preview after access guard extension", + "changed explicit binding invalidates prepared quotation", + "same-tenant supplier outside the company-unit binding cannot bypass selector through API", + "boundary probes restore all injected fixture facts and commit no proposal" + ], + "new_boundary_only": true, + "valid_34_checks_not_repeated": true + } + }, + "guards": { + "file": "private/receipt-composition-bead400917da/supplier-guards.json", + "sha256": "73949c1ea064793872ab1aa4da31b3c409e681340011d396bef34df9e70433b4", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "disabled suppliers runtime refuses before SQL", + "disabled suppliers preview refuses before validation or SQL", + "production cannot activate synthetic suppliers" + ], + "database_queries": 0, + "business_writes": 0 + } + }, + "demonstration": { + "file": "private/receipt-composition-2b4c91ddbd16/supplier-demo-smoke.json", + "sha256": "953bc5f419cb2e3b9ab7ce78b07d20c6c5bff44b7e29d5c79eb1d75d00fb724b", + "checks": 12, + "result": { + "passed": true, + "checks": [ + "demo has no proposals evaluations awards orders receipts or movements", + "registry capability matches actor", + "review capability matches actor", + "supplier workspace is live", + "sourcing links to supplier review", + "creation sentinel has no readable supplier record or history", + "new supplier preview omits temporary sequence identifier and commits nothing", + "registry capability matches issuer", + "review capability matches issuer", + "warehouse is denied supplier registry", + "live supplier script matches delivery", + "read and rollback-only preview preserve demo business facts" + ], + "before": "1f751ee5de55546639d6fb56dffd9296828b2a13ba624f58a9b5b3d342159cc5", + "after": "1f751ee5de55546639d6fb56dffd9296828b2a13ba624f58a9b5b3d342159cc5", + "visual_review": false, + "persistent_changes": false, + "preview_sequence_may_advance": true + } + }, + "assets": { + "file": "private/receipt-composition-2b4c91ddbd16/supplier-demo-assets.json", + "sha256": "8f84b03fb1cce408a0d79af15a764e569168f0ae916b53516d4b9e9eb04c2b23", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "private frontend build succeeds", + "served built assets match private build", + "supplier module is served through private static whitelist" + ], + "assets": [ + "assets/app-gjzvo3Kh.js", + "assets/app-BLSNCrO7.css" + ], + "visual_review": false + } + }, + "navigation": { + "file": "docs/proofs/supplier-home-20261103.json", + "sha256": "079cb7655964988bf5c0cd1a852772a9c770f0efde8865f2f87d216f533a2f82", + "checks": 6, + "result": { + "passed": true, + "checks": 6, + "names": [ + "scoped right and capability expose suppliers link", + "absent right hides suppliers link", + "foreign unit right hides suppliers link", + "disabled composition hides suppliers link", + "unit selection is required", + "order and receipt links remain available" + ], + "source": "resources/js/PurchasingHome.jsx", + "sha256": "260a86ad58c9357784e1af3f850dc5ab788f79d0c507f23eaf797f5b91107e0c", + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/SupplierController.php", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + }, + { + "file": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "file": "app/Modules/Purchasing/SourcingController.php", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "1c75c3fc47626d30e2fabf679a0ff725621ab794c92c8e89038ace4a3d14aae8" + }, + { + "file": "config/receipt_qa.php", + "sha256": "69c0e169d9d869216d117195bec63455cf465aaa10e2049c56de88f7f4ae197c" + }, + { + "file": "routes/web.php", + "sha256": "9b1b0e35c8a819dd37d025b5e6e318296747017feec71b4a981a11fdc5ff1c4a" + }, + { + "file": "app/Shared/Context/ModuleNavigation.php", + "sha256": "dbf5215a7c30797f5559ead7527fab4f86d8d68185b48eb758a038b6ab7c34f5" + }, + { + "file": "app/Modules/Identity/Services/IdentityWorkflow.php", + "sha256": "46473afce1d6634ff6fac3ccadab9c60bb77fb37b1ea2ab2a377ad5ae20b3177" + }, + { + "file": "resources/js/PurchasingHome.jsx", + "sha256": "260a86ad58c9357784e1af3f850dc5ab788f79d0c507f23eaf797f5b91107e0c" + }, + { + "file": "resources/views/supplier-workspace.blade.php", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + }, + { + "file": "resources/views/sourcing-workspace.blade.php", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + }, + { + "file": "public/supplier-workspace.mjs", + "sha256": "c721f275317d581ccd72b1f68e0ae82fce977d4a3d0ab34b2c67533567370932" + }, + { + "file": "scripts/supplier-host-setup.php", + "sha256": "50dc12483d35e71e9ea6ea2fbff07faf97fbfce63dcd75fd1c2a4c2a3ab9ca07" + }, + { + "file": "scripts/supplier-composition-proof.php", + "sha256": "4bb8a14d73a24252fedd75a2d8833519aebc5cf4fbfb7faeab1f24a910da46ea" + }, + { + "file": "scripts/supplier-boundary-proof.php", + "sha256": "66fc45c9142fcf8c977dc3403196ff17909ac70c358a7760ec839124eedf9aae" + }, + { + "file": "scripts/supplier-guard-proof.php", + "sha256": "71658721f379aa54446f917fef0014b052f813a28d6e30bb23dad5278218b79e" + }, + { + "file": "scripts/supplier-demo-smoke.php", + "sha256": "41080a184b12a27618ff951930c7820e7a1d12fb7cc30ea380f59e054ae28c71" + }, + { + "file": "scripts/supplier-demo-assets.mjs", + "sha256": "8b07e804fd0ecdaade73bb6286b5e7951df5ad4b7fc55e305efdf8d9029565b3" + }, + { + "file": "scripts/order-native-setup.php", + "sha256": "7e055e895d82095b863bd1456e821022f25f27137d37e8332d1fb08a063ffc0b" + }, + { + "file": "scripts/receipt-composition-run.mjs", + "sha256": "85bd679a9fe0472cf833d282b98ae2f9d8bdbfe9547fac9d63a69d8d1f4e8da3" + }, + { + "file": "scripts/receipt-composition-http.php", + "sha256": "35901f596e7d928d38cf3be059d092d349898f31e06026fffc2320ca1b719e79" + }, + { + "file": "scripts/receipt-composition-extra.mjs", + "sha256": "a711a44993aaa15e9a1caf46f2b2282a053f610abbc505ba1db210b8153fdccc" + } + ], + "workflow_package": { + "native_sha256": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic_sha256": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "original_sources": { + "app/Http/Controllers/SupplierController.php": "e47f3951fc7eba5e27c3e94ddbb3e513af049fa1aeec29a230ae82517a3f9204", + "app/Http/Requests/SaveSupplierRequest.php": "537511f7d34f1a1a1fd370d295e8e55f0e95e3b5aa32442b193ec1a581a9f557", + "app/Services/SupplierParticipation.php": "43808a5fbae0ff67c8b967a320e0a65b7e524f6a742716b3c505b67355164ceb", + "app/Policies/SupplierPolicy.php": "7182d55be88fa4bdd748d8c407f008d63bc25aec1d9a0c84f45d925c04f73fdd" + } + }, + "demo": { + "url": "http://127.0.0.1:8067/qa/enter/actor?open=1", + "reviewer_url": "http://127.0.0.1:8067/qa/enter/issuer?open=1", + "warehouse_url": "http://127.0.0.1:8067/qa/enter/validator?open=1", + "initial_prepared_seed_suppliers": 3, + "initial_sgf_supplier_decisions": 0, + "initial_quotes": 0, + "initial_orders": 0, + "initial_receipts": 0 + }, + "qa_rights": [ + "purchasing_suppliers.view", + "purchasing_suppliers.prepare", + "purchasing_suppliers.review" + ], + "reused_valid_proofs": [ + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "checks": 74, + "scope": "original source-to-receipt scenario; not rerun as supplier tests" + } + ], + "test_scope": "34 workflow checks retained; six new access/review boundaries plus12 live demonstration checks cover later access and presentation adjustments. No unrelated business suites repeated.", + "preview": { + "mode": "original_controller_in_rollback_only_savepoint", + "persistent_records_unchanged": true, + "sequence_may_advance": true, + "temporary_supplier_id_not_exposed": true + }, + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "old_sourcing_demo_native_bundle_intact": true, + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "real_rights_changed": false, + "target_database_connected": false, + "existing_demo_business_data_written": false, + "activation_at_destination": false, + "publication": false, + "checkpoint": false + }, + "limitations": [ + "QA owner roles and copied composition are not a generally installed or deployment-validated module.", + "Native supplier field validation, preparation and distinct review are reused; document references are declared text, not attachment upload or verified external evidence.", + "Index search/status/pagination15 and per-supplier history15 are server-side; sourcing picker retains its100-supplier cap.", + "New suppliers are scoped by audited company/unit origin; prepared seed suppliers stay explicitly bound. Operational registry sharing policy is not inferred.", + "SGF internal requisition handoff with one budget authority, formal tender regimes and later procurement corrections remain separate gaps.", + "No visual review, sustained-load claim or real fiscal/operational activation." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/supplier-documents-composition-20261103.json b/docs/proofs/supplier-documents-composition-20261103.json new file mode 100644 index 0000000..d499a91 --- /dev/null +++ b/docs/proofs/supplier-documents-composition-20261103.json @@ -0,0 +1,256 @@ +{ + "date": "2026-11-03T16:26:17.508Z", + "increment": "SGF-SUPPLIER-DOCUMENTS-QA-v1", + "passed": true, + "functional_code": true, + "checks": 52, + "tests": { + "documents": { + "file": "private/receipt-composition-d4d3650fc49f/supplier-documents-result.json", + "sha256": "c64ceaac8b178be40a25bdf03a416001aff253da4d4f1bec61b2fc6cba22aa90", + "checks": 28, + "result": { + "passed": true, + "checks": [ + "new supplier attachment book begins empty", + "financial reviewer can inspect paginated private metadata", + "unrelated physical/request roles cannot read supplier documents", + "original upload preview captures actual bytes and review invalidation without temporary document id", + "preview rolls back supplier document and audit and removes only its private staged file", + "native MIME and extension checks reject disguised or executable attachments", + "native document type catalogue remains authoritative", + "independent sessions prepare same-key upload with their own context-bound previews", + "confirmation refuses substituted file bytes", + "existing preparation right rechecked at confirmation", + "provenance failure rolls back native records and compensates only verified uncommitted file", + "concurrent same-key recovery stores one native document and one permanent file", + "new attachment invalidates previous review and advances supplier version once", + "review prepared before new evidence requires fresh conference", + "distinct native review reactivates exact supplier version", + "historical upload replay preserves subsequent approved review without another file", + "metadata projection hides storage path and native tenant", + "private download returns exact original bytes as sandboxed attachment", + "original download audit recorded for authorised reviewer", + "altered stored bytes are not silently served as original evidence", + "document id cannot cross supplier or tenant boundary", + "new attachment preserves prior original and sanitises client filename", + "all16 immutable document records accessible in distinct15/1 pages", + "permanent files match recorded volume and preview staging contains no files", + "supplier history exposes original document evidence in existing administrative timeline", + "another available module cannot read supplier documents", + "unmapped unit cannot reuse document metadata", + "document workflow creates no order invoice debt payment or localisation" + ], + "transport_documents": 2, + "native_volume_documents": 14, + "documents": 16, + "permanent_files": 16, + "staged_files": 0, + "concurrency_statuses": [ + 200, + 201 + ], + "new_right_names": [], + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "integration": { + "file": "private/receipt-composition-d4d3650fc49f/supplier-documents-integration.json", + "sha256": "f843b916226554ff554f6fb3bc8b745f4841e32cfbbde8fa7e403a18d1bab1f7", + "checks": 9, + "result": { + "passed": true, + "checks": [ + "new session context invalidates an uncommitted document preview", + "changed supplier-origin binding requires fresh file conference", + "supplier awaiting document review is excluded from proposal selector", + "forged pending supplier id is refused by original quotation workflow", + "distinct original review reactivates exact evidence version for sourcing", + "review between file preview and confirmation forces new file conference", + "reviewed supplier reappears in same scoped proposal selector", + "new evidence permits original quotation preview without automatic proposal", + "context probes preserve binding files and all original attachments" + ], + "source_request_setup_only": true, + "source_request_reserved_minor": 100, + "document_workflow_creates_reservation": false, + "documents": 16, + "new_orders": 0, + "new_quotes": 0, + "new_right_names": [], + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "guards": { + "file": "private/receipt-composition-6a55cbf089ba/supplier-documents-guards.json", + "sha256": "a84f8ab5e6d268bb037fc5422772817ccc54d05d5ec4b07a3f6a548003394f20", + "checks": 4, + "result": { + "passed": true, + "checks": [ + "disabled document metadata refuses before SQL", + "disabled upload refuses before validation storage and SQL", + "production refuses synthetic document adapter before SQL", + "document route belongs to purchasing and guard probes issue zero SQL" + ], + "database_queries": 0 + } + }, + "demo": { + "file": "private/receipt-composition-6a55cbf089ba/supplier-documents-demo.json", + "sha256": "adec6e751793002805d5546528a95f73d3800cea7cde3565812cc51f0e05eef6", + "checks": 8, + "result": { + "passed": true, + "checks": [ + "live demo starts without attachments or main requests", + "private document list respects actor", + "supplier screen capability exposes document module only in new composition", + "private document list respects issuer", + "private document list respects validator", + "served document source matches supplier-workspace.mjs", + "served document source matches supplier-documents.mjs", + "live metadata checks preserve supplier versions attachments and audit" + ], + "before": "cf9ffe4986cc4b40ebec46427379cfe00a7559339ad1d6afd527f20748adf0b0", + "after": "cf9ffe4986cc4b40ebec46427379cfe00a7559339ad1d6afd527f20748adf0b0", + "visual_review": false + } + }, + "assets": { + "file": "private/receipt-composition-6a55cbf089ba/supplier-documents-assets.json", + "sha256": "fac39bfeea24042f5f55c959fca4c970139b814724f7e6fd68aa78316642989f", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "private frontend build succeeds", + "served built assets match private build", + "supplier document module is served through private static whitelist" + ], + "assets": [ + "assets/app-rwyn9RPO.js", + "assets/app-BLSNCrO7.css" + ], + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/SupplierDocumentsController.php", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6" + }, + { + "file": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "sha256": "a8c7fbe18d9ccd6a7e6fd27275e8827ac6a75f4b147ec02b06fabc30a15f29c8" + }, + { + "file": "app/Modules/Purchasing/SupplierController.php", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048" + }, + { + "file": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "file": "config/receipt_qa.php", + "sha256": "49ad948ce83640a0b178382d5632d736aef7b77ebce6dc2881f3a890508edc27" + }, + { + "file": "routes/web.php", + "sha256": "563c60a354624e552869c83529a2e23f9902b8650da8470283f9f5006423d6cf" + }, + { + "file": "public/supplier-workspace.mjs", + "sha256": "5bcd02e4f45441bc6453b4d4dcb719f2467cec62e212f31b7d7feb05ca7f0c05" + }, + { + "file": "public/supplier-documents.mjs", + "sha256": "70e96bc60238efe6bb8a65297f7412fee9abb143dd96805713bb1deafc784820" + } + ], + "pinned_native_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "authority": { + "original_document_controller": true, + "private_qa_storage": true, + "source_company_unit_checked": true, + "existing_rights": [ + "purchasing_suppliers.view", + "purchasing_suppliers.prepare" + ], + "new_right_names": [], + "upload_invalidates_review": true, + "independent_review_reopens_sourcing": true, + "automatic_quote": false + }, + "regression": { + "transport_documents": 2, + "native_volume_documents": 14, + "documents_and_files": 16, + "staged_files": 0, + "concurrency_statuses": [ + 200, + 201 + ], + "prior_successful_checks_preserved": 17, + "resumed_after_download_adapter_fix": 11, + "source_request_setup_minor": 100, + "attachment_creates_budget_reservation": false + }, + "demo": { + "port": 8076, + "entry": "http://127.0.0.1:8076/qa/enter/actor?open=1", + "reviewer": "http://127.0.0.1:8076/qa/enter/issuer?open=1", + "initial_documents": 0, + "initial_main_requests": 0, + "prepared_suppliers": 3, + "locations": 0 + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "59bb66df5d5e12f898045669a0ad24664c3d09f2d3ab6cf70f4f13d6a34c6548" + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62" + }, + { + "file": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "388e738da7e9b3e7f521c8d67f85dd4ef34869c74daf0c04c09067b9fbde5242" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "target_database_connected": false, + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "previous_demo_data_written": false, + "public_rights_changed": false, + "publication": false, + "checkpoint": false + }, + "limitations": [ + "Positive binary fixture is PNG. Allowed PDF/JPEG rules are original native rules, not a new full-format reader regression.", + "Validation does not certify authenticity, fiscal validity or universally required document types.", + "Ordinary rollback compensation is tested. If commit outcome cannot be verified, files are retained; crash-orphan reconciliation and retention/quota maintenance are not declared delivered.", + "Preview sequence values may advance and empty private staging directories may remain; staged file count is zero.", + "Same key is idempotent; another key is another explicit upload intent. The original mechanism does not perform global content-hash deduplication.", + "Fourteen native-controller volume uploads are fixture preparation, not14 independent HTTP transport confirmations.", + "Native schema provisioning remains current while runtime is pinned; general installation/least-privilege deployment is not validated.", + "Visual review, sustained load and storage capacity remain pending." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/supplier-documents-flow-20261103.json b/docs/proofs/supplier-documents-flow-20261103.json new file mode 100644 index 0000000..120492a --- /dev/null +++ b/docs/proofs/supplier-documents-flow-20261103.json @@ -0,0 +1,692 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "dfb02b6f08fbddf4583a0a57b49a0c820356f17eac427eaa5bbad1168456570e", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "7ed4b9292e214b11c42af1eae3fb63d967a7e15f026648c957f8a5b54f211f69", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "75a4d917b300dc9f9c89a8feb90e4ba39829177f946a28fc613612ab4b91a308", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_screen", + "repository": "sgf", + "path": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_screen", + "repository": "sgf", + "path": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_workspace", + "repository": "sgf", + "path": "app/Modules/Purchasing/WorkspaceNavigation.php", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_navigation", + "repository": "sgf", + "path": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_picker", + "repository": "sgf", + "path": "public/supplier-picker-model.mjs", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_search_ui", + "repository": "sgf", + "path": "public/sourcing-workspace.mjs", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/DossierController.php", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_screen", + "repository": "sgf", + "path": "resources/views/purchasing-dossier.blade.php", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_dossier_ui", + "repository": "sgf", + "path": "public/purchasing-dossier.mjs", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_catalogue", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptCatalogue.php", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_workspace_ui", + "repository": "sgf", + "path": "public/receipt-workspace.mjs", + "sha256": "10b412a5ec6c973152f165b34caacc685e25bcf2eb0e6ba2f7f7e58df4e1f00a", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_documents", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentsController.php", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_storage", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "sha256": "a8c7fbe18d9ccd6a7e6fd27275e8827ac6a75f4b147ec02b06fabc30a15f29c8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_document_ui", + "repository": "sgf", + "path": "public/supplier-documents.mjs", + "sha256": "70e96bc60238efe6bb8a65297f7412fee9abb143dd96805713bb1deafc784820", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/supplier-documents-matrix-20261103.json b/docs/proofs/supplier-documents-matrix-20261103.json new file mode 100644 index 0000000..7653fc7 --- /dev/null +++ b/docs/proofs/supplier-documents-matrix-20261103.json @@ -0,0 +1,1992 @@ +{ + "date": "2026-11-03T16:32:09.386Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "dfb02b6f08fbddf4583a0a57b49a0c820356f17eac427eaa5bbad1168456570e", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "30d4ef72e079a63b470c952727aaa7c42a45302a58b50d085a53a57737a99048" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_workspace", + "file": "app/Modules/Purchasing/WorkspaceNavigation.php", + "repository": "sgf", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1" + }, + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "2e4fa17a60b718eda505b619859f9743517716eba573a382c54a95377254ccc8" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_navigation", + "file": "resources/views/partials/purchasing-navigation.blade.php", + "repository": "sgf", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_picker", + "file": "public/supplier-picker-model.mjs", + "repository": "sgf", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_search_ui", + "file": "public/sourcing-workspace.mjs", + "repository": "sgf", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "15ed768992dfd8858df65ce7fa41c733906875aec98b1c347169d83571cde52e" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_controller", + "file": "app/Modules/Purchasing/DossierController.php", + "repository": "sgf", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "c44d04e08a1496b9c2262131a4909430c6e7a63264f3bb392df38bb47bae575e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_screen", + "file": "resources/views/purchasing-dossier.blade.php", + "repository": "sgf", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "8fc5a0f4d7b93e83064952d2ae57b1bf43f77744b2b2b070fa9185698762c741" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_dossier_ui", + "file": "public/purchasing-dossier.mjs", + "repository": "sgf", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-dossier-composition-20261103.json", + "sha256": "4d0d5eb4887630107bbc2fed8567d461dfd9c319199764d7e6612b10004fa5a1" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_documents", + "file": "app/Modules/Purchasing/SupplierDocumentsController.php", + "repository": "sgf", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "4f5c6b3ee9d6608cffb1f8db24552902c4d2b6044e36e00932157c0b05e3e3c6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_document_storage", + "file": "app/Modules/Purchasing/SupplierDocumentFiles.php", + "repository": "sgf", + "sha256": "a8c7fbe18d9ccd6a7e6fd27275e8827ac6a75f4b147ec02b06fabc30a15f29c8", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "a8c7fbe18d9ccd6a7e6fd27275e8827ac6a75f4b147ec02b06fabc30a15f29c8" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_document_ui", + "file": "public/supplier-documents.mjs", + "repository": "sgf", + "sha256": "70e96bc60238efe6bb8a65297f7412fee9abb143dd96805713bb1deafc784820", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-documents-composition-20261103.json", + "sha256": "70e96bc60238efe6bb8a65297f7412fee9abb143dd96805713bb1deafc784820" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-search-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 51 + } + ], + "sha256": "388e738da7e9b3e7f521c8d67f85dd4ef34869c74daf0c04c09067b9fbde5242", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-documents-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 52 + } + ], + "sha256": "d5709128ee45b7ee1397695b06502b9386dccd13779203c13abbd54281552068", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion. A GET-only dossier now correlates the actual request through independently authorised downstream evidence in demo8074, with independent25-row pages and filtered history. Read proof reuses the completed canonical regression book without repeating financial commands; all142 tables and sequences remain unchanged. This is not a universal task queue, readiness decision or deployment validation. Supplier binary evidence is now delivered in demo8076 through the original native upload/download and review invalidation, with private storage, content/context/version conference, idempotent command provenance and bounded metadata pages15. Pending evidence excludes the supplier from sourcing until a distinct current-version review. Other attachment types, authenticity requirements, crash-orphan reconciliation, retention, sustained load and deployment remain separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "7ed4b9292e214b11c42af1eae3fb63d967a7e15f026648c957f8a5b54f211f69", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "7ed4b9292e214b11c42af1eae3fb63d967a7e15f026648c957f8a5b54f211f69" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "75a4d917b300dc9f9c89a8feb90e4ba39829177f946a28fc613612ab4b91a308", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_receipt_catalogue", + "file": "app/Modules/Purchasing/ReceiptCatalogue.php", + "repository": "sgf", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "d9e529adae22387dd4e17d7bf9558bdde2f13e1f1e39700f07c4c97299ff3348" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_workspace_ui", + "file": "public/receipt-workspace.mjs", + "repository": "sgf", + "sha256": "10b412a5ec6c973152f165b34caacc685e25bcf2eb0e6ba2f7f7e58df4e1f00a", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "f286a99bb0df5c6080e8104d501707e5a9e13046d5dd7144dec32bf0817a92a0" + }, + { + "proof": "docs/proofs/receipt-workspace-completion-20261103.json", + "sha256": "10b412a5ec6c973152f165b34caacc685e25bcf2eb0e6ba2f7f7e58df4e1f00a" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-workspace-completion-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 41 + } + ], + "sha256": "59bb66df5d5e12f898045669a0ad24664c3d09f2d3ab6cf70f4f13d6a34c6548", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate. Demo8075 now provides per-line article search/pages25/100 beyond the earlier100 cap and navigable receipt history beyond25, with explicit choice and article fingerprint revalidation before a new physical confirmation. Existing unit/binding rules and writer remain authoritative;27 partial receipts total exactly1UN in regression, with25 native-writer history fixtures. Catalogue requests are deferred until a line is selected. No new valuation, payment, visual, sustained-load or deployment claim.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "3bfb485a61f9723bc20ac57aa4a8dfaae9bbbc4d3a0a671722c3ca8e025b6462", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_invoice_controller", + "file": "app/Modules/Purchasing/InvoiceController.php", + "repository": "sgf", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_invoice_screen", + "file": "resources/views/supplier-invoice-workspace.blade.php", + "repository": "sgf", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_obligation_controller", + "file": "app/Modules/Purchasing/ObligationController.php", + "repository": "sgf", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_screen", + "file": "resources/views/supplier-obligation-workspace.blade.php", + "repository": "sgf", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 72 + } + ], + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-dossier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "15686bc54488be2aa342c899f82a683ee43674621a8c4678b5ba6c34d08e6a62", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/supplier-home-20261103.json b/docs/proofs/supplier-home-20261103.json new file mode 100644 index 0000000..1bdcf90 --- /dev/null +++ b/docs/proofs/supplier-home-20261103.json @@ -0,0 +1,15 @@ +{ + "passed": true, + "checks": 6, + "names": [ + "scoped right and capability expose suppliers link", + "absent right hides suppliers link", + "foreign unit right hides suppliers link", + "disabled composition hides suppliers link", + "unit selection is required", + "order and receipt links remain available" + ], + "source": "resources/js/PurchasingHome.jsx", + "sha256": "260a86ad58c9357784e1af3f850dc5ab788f79d0c507f23eaf797f5b91107e0c", + "visual_review": false +} diff --git a/docs/proofs/supplier-invoice-composition-20261103.json b/docs/proofs/supplier-invoice-composition-20261103.json new file mode 100644 index 0000000..fac1edb --- /dev/null +++ b/docs/proofs/supplier-invoice-composition-20261103.json @@ -0,0 +1,361 @@ +{ + "date": "2026-11-03T12:43:53.674Z", + "increment": "SGF-SUPPLIER-INVOICE-MATCHING-QA-v1", + "passed": true, + "functional_code": true, + "checks": 77, + "tests": { + "integration": { + "file": "private/receipt-composition-da77bb730751/invoice-result.json", + "sha256": "cecb1bec6cdb15a49fd651109a9b79286278d62fb31e37055e1fc87f0e22135c", + "checks": 45, + "result": { + "passed": true, + "checks": [ + "main fixture begins before order receipt or invoice", + "finance sees no invented source order", + "procurement and warehouse cannot inspect invoice economics", + "actual foreign-tenant order is inaccessible", + "source adjudication issues an actual SGF order", + "issued order reaches invoice workspace without source rebinding", + "supplier invoice workspace served", + "no invoice is registered before accepted receipt", + "warehouse accepts actual order once through original writer", + "document total mismatch is refused", + "foreign source line cannot be substituted", + "price divergence from frozen order is refused", + "quantity beyond accepted source is refused", + "original registration preview normalises document and consumes no budget", + "invoice preview persists no invoice audit budget entry or consumption", + "tampered invoice preview refused", + "failure recording SGF origin aborts registration", + "invoice lines and native audit roll back with failed command receipt", + "independent sessions recover same registered invoice once", + "pending invoice is unique and consumes no commitment", + "same operation key with another number refused", + "normalised supplier document number cannot be registered twice", + "preparer with validation right cannot approve own invoice", + "another pending documentary invoice is retained without consuming budget", + "new invoice after preview requires renewed review", + "overlapping pending invoice has original matching before other validation", + "validation impact shows original40MZN commitment consumption", + "failed validation receipt rolls back status native audit and consumption", + "validation permission is rechecked after preview", + "distinct eligible reviewers commit once and refuse stale concurrent decision", + "one original40MZN consumption is recorded", + "validated command replay does not consume twice", + "validation of another invoice invalidates old matching preview", + "overlapping document remains pending when cumulative accepted quantity is exceeded", + "remaining0.6UN is registered with the original cumulative matching", + "distinct finance validates remaining60MZN", + "two partial invoices consume exactly100MZN in the same budget", + "single order commitment is consumed without another reservation or commitment", + "original documents and incompatible pending document are preserved", + "invoice registration and matching create no additional physical movement", + "invoice history contains only invoice events with server pagination", + "unmapped unit cannot reuse an invoice source", + "fully invoiced receipt cannot be invoiced again", + "matching does not recognise a payable automatically", + "matching creates no payment" + ], + "registration_statuses": [ + 200, + 201 + ], + "validation_statuses": [ + 201, + 409 + ], + "validated_invoices": 2, + "pending_invoices": 1, + "consumed_minor": 10000, + "receipt_movements_unchanged": true, + "physical_fingerprint": "8fc992e83559200f691b253fd72e22986a972eb58f77b50bdf32d4d18d5f5dd4", + "payable_table_present": true, + "payable_auto_recognised": false, + "payment_created": false, + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "boundaries": { + "file": "private/receipt-composition-da77bb730751/invoice-boundaries.json", + "sha256": "3b018bacff8ccc00a94d022bb17ca0af8c46ecf4672f7b34bbe635c114726797", + "checks": 4, + "result": { + "passed": true, + "checks": [ + "new session context generation invalidates invoice preview", + "supplier source version change requires new matching preview", + "changed source binding invalidates invoice preview", + "boundary probes persist no revalidation audit consumption or invoice change" + ], + "before": "b8c13494b744356af9bdcac3f28f4847ea87b54a6e4bfbe51a0fdf50151c2c5d", + "after": "b8c13494b744356af9bdcac3f28f4847ea87b54a6e4bfbe51a0fdf50151c2c5d", + "valid45_checks_not_repeated": true, + "probe": "rollback-only original idempotent validation preview and rejected confirmations" + } + }, + "guards": { + "file": "private/receipt-composition-da77bb730751/invoice-guards.json", + "sha256": "bb1140c8bd0f0b2f0240679590e738438483160a5b8f96c0d435f878f6f2db8b", + "checks": 6, + "result": { + "passed": true, + "checks": [ + "disabled invoice runtime refuses before SQL", + "disabled invoice preview refuses before validation and SQL", + "production refuses synthetic invoice workflow", + "invoice route remains in purchasing: purchasing/invoices", + "invoice route remains in purchasing: api/purchasing-invoices", + "invoice route remains in purchasing: api/purchasing-invoices/orders/1/confirm" + ], + "database_queries": 0 + } + }, + "demonstration": { + "file": "private/receipt-composition-197109b57c62/invoice-demo-smoke.json", + "sha256": "4558766316b1cdeaf5201e6ab8f10a374ba1bf71a1ad2f0b92a15a3ab7e956ee", + "checks": 13, + "result": { + "passed": true, + "checks": [ + "main demo starts before order receipt invoice or consumption", + "invoice access and empty order list match issuer", + "invoice workspace is live", + "session exposes explicit invoice composition capability", + "foreign order stays hidden in live demo", + "invoice access and empty order list match reviewer", + "invoice access and empty order list match auditor", + "invoice access and empty order list match actor", + "buyer starts with one approved award and no issued main order", + "invoice access and empty order list match validator", + "warehouse waits for actual main order", + "served invoice script matches delivery", + "demo smoke leaves business and budget evidence unchanged" + ], + "before": "0c56650460998a89f46afde359b06556171a8561940b33397837cdbc42df50ee", + "after": "0c56650460998a89f46afde359b06556171a8561940b33397837cdbc42df50ee", + "main_orders": 0, + "invoices": 0, + "consumptions": 0, + "visual_review": false + } + }, + "assets": { + "file": "private/receipt-composition-197109b57c62/invoice-demo-assets.json", + "sha256": "d8aba4e3083b80d903fb39144035f2b3942dda324d01328a5728da60832e401f", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "private frontend build succeeds", + "served built assets match private build", + "invoice module is served through private static whitelist" + ], + "assets": [ + "assets/app-KvXs64E7.js", + "assets/app-BLSNCrO7.css" + ], + "visual_review": false + } + }, + "navigation": { + "file": "docs/proofs/invoice-home-20261103.json", + "sha256": "b0a904a2dee08e6b97ea428d880c8899e79b9c6d5f414475ca17907d777df8aa", + "checks": 6, + "result": { + "passed": true, + "checks": 6, + "names": [ + "invoice view and capability expose link", + "missing right hides link", + "another unit right cannot expose link", + "disabled composition hides link", + "unit selection required", + "existing order and receipt navigation remains available" + ], + "source": "resources/js/PurchasingHome.jsx", + "sha256": "f34bf1060bf987bd1b22e999e6ca05d76a3004607b8f670f580de37ddd847bd0", + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa" + }, + { + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "980e5d67b5c1ac74fa958ca54af8151f58364ba97f20bb680af2dd20cc7116fe" + }, + { + "file": "config/receipt_qa.php", + "sha256": "dbca506ec4f99390d85d861c89faa0b4584d1661fef49b859741ad51b8b09e3a" + }, + { + "file": "routes/web.php", + "sha256": "64db854bc3188672f059a16a44dd64f0ccd24f04c939ad335b542a34ee500df0" + }, + { + "file": "app/Shared/Context/ModuleNavigation.php", + "sha256": "518b7c8e70114e7438073f2d3a80f2173c8e5dfad3c5de45db3d4f8fc5b847a7" + }, + { + "file": "app/Modules/Identity/Services/IdentityWorkflow.php", + "sha256": "4ca66687bde3d9683186d32668e5b8c5336a735f9ed34edefdb79f0d3a381443" + }, + { + "file": "resources/js/PurchasingHome.jsx", + "sha256": "f34bf1060bf987bd1b22e999e6ca05d76a3004607b8f670f580de37ddd847bd0" + }, + { + "file": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53" + }, + { + "file": "public/supplier-invoice-workspace.mjs", + "sha256": "68671400153a97387f77ad0cddbc0f7f6367caeaebef8fc219d84fc8cf118eb3" + }, + { + "file": "scripts/order-native-setup.php", + "sha256": "0700db002a37a52423d095adb7cf322ef6f55aee23bed592fcd12b71977e0e15" + }, + { + "file": "scripts/invoice-native-negative.php", + "sha256": "4db198b0bd3f4e087823f44c5db438dd6b32877c2f8d3b4a67fbaaa72e2f83b9" + }, + { + "file": "scripts/invoice-host-setup.php", + "sha256": "1b2a20044b82bc8e9841ad7e9777996a467e531b9d6813d8bf31dc6b5be86be3" + }, + { + "file": "scripts/invoice-composition-proof.php", + "sha256": "239ef481fec70454d6a715d7a1b143a5f7b1674ce11ba1401ff326f43817c039" + }, + { + "file": "scripts/invoice-proof-body.php", + "sha256": "6783b24ab6c4a50bea5ddb9ce3ed1f006a0f8a7f6f325442e3f2ed70f2e65c8f" + }, + { + "file": "scripts/invoice-boundary-proof.php", + "sha256": "396f2fe73e458a73f5d6d5c46f1c002a6a927fc437cf74b32fd2bda45f0bc593" + }, + { + "file": "scripts/invoice-boundary-body.php", + "sha256": "99de5e1ac2a520f4886e469a95afa0b53ed2caf504a14aa151e7e38117ee4e2d" + }, + { + "file": "scripts/invoice-guard-proof.php", + "sha256": "257bbd70e73f7bf930a48af74eb97aa9fc191ed093abca2b00b0565559d9fb44" + }, + { + "file": "scripts/invoice-demo-smoke.php", + "sha256": "dc71195cf0ba3d0392862a3f2556b94595814197d0dbda0b6b1d427cf22f2399" + }, + { + "file": "scripts/invoice-demo-assets.mjs", + "sha256": "b0912dd788f5c236056d6023b5c28aca2ec17c8d1232103ce62215927de0bfbb" + }, + { + "file": "scripts/receipt-composition-run.mjs", + "sha256": "b5f8b7b5abde64995fa9f689e5f51d99faf2221cc81fc5044221d0ff66cac396" + }, + { + "file": "scripts/receipt-composition-http.php", + "sha256": "d99f782d70e7d5be9bf86c86a2902f2efbb3daa529bb3d8ac3cce0eeb76b2422" + }, + { + "file": "scripts/receipt-composition-extra.mjs", + "sha256": "9da4aed2f4b4d7963692034ebb224cd8abd9968c61c2ddc549f15743d8928db1" + }, + { + "file": "scripts/stock-ledger-entry.php", + "sha256": "3841d3be7c941b8ceb978a2bd7656a463dc68cabd64bee50b4e2d7f4e2599124" + } + ], + "pinned_native_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "original_source_hashes": { + "app/Services/InvoiceWorkflow.php": "f1e8530315e33d3c8eb23752699b3bbcba0af5248af478e861f3b3e75a462c11", + "app/Http/Controllers/InvoiceController.php": "2bcb3ed8a2e1d8e69831650bf3e228133ee105094784b3fd1f3e1fc825d96aa3", + "app/Services/CommonBudget.php": "185b1e5d6e4c572dc1d033ea8ed2e00fec96448c8ad0e470f51c0bf2b7c97296" + }, + "financial_effects": { + "single_order_commitment_minor": 10000, + "validated_invoice_minor": [ + 4000, + 6000 + ], + "original_budget_consumptions": 2, + "total_consumed_minor": 10000, + "additional_physical_movements": 0, + "payable_auto_recognised": false, + "payments_created": 0, + "ledger_posted": false + }, + "qa_rights": [ + "purchasing_invoices.view", + "purchasing_invoices.prepare", + "purchasing_invoices.validate" + ], + "demo": { + "buyer_url": "http://127.0.0.1:8070/qa/enter/actor?open=1", + "warehouse_url": "http://127.0.0.1:8070/qa/enter/validator?open=1", + "preparer_url": "http://127.0.0.1:8070/qa/enter/issuer?open=1", + "reviewer_url": "http://127.0.0.1:8070/qa/enter/reviewer?open=1", + "second_reviewer_url": "http://127.0.0.1:8070/qa/enter/auditor?open=1", + "initial_main_orders": 0, + "initial_main_receipts": 0, + "initial_invoices": 0, + "initial_consumptions": 0, + "approved_award_prepared": true, + "foreign_order_is_negative_fixture": true + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/geography-composition-20261103.json", + "sha256": "2f181320e2cc01095266d64f660b1e28697cb1e44529b89357fbfb21ab436a9e" + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce" + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "target_database_connected": false, + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "previous_demo_data_written": false, + "concurrent_compras_sources_written": false, + "public_rights_changed": false, + "purchasing_activated_at_destination": false, + "publication": false, + "checkpoint": false + }, + "limitations": [ + "Technical supplier-document matching only, using the original frozen workflow. No fiscal issuance or statement of real documentary validity.", + "Budget consumption is the original authorised native effect. Payable recognition, payment and ledger remain separate; the earlier common-payable11,600MZN proof is not declared joined to these100MZN invoices.", + "The incompatible pending70MZN document is preserved; invoice correction/rejection/credit notes and binary document attachments are outside this increment.", + "Date/currency/tolerance rules are those of the pinned native workflow, including current-year MZN and exact matching.", + "Order list pages25 and invoice-history pages15; show/revision materialises the invoices and dependencies of the selected order. Very large per-order invoice histories are not load-validated.", + "The boundary probes use rollback-only previews of original idempotent validation and rejected confirmations; they repeat no posted decision.", + "Native/economic bundles and common writer source pins are recorded; current concurrent Compras changes and existing demos were not upgraded.", + "Visual review, sustained load, general destination installation and owner/runtime privilege separation remain pending." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/supplier-obligation-composition-20261103.json b/docs/proofs/supplier-obligation-composition-20261103.json new file mode 100644 index 0000000..9dfb3e2 --- /dev/null +++ b/docs/proofs/supplier-obligation-composition-20261103.json @@ -0,0 +1,328 @@ +{ + "date": "2026-11-03T13:12:18.925Z", + "increment": "SGF-INVOICE-TO-PAYABLE-QA-v1", + "passed": true, + "functional_code": true, + "checks": 72, + "tests": { + "integration": { + "file": "private/receipt-composition-af0847fb5636/obligation-result.json", + "sha256": "1b7d189fd2c4eeb63d35be85cb16abe1b5083db8680809cbdf6ed44bc578ed49", + "checks": 35, + "result": { + "passed": true, + "checks": [ + "new canonical book starts without payable recognition", + "bounded list starts empty", + "procurement and warehouse cannot read payable economics", + "invalid pagination and unsupported filters refused", + "actual source award issues order for integrated boundary", + "original receipt writer supplies accepted invoice source", + "registration remains separate from recognition", + "pending document preview exposes missing source without temporary ids", + "rollback preview leaves financial facts and audit unchanged", + "pending source capture cannot recognise debt", + "preparer cannot validate own proposal", + "another account of same person cannot validate", + "incomplete source preview exposes refusal without recognising", + "original validation consumes budget but does not recognise automatically", + "actual source validation invalidates prior recognition conference", + "independent sessions preview same explicit source", + "concurrent same-key preparation returns one commit and one replay", + "new validated source creates second immutable capture only", + "distinct recognition preview shows exact principal and unknown maturity", + "host permission is rechecked after preview", + "native permission change invalidates conference", + "audit failure rolls back principal command outbox and native events", + "competing validators recover after rollback and refuse stale second decision", + "exactly one canonical100MZN principal with no invented due date", + "recognition retry revalidates source and produces no duplicate", + "read position uses same kernel and keeps overdue indeterminate", + "different command recovers compatible existing responsibility without second debt", + "recognition does not change invoice stock budget or payments", + "server filters and pagination return authorised document only", + "independent evidence pages do not load entire financial universe", + "unknown or foreign document id exposes no financial evidence", + "workspace screen served without browser automation", + "unmapped unit cannot reuse source or preview", + "session context regeneration invalidates old preview", + "one immutable recognition event despite concurrency and retries" + ], + "preparation_statuses": [ + 200, + 201 + ], + "validation_statuses": [ + 201, + 409 + ], + "principal_minor": 10000, + "obligations": 1, + "due_on": null, + "financial_sources_unchanged": true, + "same_native_authority": true, + "automatic_recognition": false, + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "replay_source": { + "file": "private/receipt-composition-af0847fb5636/obligation-replay.json", + "sha256": "295bcacb19f4ba599380afaf0074a9d3554b1283f5d267a52c621c14e11a8b15", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "recorded recognition replay rechecks changed source and returns conflict", + "stale replay preserves one original principal", + "rollback removes injected validation marker and conflict evidence" + ], + "probe": "same original native adapter and kernel; rollback-only adversarial audit marker, no original facts changed", + "visual_review": false + } + }, + "boundaries": { + "file": "private/receipt-composition-af0847fb5636/obligation-boundaries.json", + "sha256": "62caf086f7c744615579ad67215e2724b67963749f66c21b8829047801699583", + "checks": 6, + "result": { + "passed": true, + "checks": [ + "commercial module cannot inspect purchasing obligation route", + "invoice screen exposes explicit authorised next step", + "existing responsibility preview remains rollback-only", + "changed authorised binding requires fresh conference", + "source authority identity cannot silently change to a second debt book", + "new module and binding boundary probes preserve prior valid financial proof" + ], + "before": "1177fe323cb07fedc0e1b942bfafe30131701916e749f5dec8d3e3895f130baa", + "after": "1177fe323cb07fedc0e1b942bfafe30131701916e749f5dec8d3e3895f130baa", + "valid35_checks_not_repeated": true + } + }, + "guards": { + "file": "private/receipt-composition-af0847fb5636/obligation-guards.json", + "sha256": "96979558a1b31ce3d40d54f76973b93f3fc9c276b78857c4c26880bef6e88610", + "checks": 6, + "result": { + "passed": true, + "checks": [ + "disabled obligation runtime refuses before SQL", + "disabled obligation preview refuses before validation and SQL", + "production refuses synthetic obligation workflow", + "obligation route remains in purchasing: purchasing/obligations", + "obligation route remains in purchasing: api/purchasing-obligations", + "obligation route remains in purchasing: api/purchasing-obligations/1/confirm" + ], + "database_queries": 0 + } + }, + "navigation": { + "file": "docs/proofs/obligation-home-20261103.json", + "sha256": "16a5bb1bed2e40f55a857014ea43fab4d1c53a8a0c823f8ba5555423cbaabc9f", + "checks": 6, + "result": { + "passed": true, + "checks": 6, + "names": [ + "obligation view and capability expose link", + "missing right hides link", + "another unit right cannot expose link", + "disabled composition hides link", + "unit selection required", + "existing order and receipt navigation remains available" + ], + "source": "resources/js/PurchasingHome.jsx", + "sha256": "b835535130c04a4ab6b69a4be92cfcd178ea7d2b5bb39bfa3f02ad090b84bcbb", + "visual_review": false + } + }, + "demonstration": { + "file": "private/receipt-composition-4b781d06bef8/obligation-demo-smoke.json", + "sha256": "424cf4df38cfdf4732a1d6b15a2e3c1bdc17874e0644e056da9b9dcc4e2cb112", + "checks": 13, + "result": { + "passed": true, + "checks": [ + "main demo starts before order receipt invoice or consumption", + "invoice access and empty order list match issuer", + "invoice workspace is live", + "session exposes explicit invoice composition capability", + "foreign order stays hidden in live demo", + "invoice access and empty order list match reviewer", + "invoice access and empty order list match auditor", + "invoice access and empty order list match actor", + "buyer starts with one approved award and no issued main order", + "invoice access and empty order list match validator", + "warehouse waits for actual main order", + "served invoice script matches delivery", + "demo smoke leaves business and budget evidence unchanged" + ], + "before": "a717287d07318e5ef3a9f17dcd74c901debb0c16d38009f1413279897ab408be", + "after": "a717287d07318e5ef3a9f17dcd74c901debb0c16d38009f1413279897ab408be", + "main_orders": 0, + "invoices": 0, + "consumptions": 0, + "visual_review": false + } + }, + "assets": { + "file": "private/receipt-composition-4b781d06bef8/obligation-demo-assets.json", + "sha256": "ac5d3f82db928ad7d7e5e1a2bc966b8ddd23eba73a7b73dfec30fe633c5c51d5", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "private frontend build succeeds", + "served built assets match private build", + "obligation module is served through private static whitelist" + ], + "assets": [ + "assets/app-BYao6bqZ.js", + "assets/app-BLSNCrO7.css" + ], + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + }, + { + "file": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6" + }, + { + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + }, + { + "file": "app/Modules/Identity/Services/IdentityWorkflow.php", + "sha256": "28a075a5819181ebd07c45066c4272f15a38bd532d4df0bd7ba0b7886b2d9bf0" + }, + { + "file": "app/Shared/Context/ModuleNavigation.php", + "sha256": "aaa806cb149a8dea5788daba51b87fe74dd8fd23e1ac5abb323f5f40636c785e" + }, + { + "file": "config/common-payables.php", + "sha256": "d14d1a5a27587a7d57a2518bf95e2f17ed103755bd966f2f1bbfaae937827766" + }, + { + "file": "config/receipt_qa.php", + "sha256": "6b1c10761f8c85aec0f556a32092c271e0891633af7e5a6f6bd3e79a3555665e" + }, + { + "file": "routes/web.php", + "sha256": "1536cea60224a3d9770d4bbcd3a58fa1db977326ac786b6b83676a34a0a94ab9" + }, + { + "file": "resources/js/PurchasingHome.jsx", + "sha256": "b835535130c04a4ab6b69a4be92cfcd178ea7d2b5bb39bfa3f02ad090b84bcbb" + }, + { + "file": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "e359ab81d73ddcbf80117a6f3f1ec6b493da90c60cd2b42bf3648322baf47841" + }, + { + "file": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e" + }, + { + "file": "public/supplier-obligation-workspace.mjs", + "sha256": "eeb450e38dad72d9c38538ed363202d0a6cfcec466c61171028108f1bc243837" + } + ], + "shared_writer_sources": [ + { + "file": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d" + }, + { + "file": "packages/payables/src/PayablesSchema.php", + "sha256": "5774c24dbe2b6c06a7e51b359eaad88aee7fc99df2640f687b3065eaa03776d4" + }, + { + "file": "packages/payables/src/ReceiptReader.php", + "sha256": "ed4e153d539ad660f9b87c44d70b14166dbb7262bc9aa5d81b71559a8c80999e" + }, + { + "file": "packages/payables/src/HistoricalPayments.php", + "sha256": "c55d3e67a8bad469184d664f7739a97af7121d685315c6d55f90d08355c632f0" + }, + { + "file": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe" + } + ], + "pinned_native_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "canonical_authority": { + "native_book": true, + "imported_host_mirror": false, + "source_instance": "same qa-stock-ledger identity as original native provisioning", + "principal_minor": 10000, + "obligations": 1, + "recognition_events": 1, + "due_on": null, + "payments_created": 0, + "additional_stock_or_budget_effect": false, + "ledger_posted": false + }, + "demo": { + "port": 8071, + "approved_award_prepared": true, + "main_orders": 0, + "receipts": 0, + "invoices": 0, + "proposals": 0, + "obligations": 0, + "preparer_url": "http://127.0.0.1:8071/qa/enter/issuer?open=1&obligations=1", + "reviewer_url": "http://127.0.0.1:8071/qa/enter/reviewer?open=1&obligations=1" + }, + "qa_rights": [ + "purchasing_obligations.view", + "purchasing_obligations.prepare", + "purchasing_obligations.validate" + ], + "prior_proofs_preserved": [ + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec" + }, + { + "file": "docs/proofs/geography-composition-20261103.json", + "sha256": "2f181320e2cc01095266d64f660b1e28697cb1e44529b89357fbfb21ab436a9e" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "target_database_connected": false, + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "previous_demo_data_written": false, + "public_rights_changed": false, + "publication": false, + "checkpoint": false + }, + "limitations": [ + "The35 integration checks preceded the added module-ownership rule; the6 later boundary checks verify the changed routing and preserve all financial evidence, without repeating the valid suite.", + "Changed-source replay is tested with the same native adapter/kernel using an injected duplicate validation audit inside a rollback-only transaction. It is an adversarial fixture, not another business validation.", + "Current native schema provisioning uses the current native project; runtime uses the previously tested frozen bundle. No general deployment compatibility is inferred.", + "Due date and overdue remain unknown. Recognition does not activate payment, history import, reconciliation, ledger or fiscal issuance.", + "Index uses server filters/pages25; evidence uses independent pages25 and current-state comparison reads only the latest capture. No sustained-load capacity conclusion.", + "The demonstration starts from an approved native award. Earlier request/sourcing/geography demonstrations remain separate fixtures, not falsely presented as one upgraded installation.", + "Visual review and production configuration, least-privilege installation and deployment capacity remain pending." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/supplier-picker-model-20261103.json b/docs/proofs/supplier-picker-model-20261103.json new file mode 100644 index 0000000..edc26ff --- /dev/null +++ b/docs/proofs/supplier-picker-model-20261103.json @@ -0,0 +1,14 @@ +{ + "passed": true, + "checks": [ + "late older query cannot overwrite newer results", + "results never automatically select first supplier", + "individual choice retains exact supplier revision", + "changing page immediately invalidates previous choice", + "failed request keeps no stale selectable options", + "query editing invalidates choice and options", + "departed workspace ignores outstanding response", + "unknown id cannot become a selection" + ], + "visual_review": false +} diff --git a/docs/proofs/supplier-search-composition-20261103.json b/docs/proofs/supplier-search-composition-20261103.json new file mode 100644 index 0000000..ab72c54 --- /dev/null +++ b/docs/proofs/supplier-search-composition-20261103.json @@ -0,0 +1,229 @@ +{ + "date": "2026-11-03T15:05:42.317Z", + "increment": "SGF-SOURCING-SUPPLIER-SEARCH-QA-v1", + "passed": true, + "functional_code": true, + "checks": 51, + "tests": { + "api": { + "file": "private/receipt-composition-ce396aec18ee/supplier-search-result.json", + "sha256": "dc8e8bfd011eecdc22744071b21a39dcce68b20a78146b515caf2f61aa91bdfd", + "checks": 31, + "result": { + "passed": true, + "checks": [ + "selector source uses genuinely prepared and approved request", + "server supplier page1 contains authorised bounded window", + "server supplier page2 contains authorised bounded window", + "server supplier page3 contains authorised bounded window", + "server supplier page4 contains authorised bounded window", + "server supplier page5 contains authorised bounded window", + "all125 suppliers reachable beyond previous100 cap without overlap", + "explicit and current-unit audited suppliers admitted; unbound and another-unit origins excluded", + "blocked suspended overdue and foreign-tenant suppliers excluded", + "pages100 and25 cover same eligible universe", + "NUIT search reaches supplier beyond old cap with exact selection revision", + "selector response exposes no contact bank or diligence details", + "percent and underscore search are literal rather than wildcards", + "name search ignores case without broadening scope", + "empty search returns no invented alternative selection", + "invalid pages sizes and unsupported filters rejected", + "browse requires existing scoped sourcing preparation right", + "foreign request cannot be used as catalogue entry point", + "stale or substituted selection revision requires new lookup", + "forged foreign supplier id cannot bypass selector", + "forged blocked id remains refused by original native workflow", + "supplier beyond100 receives original pricing and impact preview", + "selector browsing and quotation preview persist no business decision", + "supplier change after preview refuses confirmation without quote", + "eligibility change after preview requires fresh conference", + "revoked right prevents browsing and confirmation", + "concurrent same-key confirmation still produces exactly one native quote", + "explicit beyond100 choice and historical receipt recover without duplication", + "different available module cannot browse procurement catalogue", + "unmapped unit cannot reuse supplier search", + "selection adds no order invoice debt payment or localisation" + ], + "eligible_suppliers": 125, + "page_sizes": [ + 25, + 100 + ], + "beyond100_selected": true, + "quote_count": 1, + "concurrency_statuses": [ + 200, + 201 + ], + "new_right_names": [], + "visual_review": false, + "deployment_capacity_validated": false + } + }, + "guards": { + "file": "private/receipt-composition-ce396aec18ee/supplier-search-guard.json", + "sha256": "b4cb3f0fbf743fdddc5cf650cc2d01b5625eb625dd0bf2bf7f0b3b1ee294a89e", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "disabled supplier lookup refuses before SQL", + "production refuses synthetic selector before SQL", + "lookup belongs to purchasing and guard probes issue zero SQL" + ], + "database_queries": 0 + } + }, + "selection_model": { + "file": "docs/proofs/supplier-picker-model-20261103.json", + "sha256": "689d14df3fa24e8e38b6e1afae1e7e10dd5b5f1cdee9674932ce769530f4502f", + "checks": 8, + "result": { + "passed": true, + "checks": [ + "late older query cannot overwrite newer results", + "results never automatically select first supplier", + "individual choice retains exact supplier revision", + "changing page immediately invalidates previous choice", + "failed request keeps no stale selectable options", + "query editing invalidates choice and options", + "departed workspace ignores outstanding response", + "unknown id cannot become a selection" + ], + "visual_review": false + } + }, + "demo": { + "file": "private/receipt-composition-4f0cc899a103/supplier-search-demo.json", + "sha256": "b103c4dae9020952553865976bdb5eb62e0003e891e05f9f57ad60884896eae1", + "checks": 6, + "result": { + "passed": true, + "checks": [ + "new live demo starts before source request and proposal", + "sourcing screen serves in new composition", + "common integrated navigation preserved", + "served selector source matches sourcing-workspace.mjs", + "served selector source matches supplier-picker-model.mjs", + "live screen and source checks leave operations and locations intact" + ], + "before": "b23efb2e45a4c182efd487e62289658699cf79e22091716f2cd2ea2c5b057bd2", + "after": "b23efb2e45a4c182efd487e62289658699cf79e22091716f2cd2ea2c5b057bd2", + "visual_review": false + } + }, + "assets": { + "file": "private/receipt-composition-4f0cc899a103/supplier-search-assets.json", + "sha256": "4682a3c84651fc08694754dde531aec6a90670a10a71dcef816e1c8ecf682200", + "checks": 3, + "result": { + "passed": true, + "checks": [ + "private frontend build succeeds", + "served built assets match private build", + "obligation module is served through private static whitelist" + ], + "assets": [ + "assets/app-rwyn9RPO.js", + "assets/app-BLSNCrO7.css" + ], + "visual_review": false + } + } + }, + "sources": [ + { + "file": "app/Modules/Purchasing/SourcingController.php", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3" + }, + { + "file": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0" + }, + { + "file": "public/sourcing-workspace.mjs", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548" + }, + { + "file": "public/supplier-picker-model.mjs", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde" + }, + { + "file": "routes/web.php", + "sha256": "5a86c394ca72e0939c15333ff27097889d60e4d4a6aeb373020bdbd2a872c5d7" + } + ], + "pinned_native_manifests": { + "bundle": "7709a3d447d54c17d2fb4be4f9a0f70455c4a38c34e4bb8c643f6b5169071556", + "economic": "8b2d3aa61054e0edc54fcd818467eb2bacb5e1178f903b12ab44119e0f2e8d2e", + "internal": "2343af71f72259dd705f4cc3a3b163c90edf331a5b6ebe173531aeb341649e1b" + }, + "selector": { + "eligible_suppliers": 125, + "synthetic_extra_directory_rows": 127, + "server_page_sizes": [ + 25, + 100 + ], + "literal_name_or_nuit_search": true, + "manual_choice": true, + "selected_revision_rechecked": true, + "request_scope_reused": true, + "new_permission_names": [], + "api_projection": [ + "id", + "name", + "nuit", + "version", + "selection_revision" + ] + }, + "demo": { + "port": 8073, + "entry": "http://127.0.0.1:8073/qa/enter/requester?open=1", + "buyer": "http://127.0.0.1:8073/qa/enter/actor?open=1", + "initial_main_requests": 0, + "initial_quotes": 0, + "locations": 0, + "synthetic_directory_seed": true + }, + "prior_proofs_preserved": [ + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396" + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011" + }, + { + "file": "docs/proofs/module-association-consolidation-summary-20261102.json", + "sha256": "8f693f39763ee21a22ebd3929d95ba1480f339eca18742fa53055c69eb5219ef" + } + ], + "preservation": { + "installed_purchasing_sha256": "81899e531e9eec449717e694d8bdc106a9e220a828f5491ce918c1d2dc612787", + "target_database_connected": false, + "protected_six_records_changed": false, + "blocked_cache_cleared": false, + "previous_demo_data_written": false, + "public_rights_changed": false, + "publication": false, + "checkpoint": false + }, + "limitations": [ + "Selector and quotation boundary verified; existing downstream suites were reused rather than repeated.", + "Legacy show response retains a bounded25-row supplier summary. The current interface uses the paged endpoint and never treats that summary as the complete directory.", + "Older direct clients may omit supplier_revision when preparing; the server still captures the current supplier fingerprint in every new preview and rechecks it before a new confirmation. Current interface also sends the fingerprint selected from the page.", + "Recorded same-key command receipts remain historical results, after current rights and origin checks; they do not execute a new quote when supplier facts subsequently change.", + "Extra directory records and scope audit markers are explicit synthetic fixture data, not130 newly onboarded supplier reviews or real company associations.", + "No new indexes, deployment activation, payment, accounting or real operations.", + "Visual review, sustained-load measurements and deployment/least-privilege capability remain pending." + ], + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/supplier-search-flow-20261103.json b/docs/proofs/supplier-search-flow-20261103.json new file mode 100644 index 0000000..c8a136d --- /dev/null +++ b/docs/proofs/supplier-search-flow-20261103.json @@ -0,0 +1,622 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "631d7d0ceb8233879dcaff5865427dd01d65b769554ce97060732f7536f2bfb8", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "2c946b782a62e81b3ec637e2f72590ed6a6c0774f04a8082171f9c898d37c2db", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "75a4d917b300dc9f9c89a8feb90e4ba39829177f946a28fc613612ab4b91a308", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "4bfff0204e67f21a6ddd785d64e7c91bd63bf65742add42fc3aa7f943ab5a6e4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_screen", + "repository": "sgf", + "path": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_screen", + "repository": "sgf", + "path": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_workspace", + "repository": "sgf", + "path": "app/Modules/Purchasing/WorkspaceNavigation.php", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_navigation", + "repository": "sgf", + "path": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/supplier-search-flow-verified-20261103.json b/docs/proofs/supplier-search-flow-verified-20261103.json new file mode 100644 index 0000000..d152c5c --- /dev/null +++ b/docs/proofs/supplier-search-flow-verified-20261103.json @@ -0,0 +1,636 @@ +{ + "id": "SGF-MODULE-FLOW-PREPARATION-v1", + "date": "2026-11-02", + "kind": "static_preparation_inventory", + "plan_sha256": "8d7906df10335a114676c559ca3a80183bebe08703bd6fda0336b1e27cad3f53", + "sources": [ + { + "id": "requisitions_delivery", + "repository": "sgf", + "path": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_workflow", + "repository": "compras", + "path": "app/Services/ReceiptWorkflow.php", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_workflow", + "repository": "compras", + "path": "app/Services/StockWorkflow.php", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_controller", + "repository": "compras", + "path": "app/Http/Controllers/StockController.php", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_lots", + "repository": "compras", + "path": "app/Services/InventoryLots.php", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_counts", + "repository": "compras", + "path": "app/Services/InventoryCounts.php", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_dispositions", + "repository": "compras", + "path": "app/Services/InventoryDispositions.php", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reversals", + "repository": "compras", + "path": "app/Services/InventoryReversals.php", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "warehouse_reservations", + "repository": "compras", + "path": "app/Services/WarehouseReservations.php", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_menu", + "repository": "sgf", + "path": "resources/js/stock-menu.js", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "invoice_workflow", + "repository": "compras", + "path": "app/Services/InvoiceWorkflow.php", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "supplier_adapter", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierPayables.php", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "payables", + "repository": "sgf", + "path": "packages/payables/src/Payables.php", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlements", + "repository": "sgf", + "path": "packages/payables/src/SupplierSettlements.php", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "settlement_delivery", + "repository": "sgf", + "path": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_workflow", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopWorkflow.php", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "direct_costs", + "repository": "sgf", + "path": "app/Modules/Workshop/DirectCosts.php", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_costs", + "repository": "sgf", + "path": "app/Modules/Industry/IndustrialCosts.php", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_billing", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopBilling.php", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_invoicing", + "repository": "sgf", + "path": "app/Modules/Services/ServiceInvoicing.php", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "service_receivables", + "repository": "sgf", + "path": "app/Modules/Services/ServiceReceivables.php", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "catalogue_accounting", + "repository": "sgf", + "path": "app/Modules/Services/CatalogueAccounting.php", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "accounting_menu", + "repository": "sgf", + "path": "docs/ACCOUNTING_MENU_DELIVERY.md", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_core", + "repository": "sgf", + "path": "packages/general-ledger/src/PayableJournal.php", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_adapter", + "repository": "sgf", + "path": "app/Modules/Accounting/GeneralLedger.php", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "general_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_DELIVERY.md", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_core", + "repository": "sgf", + "path": "packages/general-ledger/src/LedgerCycle.php", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_native_adapter", + "repository": "compras", + "path": "app/Services/GeneralLedger.php", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "ledger_cycle_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_source", + "repository": "sgf", + "path": "app/Modules/Accounting/IndustrialLedgerSource.php", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_workspace", + "repository": "sgf", + "path": "resources/views/accounting/industrial-ledger.blade.php", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_ledger_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "industrial_correction_delivery", + "repository": "sgf", + "path": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_writer", + "repository": "sgf", + "path": "packages/inventory-write/src/ReceiptMovementWriter.php", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_movement_adapter", + "repository": "compras", + "path": "app/Services/ReceiptStockMovement.php", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "inventory_reader", + "repository": "sgf", + "path": "packages/inventory-read/src/InventoryReader.php", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_read_adapter", + "repository": "sgf", + "path": "app/Modules/Inventory/StockReadController.php", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_bridge", + "repository": "sgf", + "path": "app/Modules/Workshop/WorkshopStock.php", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "workshop_stock_controller", + "repository": "sgf", + "path": "app/Modules/Workshop/Http/WorkshopStockController.php", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "receipt_recovery_workspace", + "repository": "sgf", + "path": "resources/views/accounting/receipt-recovery.blade.php", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_core", + "repository": "compras", + "path": "packages/purchasing/src/InternalRequisitions.php", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "requisition_qa_composition", + "repository": "sgf", + "path": "app/Modules/Purchasing/InternalRequisitionQa.php", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_core", + "repository": "sgf", + "path": "packages/general-ledger/src/StockValuation.php", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_observer", + "repository": "sgf", + "path": "app/Modules/Accounting/StockValuationRead.php", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_schema", + "repository": "sgf", + "path": "packages/general-ledger/src/StockSchema.php", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_composition", + "repository": "sgf", + "path": "packages/general-ledger/src/StockComposition.php", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "stock_valuation_adapter", + "repository": "sgf", + "path": "integrations/purchasing/StockValuationAdapter.php", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_runtime", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptRuntime.php", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ReceiptController.php", + "sha256": "2c946b782a62e81b3ec637e2f72590ed6a6c0774f04a8082171f9c898d37c2db", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_receipt_screen", + "repository": "sgf", + "path": "resources/views/receipt-workspace.blade.php", + "sha256": "75a4d917b300dc9f9c89a8feb90e4ba39829177f946a28fc613612ab4b91a308", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/OrderController.php", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_order_workflow", + "repository": "compras", + "path": "app/Services/PurchaseWorkflow.php", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_order_screen", + "repository": "sgf", + "path": "resources/views/order-workspace.blade.php", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SourcingController.php", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_sourcing_screen", + "repository": "sgf", + "path": "resources/views/sourcing-workspace.blade.php", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_quotation_controller", + "repository": "compras", + "path": "app/Http/Controllers/QuotationController.php", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "native_proposal_comparison", + "repository": "compras", + "path": "app/Services/ProposalComparison.php", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierController.php", + "sha256": "4bfff0204e67f21a6ddd785d64e7c91bd63bf65742add42fc3aa7f943ab5a6e4", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/SupplierAccess.php", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_screen", + "repository": "sgf", + "path": "resources/views/supplier-workspace.blade.php", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequestController.php", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_access", + "repository": "sgf", + "path": "app/Modules/Purchasing/RequisitionAccess.php", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_request_screen", + "repository": "sgf", + "path": "resources/views/request-workspace.blade.php", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/InvoiceController.php", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_invoice_screen", + "repository": "sgf", + "path": "resources/views/supplier-invoice-workspace.blade.php", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_controller", + "repository": "sgf", + "path": "app/Modules/Purchasing/ObligationController.php", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_obligation_screen", + "repository": "sgf", + "path": "resources/views/supplier-obligation-workspace.blade.php", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_workspace", + "repository": "sgf", + "path": "app/Modules/Purchasing/WorkspaceNavigation.php", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_purchasing_navigation", + "repository": "sgf", + "path": "resources/views/partials/purchasing-navigation.blade.php", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_picker", + "repository": "sgf", + "path": "public/supplier-picker-model.mjs", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "meaning": "source_present_only_not_operational_proof" + }, + { + "id": "sgf_supplier_search_ui", + "repository": "sgf", + "path": "public/sourcing-workspace.mjs", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548", + "meaning": "source_present_only_not_operational_proof" + } + ], + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "effect": "approved_procurement_origin", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion." + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "effect": "accepted_physical_receipt", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate." + }, + { + "id": "physical_stock", + "owner": "stock", + "effect": "physical_movement_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending." + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "effect": "verified_supplier_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin." + }, + { + "id": "supplier_payable", + "owner": "finance", + "effect": "supplier_obligation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin." + }, + { + "id": "supplier_settlement", + "owner": "finance", + "effect": "confirmed_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered." + }, + { + "id": "workshop_execution", + "owner": "workshop", + "effect": "verified_work_record", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Verified observations exist; no automatic physical stock movement." + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "effect": "company_material_consumption_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending." + }, + { + "id": "verified_cost", + "owner": "finance", + "effect": "validated_cost_version", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible." + }, + { + "id": "sales_draft", + "owner": "commercial", + "effect": "commercial_draft_from_unique_origins", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Draft integration exists; cost is not sale price and draft does not decrement stock." + }, + { + "id": "sales_invoice", + "owner": "commercial", + "effect": "issued_sales_document", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded." + }, + { + "id": "customer_receivable", + "owner": "finance", + "effect": "customer_receipt_allocation_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded." + }, + { + "id": "general_ledger", + "owner": "accounting", + "effect": "balanced_journal_once", + "state": "partial_synthetic", + "operational_integration_validated": false, + "gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending." + } + ], + "checks": { + "source_paths_and_hashes": true, + "single_owner_per_stage": true, + "mandatory_dependency_graph_acyclic": true, + "planned_consumers_explicit": true + }, + "limitations": [ + "Source existence is not execution, parity, acceptance or deployment evidence.", + "Dependencies represent the selected synthetic path, not universal product eligibility rules.", + "No stage transition engine, inventory adapter or journal engine implemented by this inventory." + ], + "preservation": { + "database_connections": 0, + "source_execution": false, + "application_routes_changed": false, + "rights_changed": false, + "protected_six_records_untouched": true, + "blocked_cache_untouched": true, + "demos_changed": false, + "purchasing_activated": false, + "publication": false, + "checkpoint": false + }, + "visual_review_pending": true, + "deployment_capacity_validated": false +} diff --git a/docs/proofs/supplier-search-matrix-20261103.json b/docs/proofs/supplier-search-matrix-20261103.json new file mode 100644 index 0000000..1c4bfe4 --- /dev/null +++ b/docs/proofs/supplier-search-matrix-20261103.json @@ -0,0 +1,1720 @@ +{ + "date": "2026-11-03T15:05:10.443Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "631d7d0ceb8233879dcaff5865427dd01d65b769554ce97060732f7536f2bfb8", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "4bfff0204e67f21a6ddd785d64e7c91bd63bf65742add42fc3aa7f943ab5a6e4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_workspace", + "file": "app/Modules/Purchasing/WorkspaceNavigation.php", + "repository": "sgf", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_navigation", + "file": "resources/views/partials/purchasing-navigation.blade.php", + "repository": "sgf", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "2c946b782a62e81b3ec637e2f72590ed6a6c0774f04a8082171f9c898d37c2db", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "75a4d917b300dc9f9c89a8feb90e4ba39829177f946a28fc613612ab4b91a308", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + } + ], + "current_hash_has_matching_recorded_evidence": false + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_invoice_controller", + "file": "app/Modules/Purchasing/InvoiceController.php", + "repository": "sgf", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_invoice_screen", + "file": "resources/views/supplier-invoice-workspace.blade.php", + "repository": "sgf", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_obligation_controller", + "file": "app/Modules/Purchasing/ObligationController.php", + "repository": "sgf", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_screen", + "file": "resources/views/supplier-obligation-workspace.blade.php", + "repository": "sgf", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 72 + } + ], + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/docs/proofs/supplier-search-matrix-verified-20261103.json b/docs/proofs/supplier-search-matrix-verified-20261103.json new file mode 100644 index 0000000..cc924c7 --- /dev/null +++ b/docs/proofs/supplier-search-matrix-verified-20261103.json @@ -0,0 +1,1776 @@ +{ + "date": "2026-11-03T15:05:56.510Z", + "kind": "matrix_code_recorded_evidence_audit", + "plan_sha256": "8d7906df10335a114676c559ca3a80183bebe08703bd6fda0336b1e27cad3f53", + "stages": [ + { + "id": "requisition_order", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "requisitions_delivery", + "file": "docs/SGF_REQUISITIONS_8039_DELIVERY.md", + "repository": "sgf", + "sha256": "9c0bc172b91314c54e67ac1f547ce64cf2ce97d2df285172ad5d99eee554b167", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "requisition_core", + "file": "packages/purchasing/src/InternalRequisitions.php", + "repository": "compras", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "5acd82015a4f4b24c5f956139e7d9ec8822e1408e8edd6a2c21802673d647d94" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "requisition_qa_composition", + "file": "app/Modules/Purchasing/InternalRequisitionQa.php", + "repository": "sgf", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/requisition-composition-20261103.json", + "sha256": "3195b51cca7546e050b62791407bdbfd130ddc2f2eabc06feed5c9bbd7f76303" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_order_controller", + "file": "app/Modules/Purchasing/OrderController.php", + "repository": "sgf", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "958468211587591669c506560b050ada21e1058fe353d3f09950474380e4724a" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "065b8344a7019d29d1c5b1b6077e51946a8c82e5cb1a93bb4088a58e4796678e" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "4ebab47ecb008f3c31f970f399e8c19df7e860d7b6482227a800fb61dd28dd48" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_order_workflow", + "file": "app/Services/PurchaseWorkflow.php", + "repository": "compras", + "sha256": "f01bbda4b8f5b65b0c9bd508266f7b3868c9b881302b7e4c2702684dfae756cf", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_order_screen", + "file": "resources/views/order-workspace.blade.php", + "repository": "sgf", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "e5302fffe7a76f9675fb04eacc544ba6e423a4af311c66e7e550f826253b014e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "a33e98fb469b036df3d95c73001bf1e842e414bd0c93ded2a4d2d72d7c52565b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_controller", + "file": "app/Modules/Purchasing/SourcingController.php", + "repository": "sgf", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "b479c582f54fcd26ec6c713012f38ac12ca1b33b264fdf5fa90c89fa3b0301c5" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "1c31ffb5a3294a427aab90587bfb3dcd7d65c98cc5f1666d6478f23056ea4b39" + }, + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "0b297af4648a5690c99cac5015e009dfd3eb32d236fae63a5716b964e44c71f6" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7b5ed82ee1b336b7a5f8ccf8a989d52ca4ccdcf321d0c92fd3385689151489f3" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_sourcing_screen", + "file": "resources/views/sourcing-workspace.blade.php", + "repository": "sgf", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "90e8887a5db9d7b5ab9e5f400992186c8f49369cc2ad88af984469a09c1b8bfc" + }, + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "922883253058514f7a8712c463e9f4f03d4fb7c786827a1dce85176cbf9bba46" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "32e67b9145109099de0aea2198d9faca4e97155e1132881ff9c4f522741c763f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "native_quotation_controller", + "file": "app/Http/Controllers/QuotationController.php", + "repository": "compras", + "sha256": "23bc3af0fd4b67abb2f497742c06dff0208f3abcec1dd2c3338c15ff2abd3924", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "native_proposal_comparison", + "file": "app/Services/ProposalComparison.php", + "repository": "compras", + "sha256": "f34e7f736a18ae9e21bba324ebdf738c02cdcc6b4841367a13a5868631cd5dfa", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_controller", + "file": "app/Modules/Purchasing/SupplierController.php", + "repository": "sgf", + "sha256": "4bfff0204e67f21a6ddd785d64e7c91bd63bf65742add42fc3aa7f943ab5a6e4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "86fdec283bb409f1b96f1d98bd6759350004a4445ba48484427920111863b0fd" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_access", + "file": "app/Modules/Purchasing/SupplierAccess.php", + "repository": "sgf", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "b823189d10e8ecf9a55e9021bffce023a7e6d4e2b0db2710c32910591968d814" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_screen", + "file": "resources/views/supplier-workspace.blade.php", + "repository": "sgf", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-composition-20261103.json", + "sha256": "50df84132c27351cc9e43e38d55599fe64912aa0f50bb78a560b14f5f1445fc6" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "010afb19afd35b90d6b7ffe048f77b97c85b2329d7253cb9c1765e869ca1ec3b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_controller", + "file": "app/Modules/Purchasing/RequestController.php", + "repository": "sgf", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "01033a50d6f1dfbdea34357e6853b978e066f11a1267fcd652606f67930d7009" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_access", + "file": "app/Modules/Purchasing/RequisitionAccess.php", + "repository": "sgf", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "a955228df0f793d3b90f37e5ca890c53af88f6406140e98fe9a614c3821980cc" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_request_screen", + "file": "resources/views/request-workspace.blade.php", + "repository": "sgf", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/request-to-receipt-composition-20261103.json", + "sha256": "829ecf90d08b1776828231efc43cf0540b12aa1177feede57f735bf0557c74c1" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "568f6eb0b2be3ae87728a75d6aacb6199a031e7bd82462ae26398a362822fc9c" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_workspace", + "file": "app/Modules/Purchasing/WorkspaceNavigation.php", + "repository": "sgf", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0e46549b61bd1f1e505c42ed4adebe43f900a0afffad24ea77be4b4d5e42bba1" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_purchasing_navigation", + "file": "resources/views/partials/purchasing-navigation.blade.php", + "repository": "sgf", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "95b3941ef72eb8df59624320a622eb96e5fdd2e7b0e5365c0332d06952ebbd50" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_picker", + "file": "public/supplier-picker-model.mjs", + "repository": "sgf", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "7eda0e980a0d7c88a8fbf6ea446de2d169df22138a9fb6f62ecfa50b10506bde" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_supplier_search_ui", + "file": "public/sourcing-workspace.mjs", + "repository": "sgf", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "15ed768992dfd8858df65ce7fa41c733906875aec98b1c347169d83571cde52e" + }, + { + "proof": "docs/proofs/supplier-search-composition-20261103.json", + "sha256": "9eb38e43626d96d71c0cbaf6c00700ab9fdaf06dd82d8405ba04b13cd2f86548" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/internal-requisitions-sgf.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "78cc01f4d8b1b28a7e596ad58a042cb532e11310cfe2764c8aab22f05080f373", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/requisition-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 50 + } + ], + "sha256": "8e4e7a113274b16f9e1d6882ae4f0bf04eb3e9c0d580cf1743fdfe248458f67e", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 64 + } + ], + "sha256": "b37e265ed5cd6c96921eabdeb024ea2907630992726eab14ee2be170d3c88841", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/request-to-receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 103 + } + ], + "sha256": "1713f42e3352ef13718a7394260b97c0c5ada40a9a3bbc87ab852313f6ab32ce", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-search-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 51 + } + ], + "sha256": "388e738da7e9b3e7f521c8d67f85dd4ef34869c74daf0c04c09067b9fbde5242", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "New SGF requests now start as drafts, submit/reserve once, receive distinct native approval and continue with the same request ID to sourcing, award, order/commitment and receipt in demo8068. Host budget entries stay unchanged. Supplier registry/review remains delivered in QA. Conversion of legacy host-reserved ir_requests requires its own responsibility/recovery protocol and is not delivered. Technical catalogues, formal regimes, later corrections and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin. The earlier100-supplier selection cap is resolved in demo8073: literal name/NUIT search and server pages25/100, explicit selection, stale-response protection and supplier fingerprint revalidation before a new quotation. Existing rights and native rules are reused; no deployment or sustained-load capacity conclusion.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "accepted_receipt", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "receipt_workflow", + "file": "app/Services/ReceiptWorkflow.php", + "repository": "compras", + "sha256": "e824dbc7fb0e6dbc748f905fc84fbd6c8bfaff814df0ddf25aa6077fa89dcc78", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "a7325d4fdb09d1767d0d4fa3661bcf9b254e8506285080d6063bbed487bb522c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "receipt_writer", + "file": "packages/inventory-write/src/ReceiptMovementWriter.php", + "repository": "sgf", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "279cec2ec915e27cf431355fca1e36f21cb3c15a77d02834723a41ec7a6f8f40" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_movement_adapter", + "file": "app/Services/ReceiptStockMovement.php", + "repository": "compras", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "bd95d201563e4b028f7412eea77d5b157bbc464ddb5b34907bdf17b44d3c1637" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_receipt_runtime", + "file": "app/Modules/Purchasing/ReceiptRuntime.php", + "repository": "sgf", + "sha256": "9b426476b2805094fb317cc753385ef43882fb4964883e880eac287eed89d9e0", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "2e1f08c7d79c89bce99244a810dcc6dbbb61a6cd8cc90e4f2b505d1fd9298a78" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "351f27debde9eedf2b1b967fcb06f4274c6c77f33fab2801f849fca1016a63ae" + }, + { + "proof": "docs/proofs/sourcing-composition-20261103.json", + "sha256": "9554e2a4223d6a8424926d496011cb8be6e18f92eb4a134088c199d207fa6ed1" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_receipt_controller", + "file": "app/Modules/Purchasing/ReceiptController.php", + "repository": "sgf", + "sha256": "2c946b782a62e81b3ec637e2f72590ed6a6c0774f04a8082171f9c898d37c2db", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "93378e80afcab17b51826fd592683f47c4425818e11d0506ee2498a86953fbab" + }, + { + "proof": "docs/proofs/order-composition-20261103.json", + "sha256": "d448d3304e85ff9d1e0b8736612ace04ac5e08c487872d2204c37752a248ab6c" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_receipt_screen", + "file": "resources/views/receipt-workspace.blade.php", + "repository": "sgf", + "sha256": "75a4d917b300dc9f9c89a8feb90e4ba39829177f946a28fc613612ab4b91a308", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/receipt-composition-20261103.json", + "sha256": "8a0d15a6a6bde34a6aca4ddae3f7e0219f951c109a16e6ad9b5f0a69e678e1e8" + } + ], + "current_hash_has_matching_recorded_evidence": false + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/tests/native_link/failures", + "equals": 0 + }, + { + "pointer": "/tests/native_link/errors", + "equals": 0 + }, + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/order-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 49 + } + ], + "sha256": "3334bf6f45ca629f1c1a0ea907f7b0804f0e90752d1ade0e9fb07599b4d310e3", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/sourcing-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 74 + } + ], + "sha256": "405c0288aface14cc9f1f417e46cf899b3656e1cbb2617120c048cde17b93191", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF source-to-receipt selected path is delivered in QA: three proposals, six evaluations, one approved award, one order/100MZN commitment and one receipt/physical movement, with canonical history and original workflows. Demo8066 starts before these individual decisions;8064/8065 preserved. General installation, catalogue search, sustained load and deployment remain pending; SGF internal requisition handoff remains separate.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "physical_stock", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_controller", + "file": "app/Http/Controllers/StockController.php", + "repository": "compras", + "sha256": "79aa0f96da7b8290b23489bdaa5c45a4d9f122483dbc0b4132793f76e4f97d0b", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_lots", + "file": "app/Services/InventoryLots.php", + "repository": "compras", + "sha256": "911a0ce691c58ec1f635260e875ff8d4acfa2a45eecbf74b59b254b3d9209b52", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_counts", + "file": "app/Services/InventoryCounts.php", + "repository": "compras", + "sha256": "0c1b0d5e795a15b4d762c47fcdbeb19f225aa933b4507938f310ff25026afa11", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_dispositions", + "file": "app/Services/InventoryDispositions.php", + "repository": "compras", + "sha256": "35a05ed9d6e2cb96a38c1d9b8cb02631bae000a9ac9633dbb53025ceb611983c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reversals", + "file": "app/Services/InventoryReversals.php", + "repository": "compras", + "sha256": "d1712029d7cedda6fbc9b0562bc108ebf8fb235d7aeb2bca4158639d3fc9a2a2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "warehouse_reservations", + "file": "app/Services/WarehouseReservations.php", + "repository": "compras", + "sha256": "3120eaf6d9c8cedf3c991edcb41133f5107ca62736cea7e082ae4773755ffb54", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "stock_menu", + "file": "resources/js/stock-menu.js", + "repository": "sgf", + "sha256": "776360166b0fdacad343853eb335044306f078acb8da1439715010b4713dc4ff", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "inventory_reader", + "file": "packages/inventory-read/src/InventoryReader.php", + "repository": "sgf", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "9b0591600da07719d655324ccf0b740f06de07db2806540684c9730d048e44b6" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_read_adapter", + "file": "app/Modules/Inventory/StockReadController.php", + "repository": "sgf", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/stock-read-summary-20261102.json", + "sha256": "58465ac0f30dfe170f71f484261251d90d73fabd18a9413211f66c54a678bdbe" + }, + { + "proof": "docs/proofs/stock-receipt-link-20261102.json", + "sha256": "c6131733974b6902c556593709729356769d11aea9eada3fc5397246102068f4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_core", + "file": "packages/general-ledger/src/StockValuation.php", + "repository": "sgf", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "a289ac2ad4a373628dabbc90c395002c22c4f86b51199f40c7aa82dbbe35cac3" + }, + { + "proof": "docs/proofs/stock-prefix-stream-20261103.json", + "sha256": "05f32dab605157b621aa3f419c500286517d0240940bfeae1eefbf194f317323" + }, + { + "proof": "docs/proofs/stock-period-batches-20261103.json", + "sha256": "6fe704a737e8fd6684a60848b7956db345ca75fd18f517ac69c6f4dbee52e1df" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_observer", + "file": "app/Modules/Accounting/StockValuationRead.php", + "repository": "sgf", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "cf8618800c6e93d12314cb11009505a4da0384d8701fbaaceaf2cee6489d47a3" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/stock-read-summary-20261102.json", + "checks": [ + { + "pointer": "/tests/final_functional/failures", + "equals": 0 + }, + { + "pointer": "/tests/final_functional/errors", + "equals": 0 + } + ], + "sha256": "41426b1ecf8c3b038a80aa51ff8cbb8cbaaa07564f0a5453df032108f91a2492", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-receipt-link-20261102.json", + "checks": [ + { + "pointer": "/same_native_movement_observed_by_sgf", + "equals": true + } + ], + "sha256": "b763ab326abf49271d16b32d22f01a8a8d31d1ab015141e42dcf5963ee914143", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "c63f17f323db8e7374e60a2b4640d444f0e3153384c5f9c65426d300c258a5bd", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Common physical readers/writers and selected stock valuation are delivered in isolated QA: receipt2UN/100, issue1UN/50, return0.5UN/25, net1.5UN/75. Same canonical physical/valuation book, with SELECT-only SGF observation and explicit rate/review/dependencies. Operational bindings/installation, real valuation method and hybrid integration with already posted direct/industrial materials remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_invoice", + "owner": "purchasing", + "state": "partial_synthetic", + "code": [ + { + "id": "invoice_workflow", + "file": "app/Services/InvoiceWorkflow.php", + "repository": "compras", + "sha256": "b98538fe9ec175340a90c40de2fd2b56e0d67a3b3ce5f41deafb4c6fe9f337c1", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_supplier_invoice_controller", + "file": "app/Modules/Purchasing/InvoiceController.php", + "repository": "sgf", + "sha256": "6812feb996507d204affd2a61945836cdc2db5fb8a21c585b899ec49bed142e6", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "0d729bd0485cc6a3222a445c00149a2b1511b90f5652c9985e63b38b767804aa" + } + ], + "current_hash_has_matching_recorded_evidence": false + }, + { + "id": "sgf_supplier_invoice_screen", + "file": "resources/views/supplier-invoice-workspace.blade.php", + "repository": "sgf", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-invoice-composition-20261103.json", + "sha256": "c1c284a45836731d07a00b8023d423853bf94fa6bd7ded1f13ee7de1ab57bb53" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "0c6b237c4dcb24276cbfde06b4e8ffe0e28dcb894cd485b040aa73d78e9db7b5" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-invoice-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 77 + } + ], + "sha256": "70faa647b0dac43f6d1b0111124b5451851dfd730148b10864e7f432914eecec", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "SGF now registers pending supplier invoices and performs distinct exact matching through the original pinned workflow after actual SGF order/receipt. Two partial documents40+60 consume the original100MZN commitment once; conflicting pending70 is preserved and refused. Demo8070 starts before main issuance/receipt/invoice. The earlier common-payable11600MZN scenario retains its own proof; these new invoices are not automatically recognised as a payable. Correction/credit notes, binary attachments, real fiscal policy and general deployment remain separate. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_payable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "payables", + "file": "packages/payables/src/Payables.php", + "repository": "sgf", + "sha256": "ed853f3eb48ebcf91f51a8fe9ed8e49b0e1bc30cce4852cc9394d51cff28c74d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "supplier_adapter", + "file": "app/Modules/Purchasing/SupplierPayables.php", + "repository": "sgf", + "sha256": "c17d44391cbd96941aa2dd2eac2cb167508faf6453c6a1e86333846df1ba18b9", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "sgf_obligation_controller", + "file": "app/Modules/Purchasing/ObligationController.php", + "repository": "sgf", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "347e629306d6c1f4873afac547d13fae8ade7b268906d1312a64e7eb6998e701" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "sgf_obligation_screen", + "file": "resources/views/supplier-obligation-workspace.blade.php", + "repository": "sgf", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/supplier-obligation-composition-20261103.json", + "sha256": "72153d1b3756447bd6a9cbd739c41e5abd1602c09974300e971624e0a1df6d3e" + }, + { + "proof": "docs/proofs/purchasing-integrated-composition-20261103.json", + "sha256": "b0bc8a8aec1fbd5a6d2acec1243631ca779762717c1e080dae5f13c0ad4453c7" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/payables-http.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "131b7be7881c147aed17e31d92e6d3fb07b47336e973e6150fe259452f139b03", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/supplier-obligation-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 72 + } + ], + "sha256": "d8e7efeddd52cdf89bf6a1637ff323d6e39a2acaecbf591c054ee108ce1c1011", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/purchasing-integrated-composition-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 68 + } + ], + "sha256": "10e8a7862a5a96cac6ec03dece68743605fd0ca98313c38070797fe40fcd2396", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Explicit SGF invoice preparation and distinct recognition now use the same original native supplier-payable adapter and canonical book in demo8071. One100MZN principal, bounded lists/evidence, current-source replay checks and atomic SGF provenance are proven in new QA fixtures. No automatic recognition, duplicate host debt, payment, accounting or imported-history cutover. Unknown maturity remains visible. Combining all earlier demos in one installation, correction/attachments, visual review, sustained load and general deployment remain pending. Superseding the earlier separate-fixture limitation for Purchasing: demo8072 now starts before the first main request and completes request, sourcing, award, order, receipt, invoice and explicit payable recognition in one native book, with shared permission-aware navigation. Supplier registry and geography are mounted in the same host. This does not unify all six ERP modules or validate deployment, payments or accounting of this origin.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "supplier_settlement", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "settlements", + "file": "packages/payables/src/SupplierSettlements.php", + "repository": "sgf", + "sha256": "1238c8abe950ca9c88746bb020a85392b7e42e8d7e3c8d86f0a5f79015f9ddfe", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "settlement_delivery", + "file": "docs/SUPPLIER_SETTLEMENT_DELIVERY.md", + "repository": "sgf", + "sha256": "46d9836e70b17a78acb2230f76122de38096384e55b4b2f5298aa9c73ab1fd20", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/supplier-settlements.json", + "checks": [ + { + "pointer": "/hosts/0/passed", + "equals": true + }, + { + "pointer": "/hosts/1/passed", + "equals": true + } + ], + "sha256": "b1bce9218f99ea2d8c780022ad385e169c7acc5778ac6950236eef0630f77ad0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA confirmation/allocation/reversal and scoped receipt lookup exist; no bank execution, real reconciliation or live historical SGF cutover is delivered.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_execution", + "owner": "workshop", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "4537b4c612e9a6e213f468984875df25f4774039a6b213de1c65dd6ec0ab9af0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Verified observations exist; no automatic physical stock movement.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "workshop_stock_consumption", + "owner": "stock", + "state": "partial_synthetic", + "code": [ + { + "id": "stock_workflow", + "file": "app/Services/StockWorkflow.php", + "repository": "compras", + "sha256": "18ddaa075432b84c0b0ee5241ff56ab9de9aa8e8db4e6132693bc7fd904b3a58", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_workflow", + "file": "app/Modules/Workshop/WorkshopWorkflow.php", + "repository": "sgf", + "sha256": "a09d7c14c7101c36a2539f346494584340493a56ca951c7b1e66418f43d80adb", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "workshop_stock_bridge", + "file": "app/Modules/Workshop/WorkshopStock.php", + "repository": "sgf", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "6460a4235fe7b0b4602b0aeb63a47f1a97e367e93baba6aa774be5fa0dac4e6e" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "workshop_stock_controller", + "file": "app/Modules/Workshop/Http/WorkshopStockController.php", + "repository": "sgf", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/workshop-stock-closure-20261102.json", + "sha256": "06c9f85f926b4268636887f50458cd19fc1a467ae636dea94caba586fb463c0e" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-stock-closure-20261102.json", + "selected_junit": true, + "sha256": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", + "verified_checks": 33, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA issue, existing delivery link, partial allocations, returns and proposal withdrawal/rejection are implemented with explicit review and no duplicate movement. Native warehouse return and SGF observation have separate proof. Operational item/warehouse mappings and installed composition remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "verified_cost", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "direct_costs", + "file": "app/Modules/Workshop/DirectCosts.php", + "repository": "sgf", + "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_costs", + "file": "app/Modules/Industry/IndustrialCosts.php", + "repository": "sgf", + "sha256": "55ad20b756d94d3d734886f8a6aae157a32916735f8af9fb6a3a5c69859beb45", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/direct-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "d91c7d6fe261a148a97df25865ecef0a7f933f3a82c0dafb6beb261b70add3d9", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/industrial-cost-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "b3f5489500b20658b83375e5844da0443d492aebfc23a1c248e1ef6451bc5df0", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Current costs are synthetic; physical movement linkage is future and absence of rate stays visible.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_draft", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "workshop_billing", + "file": "app/Modules/Workshop/WorkshopBilling.php", + "repository": "sgf", + "sha256": "039fdfdab77a8856b070249e028894a740222199969cabd614bfaab0c9e5a2d2", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/workshop-billing-tests.json", + "checks": [ + { + "pointer": "/final_targeted_after_guard/failures", + "equals": 0 + }, + { + "pointer": "/final_targeted_after_guard/errors", + "equals": 0 + } + ], + "sha256": "ea044a4dd46b3a307300ba95d9ab0d0fe0427fa77458d7a3331e2971fb4ef0f4", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Draft integration exists; cost is not sale price and draft does not decrement stock.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "sales_invoice", + "owner": "commercial", + "state": "partial_synthetic", + "code": [ + { + "id": "service_invoicing", + "file": "app/Modules/Services/ServiceInvoicing.php", + "repository": "sgf", + "sha256": "b5ac9898f2089fad7799b9e62e5ce5db6df7fd64643e8e7e3b52c6a0e2d142a8", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/invoice-test-results.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "fd04a58727ffddf1c62ac184d7834b81228dce2abb5b0c1e397505df6a45237c", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "Actual test issuance and QA accounting recognition are proved. Real fiscal issuance/compliance remains guarded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "customer_receivable", + "owner": "finance", + "state": "partial_synthetic", + "code": [ + { + "id": "service_receivables", + "file": "app/Modules/Services/ServiceReceivables.php", + "repository": "sgf", + "sha256": "725bc8773a78cfd05dd0a729d885a97c0eef43854ca7ab4210b4d5e80d5d54ec", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + } + ], + "evidence": [ + { + "file": "docs/proofs/receivables-tests.json", + "checks": [ + { + "pointer": "/failures", + "equals": 0 + }, + { + "pointer": "/errors", + "equals": 0 + } + ], + "sha256": "abffb135ef4e5881d2d6b04d9aaf0a495629f0bdcfecaf089e60d3abe556f23f", + "verified_checks": 2, + "recorded_proof_verified": true + } + ], + "remaining_gap": "QA opening, confirmed receipts/allocations400+600, reversal400 and accounting integration are proved. Real money, fiscal receipts and bank reconciliation are excluded.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + }, + { + "id": "general_ledger", + "owner": "accounting", + "state": "partial_synthetic", + "code": [ + { + "id": "catalogue_accounting", + "file": "app/Modules/Services/CatalogueAccounting.php", + "repository": "sgf", + "sha256": "15e72188334a0c6e9b65050e9609ac1c50a924899a753d47557e3375017e5d1c", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "accounting_menu", + "file": "docs/ACCOUNTING_MENU_DELIVERY.md", + "repository": "sgf", + "sha256": "d2c72d3e1ba5256720a00520ea18fe5e2b9664517d7c8639e64dfbad00aebb40", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "general_ledger_core", + "file": "packages/general-ledger/src/PayableJournal.php", + "repository": "sgf", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "6a2fbb1fecebbaeeb6511557a116bf17e1a5daa2bd8ed389e777ec9ecd822c66" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "7f776c1ef6641f79862c7ab898778591911c59dd3f2ae5e1130b041c8c4289f3" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "aa1d622759e647d21df66164a0582473f2c1daac95cd69f5c0f712a6fd6753d2" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_adapter", + "file": "app/Modules/Accounting/GeneralLedger.php", + "repository": "sgf", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "92980788fff94f1b66b18dbb4fcefdc9185a86626ac97df8116eea4c4eeced7e" + }, + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "a87d2ea373bc61bb139aa29f2a354b9813bbb2d6229a389f8d37fd8e9890edec" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "dd889c2dc80f96e789b8ebf48fc4b2794f2fc8239b863e1f9ee8b1aa29108f0b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "general_ledger_delivery", + "file": "docs/GENERAL_LEDGER_DELIVERY.md", + "repository": "sgf", + "sha256": "e8aea14f18da04a407ae2a225c5537f133394b830fb059a233ad4367d976007f", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_core", + "file": "packages/general-ledger/src/LedgerCycle.php", + "repository": "sgf", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "5040369c2fc24ef713e758e5d4d1241fc52b8bef421ea7bf45855000f755d524" + }, + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "5e6fdb1f5d47da16056043db75020e94172e9586a03a4b7e29c75e81b731fe14" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "ledger_native_adapter", + "file": "app/Services/GeneralLedger.php", + "repository": "compras", + "sha256": "fc80b20ad0ab2dac1c8df4b535349d05b416f1c5f2eec3e7718eda51f6626485", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "ledger_cycle_delivery", + "file": "docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md", + "repository": "sgf", + "sha256": "424a6d9de6f3a02c4ff691df7e045cbf1fd42838bf20c03cca61dcc79c390b2d", + "source_present_only": true, + "recorded_source_pins": [], + "current_hash_has_matching_recorded_evidence": null + }, + { + "id": "industrial_ledger_source", + "file": "app/Modules/Accounting/IndustrialLedgerSource.php", + "repository": "sgf", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "2479bfd33182fdd918b14748ca9e00e8c789a127bf1746651c8f8f7d53205024" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_workspace", + "file": "resources/views/accounting/industrial-ledger.blade.php", + "repository": "sgf", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "17568eb8e7391a0486ac8e45fda9716f817636d1832658b4969cdc6a123f058b" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "989ad6272fd14b681ca0000196dada276de0904f5ae69e4338f65e7e8cc5af45" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_ledger_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md", + "repository": "sgf", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "70c03e5093b349b81aef3132223dfcca440037ab2ab64ae48be28ec72f4c356f" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "industrial_correction_delivery", + "file": "docs/GENERAL_LEDGER_INDUSTRIAL_CORRECTION_DELIVERY.md", + "repository": "sgf", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "sha256": "a9040aa59528af4acf5ac211d24d43624ee67ec03715ff128bceb56a8cad671b" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "receipt_recovery_workspace", + "file": "resources/views/accounting/receipt-recovery.blade.php", + "repository": "sgf", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/financial-receipt-recovery-20261103.json", + "sha256": "0c00fd13ab346e5874cf8fe492b058c823fe6339eef2632ef5a128d0feca6221" + }, + { + "proof": "docs/proofs/ledger-receipt-recovery-20261103.json", + "sha256": "36f5ad2065f6a5621c2888b747f0d8a94f0d9c19533f59d5b87c88a8ffd30b83" + }, + { + "proof": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "sha256": "aee62d5b35f044cf10f759b098647b2fbe4d3fb34c68a065fd1f274c1d0aa7ee" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_schema", + "file": "packages/general-ledger/src/StockSchema.php", + "repository": "sgf", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2589414179da70769fff90d3f858e7bc73888cdb3a0f4cd33722a76b7b32bce4" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_composition", + "file": "packages/general-ledger/src/StockComposition.php", + "repository": "sgf", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2fafb664613b9c5aef30bfbec21d93701049a1114c5e2027ebecf1fdd885ae06" + } + ], + "current_hash_has_matching_recorded_evidence": true + }, + { + "id": "stock_valuation_adapter", + "file": "integrations/purchasing/StockValuationAdapter.php", + "repository": "sgf", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644", + "source_present_only": true, + "recorded_source_pins": [ + { + "proof": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "sha256": "2942e3567bf879301db85d4a7d0af15d9206e369e0aece264ffcc28d5c43c644" + } + ], + "current_hash_has_matching_recorded_evidence": true + } + ], + "evidence": [ + { + "file": "docs/proofs/common-ledger-industrial-correction-20261103.json", + "checks": [ + { + "pointer": "/tests/joint_final/passed", + "equals": true + }, + { + "pointer": "/tests/concurrency/passed", + "equals": true + } + ], + "sha256": "b8beee9278cd77e1a7dcfa7d47eae3e26952c51e656cec7bc34a835bb05cd478", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/financial-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 43 + } + ], + "sha256": "240ea4da6579ef2366fa50f7703520979c9fb3e308379d6209c010d74b76aa0a", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/common-ledger-stock-valuation-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/tests/workflow/result/stock_minor", + "equals": 7500 + }, + { + "pointer": "/tests/workflow/result/physical_quantity_milli", + "equals": 1500 + } + ], + "sha256": "a4eed51a66988ab103770a4be789952b2f377a8e7c41608bbf34662a80745124", + "verified_checks": 3, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-prefix-stream-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 48 + } + ], + "sha256": "81ecffdf877015d74b35ed7cd38804b63001fe031c613fdb0b20ff37cb9a3998", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/stock-period-batches-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + }, + { + "pointer": "/checks", + "equals": 33 + } + ], + "sha256": "07c437ca7604d4c8164f386caab5efec99e0985d410d0a3e201b1a22fb5d8ed5", + "verified_checks": 2, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/ledger-receipt-recovery-20261103.json", + "checks": [ + { + "pointer": "/checks", + "equals": 29 + } + ], + "sha256": "98ee6944953859f90a77f81697a66d1573928e9b1b6d78e1b58bb383776f955f", + "verified_checks": 1, + "recorded_proof_verified": true + }, + { + "file": "docs/proofs/receipt-selection-race-manifest-20261103.json", + "checks": [ + { + "pointer": "/passed", + "equals": true + } + ], + "sha256": "e7a024224187facc9c4fab8cc32e11c22c40d82ff0ba1b8e3de4b5a794bb6641", + "verified_checks": 1, + "recorded_proof_verified": true + } + ], + "remaining_gap": "One QA writer covers supplier, sales/receivables, direct/industrial costs and their approved corrections; joint11 journals/23 lines gross8725 remains its own proof. A separate authorised physical-stock book adds entry100/issue50/return25, three journals/six lines gross175, stock75 and period close. No duplicated material cost: hybrid direct/industrial-stock composition remains excluded. SGF observes the canonical stock book; stock confirmations run in its native QA composition. Real chart/tax/valuation/payroll policy, further corrections, reopening, operational cutover and deployment remain pending.", + "operational_validated": false, + "current_entire_stage_code_regression_repeated": false + } + ], + "stages_checked": 13, + "visual_review_pending": true, + "deployment_capacity_validated": false, + "limitations": [ + "Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.", + "No runtime modules, real data, rights, cache or databases altered by this audit." + ], + "database_connections": 0, + "financial_effects": 0 +} \ No newline at end of file diff --git a/integrations/purchasing/StockValuationAdapter.php b/integrations/purchasing/StockValuationAdapter.php new file mode 100644 index 0000000..eaa8ed0 --- /dev/null +++ b/integrations/purchasing/StockValuationAdapter.php @@ -0,0 +1,28 @@ +(int)$actor->tenant_id,'company_id'=>0,'unit_id'=>0]; + $person='qa-stock-person-'.$actor->id; + $read=function(string $action='view',bool $lock=false)use($actor,$scope,$person):void{ + abort_unless(app()->environment(['testing','payable-testing'])&&config('stock-ledger.synthetic_enabled')===true,403); + LedgerSchema::assertSynthetic(DB::connection()); + abort_unless(auth()->id()===$actor->id,403); + if($lock){app(ConflictGuard::class)->lockCompany($actor);app(CurrentActor::class)->lock($actor,[PurchasingRole::Finance,PurchasingRole::Admin]);} + $fresh=User::query()->findOrFail($actor->id); + abort_unless((int)$fresh->tenant_id===$scope['tenant_id']&&$fresh->hasFunctions([PurchasingRole::Finance,PurchasingRole::Admin])&&!app(OrganizationAccess::class)->maintenanceOnly($fresh),403); + abort_unless(DB::table('pa_access')->where($scope)->where(['user_id'=>$fresh->id,'person'=>$person,'action'=>'general_ledger.'.$action])->exists(),403); + }; + $read();return new StockComposition(DB::connection(),$scope,$actor->id,$person,fn($action)=>$read($action,true),fn()=>$read()); + } +} diff --git a/packages/finance-bundle/Bundle.php b/packages/finance-bundle/Bundle.php new file mode 100644 index 0000000..5562b02 --- /dev/null +++ b/packages/finance-bundle/Bundle.php @@ -0,0 +1,25 @@ +isLink())throw new \LogicException('FINANCE_BUNDLE_SYMLINK');if($file->isFile())$actualFiles[]=str_replace('\\','/',substr($file->getPathname(),strlen($root)+1));} + sort($actualFiles);sort($expectedFiles);if($actualFiles!==$expectedFiles)throw new \LogicException('FINANCE_BUNDLE_EXTRA_OR_MISSING_FILE'); + foreach(['Bundle.php','payables/bootstrap.php','general-ledger/bootstrap.php'] as $required)if(!isset($seen[$required]))throw new \LogicException('FINANCE_BUNDLE_INCOMPLETE'); + return ['payables'=>$root.'/payables','ledger'=>$root.'/general-ledger','files'=>count($seen),'manifest_sha256'=>$expected]; + } +} diff --git a/packages/general-ledger/README.md b/packages/general-ledger/README.md new file mode 100644 index 0000000..25dd60b --- /dev/null +++ b/packages/general-ledger/README.md @@ -0,0 +1,33 @@ +# General ledger — synthetic supplier and customer cycles + +Correcção industrial QA: `industry.cost.reversal/replacement`, capturadas/revistas/aplicadas apenas como grupo pelo writer existente. `IndustrialCorrectionSchema` exige livro SGF novo vazio e delega só o domínio industrial, preservando guardas fornecedor/directo. Sem activar capacidades em livros antigos ou no destino; ver a entrega industrial de correcção no SGF. + +Industrial QA SGF: tipo `industry.cost.validated` em duas linhas pelo mesmo escritor, fonte/guardas explicitamente configuradas no host e identidade por lote/perímetro. Residual separado. `IndustrialSchema` só em livro SGF novo vazio. Sem dependência industrial exigida no SGC ou alteração dos pacotes congelados; ver `docs/GENERAL_LEDGER_INDUSTRIAL_DELIVERY.md` no SGF. + +The separately authorised `COMMON-LEDGER-DIRECT-COST-CORRECTION-SIM-v1` composes one explicit original275 → reversal275/replacement295 cost group in NEW SGF QA books. `CostCorrectionSchema` delegates only cost results to its asymmetric, scoped, deferred pair check; supplier pair validation is retained. Public individual review/post routes refuse all correction parts. The host requires a separate default-off flag, current verified cost source, exact review and original period open; period completeness follows the applied replacement source revision. Original journals, costs and outbox remain immutable. No reopen or implicit chain. See `docs/GENERAL_LEDGER_DIRECT_COST_CORRECTION_DELIVERY.md`. + +The separately authorised `COMMON-LEDGER-DIRECT-COST-SIM-v1` adds an optional SGF actual validated workshop cost source: D QA-CUSTO-DIRECTO275 / C QA-COMPENSACAO-ENSAIO275. `CostSchema` installs an explicit append-only order/perimeter mapping only in a NEW empty SGF QA book. The host owns cost completeness, current source/rate/decision validation and exact minor-unit eligibility. Stable effect identity is the selected order/perimeter, not a successor calculation ID. Corrections of already-posted costs are refused/out of scope; no automatic stock/payroll/financial effect or outbox processing. Native SGC requires no workshop schema/provider and refuses the uncomposed source. Single Sales-provider period packets retain their prior hash contract. See `docs/GENERAL_LEDGER_DIRECT_COST_DELIVERY.md`. + +`LedgerReports` adds read-only trial balance and account ledger APIs over posted facts. Explicit inclusive dates, scoped account validation, 25/100 server pagination, SQL totals and running balances computed before pagination. The host supplies the same current read authorizer and a repeatable-read/read-only transaction. Three report queries serve each trial balance page; account ledger additionally validates the account and counts its entries. `ReportsWorkspace` renders the shared view without commands. No financial authority, schema installer or rights were added; unavailable capability/schema is refused by the host. See `docs/GENERAL_LEDGER_REPORTS_DELIVERY.md`. + +The separately authorised `COMMON-LEDGER-SALES-RECEIVABLE-SIM-v1` now composes actual test sales invoices and confirmed receivable allocations/reversals in SGF through optional host callbacks. `SalesSchema` installs only in a NEW empty owned SGF QA ledger: documentary recognition has three reviewed lines; allocation/reversal and supplier journals retain two. The deferred journal AND line-insert constraints enforce the exact reviewed line count, accounts and balance, including an attempted late third line on an existing two-line journal. Existing demonstrations are not upgraded. See `docs/GENERAL_LEDGER_SALES_RECEIVABLE_DELIVERY.md`. + +Sales capability defaults off. Standalone SGC needs neither Sales nor its schema; its adapter explicitly refuses those source kinds. Source identifiers are typed: the legacy supplier `obligation_id` filter must never mix a customer obligation with the same integer ID. Customer reads use `sales_invoice_id`. One scoped period completeness check includes both composed sources, without creating financial effects. + +Single canonical writer for `COMMON-LEDGER-PAYABLE-SIM-v1` and the separately authorised `COMMON-LEDGER-COMPLETE-CYCLE-SIM-v1`. SGF and standalone SGC adapters opt into NEW owned QA databases. No operational installer, bank execution, real chart/tax policy or production use is delivered. See `docs/GENERAL_LEDGER_COMPLETE_CYCLE_DELIVERY.md` in the canonical repository. + +`PayableJournal` consumes a current recognised payable effect through a host callback. It never creates/settles a payable. `prepare` captures source/rule/period/lines; `validate` records an independent approval/refusal; `post` revalidates the exact capture and writes one journal, two lines, history and a request receipt atomically. Source effect identity is independent of request key and source revision. Different versions cannot silently book the same principal again. + +The host authorizer must lock the company before source/configuration reads and recheck context, person and explicit action rights before idempotent recovery. All normal source/configuration writers must use that same serialization boundary. Account/rule editing is not exposed; reviewed period close appends a new closed version. The source provider must return scoped, compatible, current recognition identity/revision and integral principal. Do not pass report totals, an invoice status alone or a cached browser snapshot as source authority. + +`effect-prepare` accepts only confirmed financial allocation/reversal IDs. The original recognition must already be posted; reversing an allocation also requires its original accounting effect. `amount_minor` is the factual allocation amount, separate from the original principal. Normal review/post commands retain exact current-state checks and the same journal writer. + +`correct-prepare/validate/post` capture and apply a linked full reversal/replacement of an original recognition. The public individual routes refuse corrective parts. Both postings and their group result are atomic; deferred SQL checks refuse an orphan part. Original journals remain immutable. `period-prepare/validate/close` capture reconciled facts/configuration, require distinct review and recheck after serialization; pending effects or changed evidence refuse. No reopen command exists. + +`CycleSchema::install` refuses any existing ledger proposals/journals and is never called by host boot or migrations. Old demonstration schemas are not upgraded. Cycle permissions are separately granted only in new fixtures. Both host defaults remain off. + +Rules, periods, accounts, proposals, decisions, journals, lines, command receipts and events are append-only. Composite foreign keys prevent cross-scope account/line/review references. Immediate application validation plus deferred database constraints enforce the reviewed balanced journal (two lines in supplier composition; two or three in new Sales composition), exact source snapshot, preparer and accounts. Database ownership/role separation for real deployment remains unvalidated; the QA application role owns its new test database. + +`listing` returns 25-row journal/proposal/event windows and filtered account/period totals over all matching journal lines, not only the visible page. The SGF host wraps reads in repeatable-read/read-only transactions. Unknown period/account is refused, not displayed as a missing-source zero. + +The optional checkpoint closure is test instrumentation only, absent from HTTP/configuration. No dependencies were added. Current artificial rule: D `QA-CONTRAPARTIDA` / C `QA-FORNECEDOR`, MZN, explicit October 2026 period; it is not a client chart, expense/inventory determination or fiscal approval. diff --git a/packages/general-ledger/bootstrap.php b/packages/general-ledger/bootstrap.php new file mode 100644 index 0000000..fe89f38 --- /dev/null +++ b/packages/general-ledger/bootstrap.php @@ -0,0 +1,18 @@ +getDatabaseName(),'payable_sgf_')||!$db->getSchemaBuilder()->hasTable('gl_cost_sources')||$db->getSchemaBuilder()->hasTable('gl_cost_correction_capability')||$db->table('gl_proposals')->exists()||$db->table('gl_journals')->exists())throw new \LogicException('New empty SGF cost correction book required'); + $db->transaction(function()use($db){ + $db->statement('CREATE TABLE gl_cost_correction_capability(id int PRIMARY KEY CHECK(id=1),contract text NOT NULL)');$db->table('gl_cost_correction_capability')->insert(['id'=>1,'contract'=>'COMMON-LEDGER-DIRECT-COST-CORRECTION-SIM-v1']);$db->unprepared('CREATE TRIGGER gl_immutable BEFORE UPDATE OR DELETE ON gl_cost_correction_capability FOR EACH ROW EXECUTE FUNCTION gl_append_only()'); + $db->unprepared(<<<'SQL' +CREATE FUNCTION gl_cost_pair_assert(cid bigint) RETURNS void LANGUAGE plpgsql AS $$ BEGIN + IF NOT EXISTS(SELECT 1 FROM gl_correction_results r JOIN gl_corrections c ON c.id=r.correction_id JOIN gl_journals o ON o.id=r.original_journal_id JOIN gl_journals a ON a.id=r.reverse_journal_id JOIN gl_journals b ON b.id=r.replacement_journal_id + WHERE c.id=cid AND c.original_journal_id=r.original_journal_id AND c.prepared_by=r.actor_id AND a.proposal_id=c.reverse_proposal_id AND b.proposal_id=c.replacement_proposal_id + AND (c.tenant_id,c.company_id,c.unit_id)=(r.tenant_id,r.company_id,r.unit_id) AND (o.tenant_id,o.company_id,o.unit_id)=(r.tenant_id,r.company_id,r.unit_id) AND (a.tenant_id,a.company_id,a.unit_id)=(r.tenant_id,r.company_id,r.unit_id) AND (b.tenant_id,b.company_id,b.unit_id)=(r.tenant_id,r.company_id,r.unit_id) + AND o.snapshot->'source'->>'effect_type'='workshop.direct_cost.validated' AND a.snapshot->'source'->>'effect_type'='workshop.direct_cost.reversal' AND b.snapshot->'source'->>'effect_type'='workshop.direct_cost.replacement' + AND (a.snapshot->'source'->>'source_id')::bigint=o.id AND (b.snapshot->'source'->>'source_id')::bigint=o.id AND (a.snapshot->'source'->>'original_journal_id')::bigint=o.id AND (b.snapshot->'source'->>'original_journal_id')::bigint=o.id + AND a.snapshot->'source'->>'cost_order_id'=o.snapshot->'source'->>'cost_order_id' AND b.snapshot->'source'->>'cost_order_id'=o.snapshot->'source'->>'cost_order_id' AND a.snapshot->'source'->>'origin_key'=o.snapshot->'source'->>'origin_key' AND b.snapshot->'source'->>'origin_key'=o.snapshot->'source'->>'origin_key' + AND a.snapshot->'source'->>'replacement_source_revision'=b.snapshot->'source'->>'replacement_source_revision' AND a.debit_minor=o.debit_minor AND b.debit_minor=(b.snapshot->'source'->>'principal_minor')::bigint + AND a.snapshot->'period'->>'period_key'=o.snapshot->'period'->>'period_key' AND b.snapshot->'period'->>'period_key'=o.snapshot->'period'->>'period_key' AND a.journal_on>=o.journal_on AND b.journal_on=a.journal_on + AND NOT EXISTS(SELECT 1 FROM gl_lines l WHERE l.journal_id=o.id AND NOT EXISTS(SELECT 1 FROM gl_lines rev WHERE rev.journal_id=a.id AND rev.account_id=l.account_id AND rev.debit_minor=l.credit_minor AND rev.credit_minor=l.debit_minor)) + AND b.snapshot->'lines'->0->>'account_id'=o.snapshot->'lines'->0->>'account_id' AND b.snapshot->'lines'->1->>'account_id'=o.snapshot->'lines'->1->>'account_id') THEN RAISE EXCEPTION 'GL_COST_CORRECTION_PAIR_REQUIRED' USING ERRCODE='23514'; END IF; +END $$; +CREATE FUNCTION gl_cost_pair_trigger() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE cid bigint; BEGIN + IF NEW.snapshot->'source'->>'effect_type' IN('workshop.direct_cost.reversal','workshop.direct_cost.replacement') THEN + SELECT correction_id INTO cid FROM gl_correction_results WHERE reverse_journal_id=NEW.id OR replacement_journal_id=NEW.id; + IF cid IS NULL THEN RAISE EXCEPTION 'GL_COST_CORRECTION_PAIR_REQUIRED' USING ERRCODE='23514'; END IF; PERFORM gl_cost_pair_assert(cid); END IF; RETURN NEW; END $$; +CREATE CONSTRAINT TRIGGER gl_cost_pair AFTER INSERT ON gl_journals DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE FUNCTION gl_cost_pair_trigger(); +SQL); + $definition=$db->selectOne("SELECT pg_get_functiondef('gl_cycle_pair_integrity()'::regprocedure) d")->d; + $needle=" IF TG_TABLE_NAME='gl_journals' THEN"; + if(!str_contains($definition,$needle))throw new \LogicException('Unexpected legacy pair contract'); + $delegation=" IF TG_TABLE_NAME='gl_correction_results' THEN IF EXISTS(SELECT 1 FROM gl_journals WHERE id=NEW.reverse_journal_id AND snapshot->'source'->>'effect_type'='workshop.direct_cost.reversal') THEN PERFORM gl_cost_pair_assert(NEW.correction_id); RETURN NEW; END IF; END IF;\n"; + $db->unprepared(str_replace($needle,$delegation.$needle,$definition)); + }); + } +} diff --git a/packages/general-ledger/src/CostSchema.php b/packages/general-ledger/src/CostSchema.php new file mode 100644 index 0000000..de3c855 --- /dev/null +++ b/packages/general-ledger/src/CostSchema.php @@ -0,0 +1,19 @@ +getDatabaseName(),'payable_sgf_')||$db->getSchemaBuilder()->hasTable('gl_cost_sources')||$db->table('gl_proposals')->exists()||$db->table('gl_journals')->exists())throw new \LogicException('New empty SGF cost ledger required'); + $db->transaction(function()use($db){ + $db->statement('CREATE TABLE gl_cost_sources(id bigserial PRIMARY KEY,tenant_id bigint NOT NULL,company_id bigint NOT NULL,unit_id bigint NOT NULL,order_id bigint NOT NULL REFERENCES wo_orders(id),material_origin text NOT NULL,time_origin text NOT NULL,period_key varchar(80) NOT NULL,created_by bigint NOT NULL,reason text NOT NULL CHECK(length(reason)>=3),created_at timestamp NOT NULL,UNIQUE(tenant_id,company_id,unit_id,order_id))'); + $db->unprepared(<<<'SQL' +CREATE FUNCTION gl_cost_source_scope() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN IF NOT EXISTS(SELECT 1 FROM wo_orders WHERE id=NEW.order_id AND tenant_id=NEW.tenant_id AND company_id=NEW.company_id AND unit_id=NEW.unit_id) THEN RAISE EXCEPTION 'GL_COST_SCOPE'; END IF; RETURN NEW; END $$; +CREATE TRIGGER gl_cost_source_scope BEFORE INSERT ON gl_cost_sources FOR EACH ROW EXECUTE FUNCTION gl_cost_source_scope(); +CREATE TRIGGER gl_immutable BEFORE UPDATE OR DELETE ON gl_cost_sources FOR EACH ROW EXECUTE FUNCTION gl_append_only(); +SQL); + }); + } +} diff --git a/packages/general-ledger/src/CycleSchema.php b/packages/general-ledger/src/CycleSchema.php new file mode 100644 index 0000000..2e621c0 --- /dev/null +++ b/packages/general-ledger/src/CycleSchema.php @@ -0,0 +1,59 @@ +getSchemaBuilder()->hasTable($t))throw new \LogicException('Cycle schema exists; no reset'); + if($db->table('gl_journals')->exists()||$db->table('gl_proposals')->exists())throw new \LogicException('Fresh empty ledger required for cycle setup'); + $s='tenant_id bigint NOT NULL,company_id bigint NOT NULL,unit_id bigint NOT NULL'; + $db->transaction(function()use($db,$s){ + $db->unprepared("CREATE TABLE gl_corrections(id bigserial PRIMARY KEY,$s,original_journal_id bigint NOT NULL,reverse_proposal_id bigint NOT NULL,replacement_proposal_id bigint NOT NULL,revision char(64) NOT NULL,prepared_by bigint NOT NULL,prepared_person varchar(160) NOT NULL,reason text NOT NULL,created_at timestamp NOT NULL,UNIQUE(id,tenant_id,company_id,unit_id),UNIQUE(reverse_proposal_id,replacement_proposal_id),FOREIGN KEY(original_journal_id,tenant_id,company_id,unit_id) REFERENCES gl_journals(id,tenant_id,company_id,unit_id),FOREIGN KEY(reverse_proposal_id,tenant_id,company_id,unit_id) REFERENCES gl_proposals(id,tenant_id,company_id,unit_id),FOREIGN KEY(replacement_proposal_id,tenant_id,company_id,unit_id) REFERENCES gl_proposals(id,tenant_id,company_id,unit_id))"); + $db->unprepared("CREATE TABLE gl_correction_results(id bigserial PRIMARY KEY,$s,correction_id bigint NOT NULL,original_journal_id bigint NOT NULL,reverse_journal_id bigint NOT NULL,replacement_journal_id bigint NOT NULL,actor_id bigint NOT NULL,reason text NOT NULL,created_at timestamp NOT NULL,UNIQUE(tenant_id,company_id,unit_id,original_journal_id),UNIQUE(correction_id),FOREIGN KEY(correction_id,tenant_id,company_id,unit_id) REFERENCES gl_corrections(id,tenant_id,company_id,unit_id),FOREIGN KEY(reverse_journal_id,tenant_id,company_id,unit_id) REFERENCES gl_journals(id,tenant_id,company_id,unit_id),FOREIGN KEY(replacement_journal_id,tenant_id,company_id,unit_id) REFERENCES gl_journals(id,tenant_id,company_id,unit_id))"); + $db->unprepared("CREATE TABLE gl_period_checks(id bigserial PRIMARY KEY,$s,period_key varchar(80) NOT NULL,revision char(64) NOT NULL,snapshot jsonb NOT NULL,prepared_by bigint NOT NULL,prepared_person varchar(160) NOT NULL,reason text NOT NULL,created_at timestamp NOT NULL,UNIQUE(id,tenant_id,company_id,unit_id))"); + $db->unprepared("CREATE TABLE gl_period_reviews(id bigserial PRIMARY KEY,$s,check_id bigint NOT NULL,revision char(64) NOT NULL,decision varchar(10) NOT NULL CHECK(decision IN('approved','rejected')),actor_id bigint NOT NULL,person varchar(160) NOT NULL,reason text NOT NULL,created_at timestamp NOT NULL,UNIQUE(check_id),UNIQUE(id,tenant_id,company_id,unit_id),FOREIGN KEY(check_id,tenant_id,company_id,unit_id) REFERENCES gl_period_checks(id,tenant_id,company_id,unit_id))"); + $db->unprepared("CREATE TABLE gl_period_closures(id bigserial PRIMARY KEY,$s,check_id bigint NOT NULL,review_id bigint NOT NULL,period_key varchar(80) NOT NULL,period_version int NOT NULL,actor_id bigint NOT NULL,reason text NOT NULL,created_at timestamp NOT NULL,UNIQUE(tenant_id,company_id,unit_id,period_key),FOREIGN KEY(check_id,tenant_id,company_id,unit_id) REFERENCES gl_period_checks(id,tenant_id,company_id,unit_id),FOREIGN KEY(review_id,tenant_id,company_id,unit_id) REFERENCES gl_period_reviews(id,tenant_id,company_id,unit_id))"); + // The original definition remains structurally identical; only the explicit effect amount differs. + $definition=$db->selectOne("SELECT pg_get_functiondef('gl_assert_balanced(bigint)'::regprocedure) AS d")->d; + $definition=str_replace("(p.snapshot->'source'->>'principal_minor')::bigint","coalesce((p.snapshot->'source'->>'amount_minor')::bigint,(p.snapshot->'source'->>'principal_minor')::bigint)",$definition); + $db->unprepared($definition); + foreach(self::TABLES as $t)$db->unprepared("CREATE TRIGGER gl_immutable BEFORE UPDATE OR DELETE ON $t FOR EACH ROW EXECUTE FUNCTION gl_append_only()"); + $db->unprepared(<<<'SQL' +CREATE FUNCTION gl_cycle_pair_integrity() RETURNS trigger LANGUAGE plpgsql AS $$ +DECLARE r gl_correction_results%ROWTYPE; c gl_corrections%ROWTYPE; j gl_journals%ROWTYPE; +BEGIN + IF TG_TABLE_NAME='gl_journals' THEN + j:=NEW; + IF j.snapshot->'source'->>'effect_type' NOT IN ('journal.reversal','journal.replacement') THEN RETURN NEW; END IF; + SELECT * INTO r FROM gl_correction_results WHERE reverse_journal_id=j.id OR replacement_journal_id=j.id; + ELSE r:=NEW; END IF; + SELECT * INTO c FROM gl_corrections WHERE id=r.correction_id AND (tenant_id,company_id,unit_id)=(r.tenant_id,r.company_id,r.unit_id); + IF c.id IS NULL OR c.original_journal_id<>r.original_journal_id OR c.prepared_by<>r.actor_id + OR NOT EXISTS(SELECT 1 FROM gl_journals a JOIN gl_journals b ON b.id=r.replacement_journal_id + WHERE a.id=r.reverse_journal_id AND a.proposal_id=c.reverse_proposal_id AND b.proposal_id=c.replacement_proposal_id + AND (a.tenant_id,a.company_id,a.unit_id)=(r.tenant_id,r.company_id,r.unit_id) AND (b.tenant_id,b.company_id,b.unit_id)=(r.tenant_id,r.company_id,r.unit_id) + AND a.snapshot->'source'->>'effect_type'='journal.reversal' AND b.snapshot->'source'->>'effect_type'='journal.replacement' + AND (a.snapshot->'source'->>'source_id')::bigint=r.original_journal_id AND (b.snapshot->'source'->>'source_id')::bigint=r.original_journal_id + AND a.debit_minor=b.debit_minor) THEN RAISE EXCEPTION 'GL_CORRECTION_PAIR_REQUIRED' USING ERRCODE='23514'; END IF; + RETURN NEW; +END $$; +CREATE CONSTRAINT TRIGGER gl_cycle_pair AFTER INSERT ON gl_journals DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE FUNCTION gl_cycle_pair_integrity(); +CREATE CONSTRAINT TRIGGER gl_cycle_result AFTER INSERT ON gl_correction_results DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE FUNCTION gl_cycle_pair_integrity(); +CREATE FUNCTION gl_close_integrity() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN + IF NOT EXISTS(SELECT 1 FROM gl_period_checks c JOIN gl_period_reviews r ON r.check_id=c.id + JOIN gl_periods p ON p.period_key=NEW.period_key AND p.version=NEW.period_version AND (p.tenant_id,p.company_id,p.unit_id)=(NEW.tenant_id,NEW.company_id,NEW.unit_id) + WHERE c.id=NEW.check_id AND r.id=NEW.review_id AND r.decision='approved' AND r.revision=c.revision + AND c.prepared_by=NEW.actor_id AND r.actor_id<>c.prepared_by AND r.person<>c.prepared_person AND p.status='closed' + AND (c.tenant_id,c.company_id,c.unit_id)=(NEW.tenant_id,NEW.company_id,NEW.unit_id) AND (r.tenant_id,r.company_id,r.unit_id)=(NEW.tenant_id,NEW.company_id,NEW.unit_id) + AND c.period_key=NEW.period_key AND (c.snapshot->'period'->>'version')::int+1=NEW.period_version) + THEN RAISE EXCEPTION 'GL_CLOSE_REVIEW_REQUIRED' USING ERRCODE='23514'; END IF; RETURN NEW; END $$; +CREATE TRIGGER gl_close_integrity BEFORE INSERT ON gl_period_closures FOR EACH ROW EXECUTE FUNCTION gl_close_integrity(); +SQL); + }); + } +} diff --git a/packages/general-ledger/src/CycleWorkspace.php b/packages/general-ledger/src/CycleWorkspace.php new file mode 100644 index 0000000..d2fc975 --- /dev/null +++ b/packages/general-ledger/src/CycleWorkspace.php @@ -0,0 +1,9 @@ +getDatabaseName(),'payable_sgf_')||!$db->getSchemaBuilder()->hasTable('gl_industrial_sources')||$db->getSchemaBuilder()->hasTable('gl_industrial_correction_capability')||$db->table('gl_proposals')->exists()||$db->table('gl_journals')->exists())throw new \LogicException('New empty SGF cost correction book required'); + $db->transaction(function()use($db){ + $db->statement('CREATE TABLE gl_industrial_correction_capability(id int PRIMARY KEY CHECK(id=1),contract text NOT NULL)');$db->table('gl_industrial_correction_capability')->insert(['id'=>1,'contract'=>'COMMON-LEDGER-INDUSTRIAL-CORRECTION-SIM-v1']);$db->unprepared('CREATE TRIGGER gl_immutable BEFORE UPDATE OR DELETE ON gl_industrial_correction_capability FOR EACH ROW EXECUTE FUNCTION gl_append_only()'); + $db->unprepared(<<<'SQL' +CREATE FUNCTION gl_industrial_pair_assert(cid bigint) RETURNS void LANGUAGE plpgsql AS $$ BEGIN + IF NOT EXISTS(SELECT 1 FROM gl_correction_results r JOIN gl_corrections c ON c.id=r.correction_id JOIN gl_journals o ON o.id=r.original_journal_id JOIN gl_journals a ON a.id=r.reverse_journal_id JOIN gl_journals b ON b.id=r.replacement_journal_id + WHERE c.id=cid AND c.original_journal_id=r.original_journal_id AND c.prepared_by=r.actor_id AND a.proposal_id=c.reverse_proposal_id AND b.proposal_id=c.replacement_proposal_id + AND (c.tenant_id,c.company_id,c.unit_id)=(r.tenant_id,r.company_id,r.unit_id) AND (o.tenant_id,o.company_id,o.unit_id)=(r.tenant_id,r.company_id,r.unit_id) AND (a.tenant_id,a.company_id,a.unit_id)=(r.tenant_id,r.company_id,r.unit_id) AND (b.tenant_id,b.company_id,b.unit_id)=(r.tenant_id,r.company_id,r.unit_id) + AND o.snapshot->'source'->>'effect_type'='industry.cost.validated' AND a.snapshot->'source'->>'effect_type'='industry.cost.reversal' AND b.snapshot->'source'->>'effect_type'='industry.cost.replacement' + AND (a.snapshot->'source'->>'source_id')::bigint=o.id AND (b.snapshot->'source'->>'source_id')::bigint=o.id AND (a.snapshot->'source'->>'original_journal_id')::bigint=o.id AND (b.snapshot->'source'->>'original_journal_id')::bigint=o.id + AND a.snapshot->'source'->>'industrial_lot_id'=o.snapshot->'source'->>'industrial_lot_id' AND b.snapshot->'source'->>'industrial_lot_id'=o.snapshot->'source'->>'industrial_lot_id' AND a.snapshot->'source'->>'origin_key'=o.snapshot->'source'->>'origin_key' AND b.snapshot->'source'->>'origin_key'=o.snapshot->'source'->>'origin_key' + AND a.snapshot->'source'->>'replacement_source_revision'=b.snapshot->'source'->>'replacement_source_revision' AND a.debit_minor=o.debit_minor AND b.debit_minor=(b.snapshot->'source'->>'principal_minor')::bigint + AND a.snapshot->'period'->>'period_key'=o.snapshot->'period'->>'period_key' AND b.snapshot->'period'->>'period_key'=o.snapshot->'period'->>'period_key' AND a.journal_on>=o.journal_on AND b.journal_on=a.journal_on + AND NOT EXISTS(SELECT 1 FROM gl_lines l WHERE l.journal_id=o.id AND NOT EXISTS(SELECT 1 FROM gl_lines rev WHERE rev.journal_id=a.id AND rev.account_id=l.account_id AND rev.debit_minor=l.credit_minor AND rev.credit_minor=l.debit_minor)) + AND b.snapshot->'lines'->0->>'account_id'=o.snapshot->'lines'->0->>'account_id' AND b.snapshot->'lines'->1->>'account_id'=o.snapshot->'lines'->1->>'account_id') THEN RAISE EXCEPTION 'GL_INDUSTRIAL_CORRECTION_PAIR_REQUIRED' USING ERRCODE='23514'; END IF; +END $$; +CREATE FUNCTION gl_industrial_pair_trigger() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE cid bigint; BEGIN + IF NEW.snapshot->'source'->>'effect_type' IN('industry.cost.reversal','industry.cost.replacement') THEN + SELECT correction_id INTO cid FROM gl_correction_results WHERE reverse_journal_id=NEW.id OR replacement_journal_id=NEW.id; + IF cid IS NULL THEN RAISE EXCEPTION 'GL_INDUSTRIAL_CORRECTION_PAIR_REQUIRED' USING ERRCODE='23514'; END IF; PERFORM gl_industrial_pair_assert(cid); END IF; RETURN NEW; END $$; +CREATE CONSTRAINT TRIGGER gl_industrial_pair AFTER INSERT ON gl_journals DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE FUNCTION gl_industrial_pair_trigger(); +SQL); + $definition=$db->selectOne("SELECT pg_get_functiondef('gl_cycle_pair_integrity()'::regprocedure) d")->d; + $needle=" IF TG_TABLE_NAME='gl_journals' THEN"; + if(!str_contains($definition,$needle))throw new \LogicException('Unexpected legacy pair contract'); + $delegation=" IF TG_TABLE_NAME='gl_correction_results' THEN IF EXISTS(SELECT 1 FROM gl_journals WHERE id=NEW.reverse_journal_id AND snapshot->'source'->>'effect_type'='industry.cost.reversal') THEN PERFORM gl_industrial_pair_assert(NEW.correction_id); RETURN NEW; END IF; END IF;\n"; + $db->unprepared(str_replace($needle,$delegation.$needle,$definition)); + }); + } +} diff --git a/packages/general-ledger/src/IndustrialSchema.php b/packages/general-ledger/src/IndustrialSchema.php new file mode 100644 index 0000000..0837b9a --- /dev/null +++ b/packages/general-ledger/src/IndustrialSchema.php @@ -0,0 +1,14 @@ +getDatabaseName(),'payable_sgf_')||$db->getSchemaBuilder()->hasTable('gl_industrial_sources')||!$db->getSchemaBuilder()->hasTable('ic_lots')||$db->table('gl_proposals')->exists()||$db->table('gl_journals')->exists())throw new \LogicException('New empty owned industrial composition required'); + $db->transaction(function()use($db){$db->statement('CREATE TABLE gl_industrial_sources(id bigserial PRIMARY KEY,tenant_id bigint NOT NULL,company_id bigint NOT NULL,unit_id bigint NOT NULL,lot_id bigint NOT NULL REFERENCES ic_lots(id),origins jsonb NOT NULL,period_key varchar(80) NOT NULL,created_by bigint NOT NULL,reason text NOT NULL CHECK(length(reason)>=3),created_at timestamp NOT NULL,UNIQUE(tenant_id,company_id,unit_id,lot_id))');$db->unprepared(<<<'SQL' +CREATE FUNCTION gl_industrial_scope() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN IF NOT EXISTS(SELECT 1 FROM ic_lots WHERE id=NEW.lot_id AND tenant_id=NEW.tenant_id AND company_id=NEW.company_id AND unit_id=NEW.unit_id) OR jsonb_typeof(NEW.origins)<>'object' THEN RAISE EXCEPTION 'GL_INDUSTRIAL_SCOPE'; END IF; RETURN NEW; END $$; +CREATE TRIGGER gl_industrial_scope BEFORE INSERT ON gl_industrial_sources FOR EACH ROW EXECUTE FUNCTION gl_industrial_scope(); +CREATE TRIGGER gl_immutable BEFORE UPDATE OR DELETE ON gl_industrial_sources FOR EACH ROW EXECUTE FUNCTION gl_append_only(); +SQL);}); + } +} diff --git a/packages/general-ledger/src/LedgerCycle.php b/packages/general-ledger/src/LedgerCycle.php new file mode 100644 index 0000000..e103984 --- /dev/null +++ b/packages/general-ledger/src/LedgerCycle.php @@ -0,0 +1,164 @@ +db->getSchemaBuilder()->hasTable('gl_corrections'))throw new \DomainException('Ciclo contabilístico não instalado neste ensaio.'); + } + private function cycleSource(string $kind,int $id):array + { + $this->cycleReady(); + if(in_array($kind,['allocation.confirmed','allocation.reversed'],true)){ + $table=$kind==='allocation.confirmed'?'ps_allocations':'ps_reversals'; + $row=$this->db->table($table)->where($this->scope)->where('id',$id)->first()??throw new \DomainException('Efeito financeiro confirmado indisponível.'); + $base=($this->source)((int)$row->obligation_id); + if($kind==='allocation.confirmed'){ + $decision=$this->db->table('ps_allocation_decisions')->where($this->scope)->where('id',$row->decision_id)->where('decision','confirmed')->first(); + $payment=$this->db->table('ps_payment_decisions')->where($this->scope)->where('payment_id',$row->payment_id)->where('decision','confirmed')->first(); + if(!$decision||!$payment)throw new \DomainException('Afectação sem confirmação financeira compatível.'); + }else{ + if(!$this->q('journals')->where('snapshot->source->effect_type','allocation.confirmed')->where('snapshot->source->source_id',(int)$row->allocation_id)->exists())throw new \DomainException('Contabilize primeiro a afectação original.'); + } + if(!$this->q('journals')->where('obligation_id',$base['obligation_id'])->where('snapshot->source->effect_type','supplier_payable.recognised')->exists())throw new \DomainException('Reconhecimento contabilístico original em falta.'); + return array_replace($base,['effect_type'=>$kind,'source_id'=>$id,'amount_minor'=>(int)$row->amount_minor,'recognition_revision'=>$this->hash(['recognition'=>$base['recognition_revision'],'financial_fact'=>(array)$row]),'financial_fact'=>(array)$row]); + } + if(!in_array($kind,['journal.reversal','journal.replacement'],true))throw new \DomainException('Efeito fora do ciclo autorizado.'); + $j=$this->q('journals')->where('id',$id)->first()??throw new \DomainException('Lançamento original indisponível.'); + $snapshot=json_decode($j->snapshot,true,128,JSON_THROW_ON_ERROR); + if($snapshot['source']['effect_type']!=='supplier_payable.recognised')throw new \DomainException('Só o reconhecimento original admite esta correcção técnica.'); + $base=($this->source)((int)$j->obligation_id); + return array_replace($base,['effect_type'=>$kind,'source_id'=>$id,'amount_minor'=>(int)$j->debit_minor,'recognition_revision'=>$this->hash(['recognition'=>$base['recognition_revision'],'original'=>(array)$j]),'original_journal_id'=>$id,'original_journal_sha256'=>$this->hash((array)$j)]); + } + private function cycleCommand(string $action,array $d,string $key):array + { + $this->cycleReady(); + if(!preg_match('/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/Di',$key))throw new \InvalidArgumentException('Chave de repetição inválida.'); + $keys=match($action){ + 'effect-prepare'=>['effect_type','source_id','journal_on','period_key','rule_key','reason'], + 'correct-prepare'=>['journal_id','journal_on','period_key','reason'], + 'correct-validate'=>['correction_id','revision','decision','reason'], + 'correct-post'=>['correction_id','revision','reason'], + 'period-prepare'=>['period_key','reason'], + 'period-validate'=>['check_id','revision','decision','reason'], + 'period-close'=>['check_id','revision','reason']}; + $this->exact($d,$keys);$reason=$this->reason($d['reason']); + return $this->db->transaction(function()use($action,$d,$key,$reason){ + ($this->authorize)($action==='effect-prepare'?'prepare':str_replace('-','_',$action)); + $hash=$this->hash([$action,$d]);$old=$this->q('commands')->where(['actor_id'=>$this->actor,'command_key'=>$key])->first(); + if($old){if(!hash_equals($old->request_hash,$hash))throw new \DomainException('Chave repetida com conteúdo diferente.');return json_decode($old->result,true,128,JSON_THROW_ON_ERROR)+['replayed'=>true];} + if($action==='effect-prepare'){ + if(!in_array($d['effect_type'],['allocation.confirmed','allocation.reversed','sales.invoice','receivable.allocated','receivable.reversed','workshop.direct_cost.validated','industry.cost.validated','stock.receipt','stock.issue','stock.return'],true))throw new \InvalidArgumentException('Seleccione uma origem contabilística suportada.'); + $result=$this->prepare(['obligation_id'=>$d['source_id']]+$d,$reason,$d['effect_type']); + }elseif(str_starts_with($action,'correct-'))$result=$this->correction($action,$d,$reason); + else $result=$this->periodCommand($action,$d,$reason); + $this->db->table('gl_commands')->insert($this->scope+['actor_id'=>$this->actor,'command_key'=>$key,'request_hash'=>$hash,'result'=>Payables::canonical($result),'created_at'=>date('Y-m-d H:i:s')]);$this->step('after_receipt'); + return $result+['replayed'=>false]; + }); + } + private function correction(string $action,array $d,string $reason):array + { + if($action==='correct-prepare'){ + $id=$this->id($d['journal_id']); + if($this->q('correction_results')->where('original_journal_id',$id)->exists())throw new \DomainException('Correcção já aplicada; consulte o par existente.'); + $original=$this->q('journals')->where('id',$id)->first()??throw new \DomainException('Original fora do âmbito.');$isCost=json_decode($original->snapshot,true)['source']['effect_type']==='workshop.direct_cost.validated';$isIndustrial=json_decode($original->snapshot,true)['source']['effect_type']==='industry.cost.validated'; + $parts=[]; + foreach($isIndustrial?['industry.cost.reversal'=>'QA-INDUSTRIAL-CORRECTION-REVERSE','industry.cost.replacement'=>'QA-INDUSTRIAL-CORRECTION-REPLACE']:($isCost?['workshop.direct_cost.reversal'=>'QA-COST-CORRECTION-REVERSE','workshop.direct_cost.replacement'=>'QA-COST-CORRECTION-REPLACE']:['journal.reversal'=>'QA-CORRECTION-REVERSE','journal.replacement'=>'QA-CORRECTION-REPLACE']) as $kind=>$rule){ + $parts[]=$this->prepare(['obligation_id'=>$id,'journal_on'=>$d['journal_on'],'period_key'=>$d['period_key'],'rule_key'=>$rule],$reason,$kind); + } + $revision=$this->hash($parts); + $old=$this->q('corrections')->where(['reverse_proposal_id'=>$parts[0]['proposal_id'],'replacement_proposal_id'=>$parts[1]['proposal_id']])->first(); + $group=$old?->id??$this->db->table('gl_corrections')->insertGetId($this->scope+['original_journal_id'=>$id,'reverse_proposal_id'=>$parts[0]['proposal_id'],'replacement_proposal_id'=>$parts[1]['proposal_id'],'revision'=>$revision,'prepared_by'=>$this->actor,'prepared_person'=>$this->person,'reason'=>$reason,'created_at'=>date('Y-m-d H:i:s')]); + return ['state'=>'prepared','correction_id'=>$group,'revision'=>$old?->revision??$revision]; + } + $group=$this->q('corrections')->where('id',$this->id($d['correction_id']))->first()??throw new \DomainException('Correcção fora do âmbito.'); + if(!is_string($d['revision'])||!hash_equals($group->revision,$d['revision']))throw new \DomainException('Correcção desactualizada.'); + $parts=[$this->proposal((int)$group->reverse_proposal_id),$this->proposal((int)$group->replacement_proposal_id)]; + if($action==='correct-validate'){ + foreach($parts as $p)$this->review(['proposal_id'=>$p->id,'revision'=>$p->revision,'decision'=>$d['decision']],$reason); + return ['state'=>$d['decision'],'correction_id'=>$group->id,'revision'=>$group->revision]; + } + if((int)$group->prepared_by!==$this->actor||$group->prepared_person!==$this->person)throw new \DomainException('Só o preparador autorizado aplica o par.'); + $old=$this->q('correction_results')->where('original_journal_id',$group->original_journal_id)->first(); + if($old){if((int)$old->correction_id!==$group->id||$old->reason!==$reason)throw new \DomainException('Original já corrigido com outra decisão.');return ['state'=>'corrected','correction_id'=>$group->id,'result_id'=>$old->id,'reverse_journal_id'=>$old->reverse_journal_id,'replacement_journal_id'=>$old->replacement_journal_id];} + $a=$this->post(['proposal_id'=>$parts[0]->id,'revision'=>$parts[0]->revision],$reason);$this->step('after_correction_first'); + $b=$this->post(['proposal_id'=>$parts[1]->id,'revision'=>$parts[1]->revision],$reason); + $id=$this->db->table('gl_correction_results')->insertGetId($this->scope+['correction_id'=>$group->id,'original_journal_id'=>$group->original_journal_id,'reverse_journal_id'=>$a['journal_id'],'replacement_journal_id'=>$b['journal_id'],'actor_id'=>$this->actor,'reason'=>$reason,'created_at'=>date('Y-m-d H:i:s')]); + $this->step('after_correction_result'); + return ['state'=>'corrected','correction_id'=>$group->id,'result_id'=>$id,'reverse_journal_id'=>$a['journal_id'],'replacement_journal_id'=>$b['journal_id']]; + } + private function periodSnapshot(string $key):array + { + $period=$this->latest('periods','period_key',$key);if($period->status!=='open')throw new \DomainException('Período já fechado.'); + $h=hash_init('sha256');$pending=0;$facts=0; + foreach($this->db->table('pa_obligations')->where($this->scope)->orderBy('id')->cursor() as $o){ + $source=($this->source)((int)$o->id);hash_update($h,Payables::canonical($source));$facts++; + if(!$this->q('journals')->where('obligation_id',$o->id)->where('snapshot->source->effect_type','supplier_payable.recognised')->exists())$pending++; + } + foreach(['ps_allocations'=>'allocation.confirmed','ps_reversals'=>'allocation.reversed'] as $table=>$type){ + foreach($this->db->table($table)->where($this->scope)->orderBy('id')->cursor() as $r){$facts++;hash_update($h,Payables::canonical((array)$r));if(!$this->q('journals')->where('snapshot->source->effect_type',$type)->where('snapshot->source->source_id',(int)$r->id)->exists())$pending++;} + } + foreach(['ps_payments'=>'ps_payment_decisions','ps_proposals'=>'ps_allocation_decisions','ps_reversal_proposals'=>'ps_reversals'] as $table=>$decisions){ + $fk=match($table){'ps_payments'=>'payment_id','ps_proposals'=>'proposal_id',default=>'proposal_id'}; + $pending+=$this->db->table($table)->where($this->scope)->whereNotIn('id',$this->db->table($decisions)->where($this->scope)->select($fk))->count(); + } + $latest=$this->q('proposals')->selectRaw('max(id)')->groupBy('effect_key'); + $pending+=$this->q('proposals')->whereIn('id',$latest)->whereNotIn('id',$this->q('journals')->select('proposal_id'))->whereNotIn('id',$this->q('reviews')->where('decision','rejected')->select('proposal_id'))->count(); + foreach(['gl_accounts','gl_rules','gl_journals','gl_lines','gl_proposals','gl_reviews','gl_corrections','gl_correction_results','ps_payments','ps_payment_decisions','ps_proposals','ps_allocation_decisions','ps_reversal_proposals'] as $table){ + hash_update($h,$table);foreach($this->db->table($table)->where($this->scope)->orderBy('id')->cursor() as $r)hash_update($h,Payables::canonical((array)$r)); + } + $sum=$this->q('lines')->whereIn('journal_id',$this->q('journals')->where('snapshot->period->period_key',$key)->select('id'))->selectRaw('coalesce(sum(debit_minor),0) d,coalesce(sum(credit_minor),0) c')->first(); + if((int)$sum->d!==(int)$sum->c)throw new \DomainException('Diário desequilibrado.'); + if($this->additionalPeriod!==null){$extra=($this->additionalPeriod)((array)$period);$facts+=$extra['facts'];$pending+=$extra['pending'];hash_update($h,$extra['hash']);} + return ['contract'=>'COMMON-LEDGER-COMPLETE-CYCLE-SIM-v1','period'=>(array)$period,'facts'=>$facts,'pending'=>$pending,'evidence_hash'=>hash_final($h),'debit_minor'=>(int)$sum->d,'credit_minor'=>(int)$sum->c]; + } + private function periodCommand(string $action,array $d,string $reason):array + { + if($action==='period-prepare'){ + if(!is_string($d['period_key'])||strlen($d['period_key'])>80)throw new \InvalidArgumentException('Período inválido.'); + $snapshot=$this->periodSnapshot($d['period_key']);if($snapshot['pending'])throw new \DomainException('Há efeitos ou propostas pendentes de conferência/contabilização.'); + $revision=$this->hash($snapshot);$old=$this->q('period_checks')->where(['period_key'=>$d['period_key'],'revision'=>$revision,'prepared_by'=>$this->actor,'reason'=>$reason])->orderByDesc('id')->first(); + $id=$old?->id??$this->db->table('gl_period_checks')->insertGetId($this->scope+['period_key'=>$d['period_key'],'revision'=>$revision,'snapshot'=>Payables::canonical($snapshot),'prepared_by'=>$this->actor,'prepared_person'=>$this->person,'reason'=>$reason,'created_at'=>date('Y-m-d H:i:s')]); + return ['state'=>'prepared','check_id'=>$id,'revision'=>$revision]; + } + $p=$this->q('period_checks')->where('id',$this->id($d['check_id']))->first()??throw new \DomainException('Conferência do período indisponível.'); + if(!is_string($d['revision'])||!hash_equals($p->revision,$d['revision']))throw new \DomainException('Revisão do período desactualizada.'); + $review=$this->q('period_reviews')->where('check_id',$p->id)->first(); + if($action==='period-close'){ + if((int)$p->prepared_by!==$this->actor||$p->prepared_person!==$this->person)throw new \DomainException('Só o preparador autorizado aplica o fecho.'); + $old=$this->q('period_closures')->where('period_key',$p->period_key)->first(); + if($old){if((int)$old->check_id!==$p->id||$old->reason!==$reason)throw new \DomainException('Período já fechado com outra conferência.');return ['state'=>'closed','closure_id'=>$old->id,'period_version'=>$old->period_version];} + } + $snapshot=$this->periodSnapshot($p->period_key); + if(!hash_equals($p->revision,$this->hash($snapshot)))throw new \DomainException('Factos, regras ou período mudaram; prepare nova conferência.'); + if($action==='period-validate'){ + if((int)$p->prepared_by===$this->actor||$p->prepared_person===$this->person)throw new \DomainException('Revisão do período exige outra identidade e pessoa.'); + if(!in_array($d['decision'],['approved','rejected'],true))throw new \InvalidArgumentException('Decisão explícita inválida.'); + if($review){if($review->decision!==$d['decision']||$review->reason!==$reason)throw new \DomainException('Decisão do período imutável.');} + else $this->db->table('gl_period_reviews')->insert($this->scope+['check_id'=>$p->id,'revision'=>$p->revision,'decision'=>$d['decision'],'actor_id'=>$this->actor,'person'=>$this->person,'reason'=>$reason,'created_at'=>date('Y-m-d H:i:s')]); + return ['state'=>$d['decision'],'check_id'=>$p->id,'revision'=>$p->revision]; + } + if(!$review||$review->decision!=='approved'||$review->revision!==$p->revision)throw new \DomainException('Fecho exige revisão independente aprovada.'); + $period=$snapshot['period'];unset($period['id']);$period['version']++;$period['status']='closed';$period['created_by']=$this->actor;$period['reason']=$reason;$period['created_at']=date('Y-m-d H:i:s'); + $this->db->table('gl_periods')->insert($period);$this->step('after_period_version'); + $id=$this->db->table('gl_period_closures')->insertGetId($this->scope+['check_id'=>$p->id,'review_id'=>$review->id,'period_key'=>$p->period_key,'period_version'=>$period['version'],'actor_id'=>$this->actor,'reason'=>$reason,'created_at'=>date('Y-m-d H:i:s')]); + $this->event('period.closed',$id,$reason,['period'=>$snapshot['period']],['period'=>$period,'evidence_hash'=>$snapshot['evidence_hash']]); + return ['state'=>'closed','closure_id'=>$id,'period_version'=>$period['version']]; + } + public function cycleListing(int $page=1,?int $costOrder=null,?int $industrialLot=null):array + { + $this->cycleReady();$page=$this->id($page);if($page>100000)throw new \InvalidArgumentException('Página inválida.');($this->readAuthorize)();$result=[]; + foreach(['corrections','correction_results','period_checks','period_reviews','period_closures','periods'] as $name){$q=$this->q($name);if($industrialLot!==null&&in_array($name,['corrections','correction_results'],true))$q->whereIn('original_journal_id',$this->q('journals')->where('snapshot->source->effect_type','industry.cost.validated')->where('snapshot->source->industrial_lot_id',$this->id($industrialLot))->select('id'));if($costOrder!==null&&in_array($name,['corrections','correction_results'],true))$q->whereIn('original_journal_id',$this->q('journals')->where('snapshot->source->effect_type','workshop.direct_cost.validated')->where('snapshot->source->cost_order_id',$this->id($costOrder))->select('id'));$p=$q->orderByDesc('id')->paginate(25,['*'],'page',$page);$result[$name]=$p->items();$result['pagination'][$name]=['page'=>$page,'last_page'=>$p->lastPage(),'total'=>$p->total()];} + $ids=[];foreach($result['corrections'] as $c){$ids[]=$c->reverse_proposal_id;$ids[]=$c->replacement_proposal_id;} + $parts=$this->q('proposals')->whereIn('id',$ids)->get()->keyBy('id'); + $partReviews=$this->q('reviews')->whereIn('proposal_id',$ids)->get()->keyBy('proposal_id');$groups=array_map(fn($c)=>$c->id,$result['corrections']);$groupResults=$this->q('correction_results')->whereIn('correction_id',$groups)->get()->keyBy('correction_id'); + $latestParts=$this->q('proposals')->whereIn('effect_key',$parts->pluck('effect_key')->all())->selectRaw('effect_key,max(capture_version) v')->groupBy('effect_key')->pluck('v','effect_key'); + foreach($result['corrections'] as $c){$a=$parts->get($c->reverse_proposal_id);$b=$parts->get($c->replacement_proposal_id);$c->reverse_snapshot=$a->snapshot;$c->replacement_snapshot=$b->snapshot;$c->reverse_review=$partReviews->get($c->reverse_proposal_id);$c->replacement_review=$partReviews->get($c->replacement_proposal_id);$c->result=$groupResults->get($c->id);$c->current=(int)$a->capture_version===(int)$latestParts->get($a->effect_key)&&(int)$b->capture_version===(int)$latestParts->get($b->effect_key);} + foreach(['ps_allocations'=>'allocations','ps_reversals'=>'reversals'] as $table=>$name){$p=$this->db->table($table)->where($this->scope)->orderByDesc('id')->paginate(25,['*'],'page',$page);$result[$name]=$p->items();$result['pagination'][$name]=['page'=>$page,'last_page'=>$p->lastPage(),'total'=>$p->total()];} + $p=$this->db->table('pa_obligations')->where($this->scope)->orderByDesc('id')->paginate(25,['*'],'page',$page);$result['obligations']=$p->items();$result['pagination']['obligations']=['page'=>$page,'last_page'=>$p->lastPage(),'total'=>$p->total()]; + return $result; + } +} diff --git a/packages/general-ledger/src/LedgerReports.php b/packages/general-ledger/src/LedgerReports.php new file mode 100644 index 0000000..981d3b6 --- /dev/null +++ b/packages/general-ledger/src/LedgerReports.php @@ -0,0 +1,81 @@ +$options['to_on'])throw new \InvalidArgumentException('Intervalo de datas invertido.'); + $options['page']=$this->id($options['page']??1);$options['per_page']=$this->id($options['per_page']??25); + if($options['page']>100000||!in_array($options['per_page'],[25,100],true))throw new \InvalidArgumentException('Paginação inválida.'); + if(isset($options['account_id']))$options['account_id']=$this->id($options['account_id']); + elseif($accountRequired)throw new \InvalidArgumentException('Conta explícita obrigatória.'); + return $options; + } + private function reportAmount(mixed $value):int + { + $s=(string)$value;if(!preg_match('/^-?\d+$/D',$s)||filter_var($s,FILTER_VALIDATE_INT)===false)throw new \DomainException('Montante fora da representação exacta suportada.');return (int)$s; + } + private function reportLines(array $o) + { + $q=$this->db->table('gl_lines as l')->join('gl_journals as j','j.id','=','l.journal_id')->join('gl_accounts as a','a.id','=','l.account_id'); + foreach($this->scope as $key=>$value)$q->where('l.'.$key,$value)->where('j.'.$key,$value)->where('a.'.$key,$value); + $q->where('j.journal_on','<=',$o['to_on']);if(isset($o['account_id']))$q->where('a.id',$o['account_id']);return $q; + } + private function reportAccount(array $o):?object + { + return isset($o['account_id'])?($this->q('accounts')->where('id',$o['account_id'])->first()??throw new \DomainException('Conta indisponível neste âmbito.')):null; + } + private function reportGroups(array $o) + { + return $this->reportLines($o)->select(['a.id as account_id','a.code','a.label','a.currency']) + ->selectRaw('COALESCE(SUM(CASE WHEN j.journal_on < ? THEN l.debit_minor::numeric-l.credit_minor::numeric ELSE 0 END),0) AS opening_net_minor',[$o['from_on']]) + ->selectRaw('COALESCE(SUM(CASE WHEN j.journal_on >= ? THEN l.debit_minor::numeric ELSE 0 END),0) AS debit_minor',[$o['from_on']]) + ->selectRaw('COALESCE(SUM(CASE WHEN j.journal_on >= ? THEN l.credit_minor::numeric ELSE 0 END),0) AS credit_minor',[$o['from_on']]) + ->selectRaw('COALESCE(SUM(l.debit_minor::numeric-l.credit_minor::numeric),0) AS closing_net_minor') + ->groupBy('a.id','a.code','a.label','a.currency'); + } + private function reportTotals(array $o):array + { + $groups=$this->reportGroups($o);$q=$this->db->query()->fromSub($groups,'g');$v=$q->selectRaw('COUNT(*) AS accounts, COALESCE(SUM(GREATEST(opening_net_minor,0)),0) AS opening_debit_minor, COALESCE(SUM(GREATEST(-opening_net_minor,0)),0) AS opening_credit_minor, COALESCE(SUM(debit_minor),0) AS debit_minor, COALESCE(SUM(credit_minor),0) AS credit_minor, COALESCE(SUM(GREATEST(closing_net_minor,0)),0) AS closing_debit_minor, COALESCE(SUM(GREATEST(-closing_net_minor,0)),0) AS closing_credit_minor')->first(); + $result=[];foreach((array)$v as $k=>$n)$result[$k]=$this->reportAmount($n);return $result; + } + private function reportBasis(array $o):array + { + // Append-only headers give a bounded snapshot marker, including backdated inserts. + $q=$this->q('journals')->where('journal_on','<=',$o['to_on']);$v=$q->selectRaw('COUNT(*) AS journals,COALESCE(MAX(id),0) AS last_journal_id')->first(); + return ['scope'=>$this->scope,'through_on'=>$o['to_on'],'journals'=>(int)$v->journals,'last_journal_id'=>(int)$v->last_journal_id,'kind'=>'append_only_snapshot_marker']; + } + public function trialBalance(array $options):array + { + $o=$this->reportOptions($options); + return $this->db->transaction(function()use($o){ + ($this->readAuthorize)();$this->reportAccount($o);$totals=$this->reportTotals($o); + $rows=$this->reportGroups($o)->orderBy('a.code')->orderBy('a.id')->offset(($o['page']-1)*$o['per_page'])->limit($o['per_page'])->get()->map(function($row){ + $r=(array)$row;foreach(['opening_net_minor','debit_minor','credit_minor','closing_net_minor'] as $k)$r[$k]=$this->reportAmount($r[$k]);$r['account_id']=(int)$r['account_id'];return $r; + })->all(); + return ['synthetic_only'=>true,'currency'=>'MZN','kind'=>'trial_balance','query'=>$o,'rows'=>$rows,'totals'=>$totals,'basis'=>$this->reportBasis($o),'pagination'=>['page'=>$o['page'],'per_page'=>$o['per_page'],'total'=>$totals['accounts'],'last_page'=>max(1,(int)ceil($totals['accounts']/$o['per_page']))]]; + }); + } + public function accountLedger(array $options):array + { + $o=$this->reportOptions($options,true); + return $this->db->transaction(function()use($o){ + ($this->readAuthorize)();$account=$this->reportAccount($o);$totals=$this->reportTotals($o);$opening=$totals['opening_debit_minor']-$totals['opening_credit_minor']; + $q=$this->reportLines($o)->where('j.journal_on','>=',$o['from_on']);$total=(clone $q)->count(); + $window=$q->select(['l.id as line_id','l.line_no','j.id as journal_id','j.journal_on','j.proposal_id','j.review_id','j.posted_by','j.reason','j.created_at','j.source_revision','l.debit_minor','l.credit_minor']) + ->selectRaw("j.snapshot->'source'->>'effect_type' AS effect_type, j.snapshot->'source'->>'invoice_id' AS invoice_id, j.snapshot->'source'->>'cost_order_id' AS cost_order_id, j.snapshot->'source'->>'industrial_lot_id' AS industrial_lot_id, j.snapshot->'source'->>'obligation_id' AS obligation_id") + ->selectRaw('SUM(l.debit_minor::numeric-l.credit_minor::numeric) OVER (ORDER BY j.journal_on,j.id,l.line_no,l.id ROWS UNBOUNDED PRECEDING) AS movement_net_minor'); + // Paginate outside the window so page two retains the complete running balance. + $rows=$this->db->query()->fromSub($window,'entries')->orderBy('journal_on')->orderBy('journal_id')->orderBy('line_no')->orderBy('line_id')->offset(($o['page']-1)*$o['per_page'])->limit($o['per_page'])->get()->map(function($row)use($opening){ + $r=(array)$row;foreach(['line_id','line_no','journal_id','proposal_id','review_id','posted_by','debit_minor','credit_minor','movement_net_minor'] as $k)$r[$k]=$this->reportAmount($r[$k]); + // Compute in PostgreSQL numeric above; guard the final addition before converting. + $balance=$opening+$r['movement_net_minor'];if(!is_int($balance))throw new \DomainException('Saldo fora da representação exacta suportada.');$r['balance_minor']=$balance;unset($r['movement_net_minor']);return $r; + })->all(); + return ['synthetic_only'=>true,'currency'=>'MZN','kind'=>'account_ledger','query'=>$o,'account'=>(array)$account,'rows'=>$rows,'totals'=>$totals,'opening_net_minor'=>$opening,'closing_net_minor'=>$totals['closing_debit_minor']-$totals['closing_credit_minor'],'basis'=>$this->reportBasis($o),'pagination'=>['page'=>$o['page'],'per_page'=>$o['per_page'],'total'=>$total,'last_page'=>max(1,(int)ceil($total/$o['per_page']))]]; + }); + } +} diff --git a/packages/general-ledger/src/LedgerSales.php b/packages/general-ledger/src/LedgerSales.php new file mode 100644 index 0000000..39cdbc1 --- /dev/null +++ b/packages/general-ledger/src/LedgerSales.php @@ -0,0 +1,19 @@ +db->getSchemaBuilder()->hasTable('gl_sales_capability'))throw new \DomainException('Schema comercial não composto.'); + $kind=$s['effect_type'];$codes=match($kind){'sales.invoice'=>['QA-CLIENTES','QA-VENDAS','QA-IMPOSTO-TESTE'],'receivable.allocated'=>['QA-LIQUIDACAO-CLIENTE','QA-CLIENTES'],'receivable.reversed'=>['QA-CLIENTES','QA-LIQUIDACAO-CLIENTE']}; + $ids=[$rule->debit_account_id,$rule->credit_account_id];if($kind==='sales.invoice')$ids[]=$rule->tax_account_id; + if(count(array_unique($ids))!==count($ids))throw new \DomainException('Contas de movimento distintas necessárias.'); + $accounts=$this->q('accounts')->whereIn('id',$ids)->get()->keyBy('id');$lines=[]; + if($kind==='sales.invoice'&&(!is_int($s['base_minor']??null)||!is_int($s['tax_minor']??null)||$s['base_minor']<=0||$s['tax_minor']<=0||$s['base_minor']+$s['tax_minor']!==$amount))throw new \DomainException('Montantes documentais incompatíveis.'); + foreach($ids as $n=>$id){$a=$accounts->get($id);if(!$a||!$a->is_movement||$a->currency!=='MZN'||$a->code!==$codes[$n])throw new \DomainException('Conta artificial de vendas incompatível.'); + $value=$kind==='sales.invoice'&&$n>0?($n===1?$s['base_minor']:$s['tax_minor']):$amount; + $lines[]=['account_id'=>$a->id,'account_code'=>$a->code,'debit_minor'=>$n===0?$value:0,'credit_minor'=>$n===0?0:$value]; + } + return ['contract'=>'COMMON-LEDGER-SALES-RECEIVABLE-SIM-v1','source'=>$s,'journal_on'=>$date,'currency'=>'MZN','period'=>(array)$period,'rule'=>(array)$rule,'lines'=>$lines,'impact'=>['debit_minor'=>$amount,'credit_minor'=>$amount,'financial_balance_changed'=>false,'payment_created'=>false]]; + } +} diff --git a/packages/general-ledger/src/LedgerSchema.php b/packages/general-ledger/src/LedgerSchema.php new file mode 100644 index 0000000..f470ada --- /dev/null +++ b/packages/general-ledger/src/LedgerSchema.php @@ -0,0 +1,61 @@ +selectOne("SELECT current_database() AS db,current_user AS role,inet_server_port() AS port,current_setting('cluster_name') AS cluster"); + if($db->getDriverName()!=='pgsql'||$db->getConfig('host')!=='127.0.0.1'||!preg_match('/^(payable_sgf_|compras_receipts_test_)([a-f0-9]{12})$/D',$r->db,$m)||(int)$r->port!==55439||!preg_match('/^sgf_modular_regression_[a-f0-9]{12}$/D',$r->cluster)||$r->role!=='payable_history_'.($m[1]==='payable_sgf_'?'sgf_':'native_').$m[2])throw new \LogicException('LEDGER_QA_DATABASE_REFUSED'); + $role=$db->selectOne('SELECT rolsuper OR rolcreatedb OR rolcreaterole OR rolreplication OR rolbypassrls AS elevated FROM pg_roles WHERE rolname=current_user'); + if($role->elevated)throw new \LogicException('LEDGER_ELEVATED_ROLE_REFUSED'); + } + + public static function install(ConnectionInterface $db): void + { + self::assertSynthetic($db); + foreach(self::TABLES as $t)if($db->getSchemaBuilder()->hasTable($t))throw new \LogicException('Ledger schema exists; no reset or repair'); + $scope='tenant_id bigint NOT NULL,company_id bigint NOT NULL,unit_id bigint NOT NULL'; + $db->transaction(function()use($db,$scope){ + $db->unprepared("CREATE TABLE gl_accounts(id bigserial PRIMARY KEY,$scope,code varchar(80) NOT NULL,label text NOT NULL,is_movement boolean NOT NULL,currency varchar(3) NOT NULL CHECK(currency='MZN'),UNIQUE(id,tenant_id,company_id,unit_id),UNIQUE(tenant_id,company_id,unit_id,code))"); + $db->unprepared("CREATE TABLE gl_periods(id bigserial PRIMARY KEY,$scope,period_key varchar(80) NOT NULL,version int NOT NULL CHECK(version>0),starts_on date NOT NULL,ends_on date NOT NULL,status varchar(10) NOT NULL CHECK(status IN ('open','closed')),created_by bigint NOT NULL,reason text NOT NULL,created_at timestamp NOT NULL,CHECK(starts_on<=ends_on),UNIQUE(id,tenant_id,company_id,unit_id),UNIQUE(tenant_id,company_id,unit_id,period_key,version))"); + $db->unprepared("CREATE TABLE gl_rules(id bigserial PRIMARY KEY,$scope,rule_key varchar(80) NOT NULL,version int NOT NULL CHECK(version>0),policy varchar(100) NOT NULL,effect_type varchar(80) NOT NULL,currency varchar(3) NOT NULL,valid_from date NOT NULL,valid_to date NOT NULL,debit_account_id bigint NOT NULL,credit_account_id bigint NOT NULL,created_by bigint NOT NULL,reason text NOT NULL,created_at timestamp NOT NULL,CHECK(valid_from<=valid_to AND debit_account_id<>credit_account_id),UNIQUE(id,tenant_id,company_id,unit_id),UNIQUE(tenant_id,company_id,unit_id,rule_key,version),FOREIGN KEY(debit_account_id,tenant_id,company_id,unit_id) REFERENCES gl_accounts(id,tenant_id,company_id,unit_id),FOREIGN KEY(credit_account_id,tenant_id,company_id,unit_id) REFERENCES gl_accounts(id,tenant_id,company_id,unit_id))"); + $db->unprepared("CREATE TABLE gl_proposals(id bigserial PRIMARY KEY,$scope,effect_key char(64) NOT NULL,obligation_id bigint NOT NULL,capture_version int NOT NULL CHECK(capture_version>0),revision char(64) NOT NULL,snapshot jsonb NOT NULL,prepared_by bigint NOT NULL,prepared_person varchar(160) NOT NULL,reason text NOT NULL,created_at timestamp NOT NULL,UNIQUE(id,tenant_id,company_id,unit_id),UNIQUE(tenant_id,company_id,unit_id,effect_key,capture_version))"); + $db->unprepared("CREATE TABLE gl_reviews(id bigserial PRIMARY KEY,$scope,proposal_id bigint NOT NULL,revision char(64) NOT NULL,decision varchar(10) NOT NULL CHECK(decision IN ('approved','rejected')),reviewed_by bigint NOT NULL,reviewed_person varchar(160) NOT NULL,reason text NOT NULL,created_at timestamp NOT NULL,UNIQUE(id,tenant_id,company_id,unit_id),UNIQUE(proposal_id),FOREIGN KEY(proposal_id,tenant_id,company_id,unit_id) REFERENCES gl_proposals(id,tenant_id,company_id,unit_id))"); + $db->unprepared("CREATE TABLE gl_journals(id bigserial PRIMARY KEY,$scope,effect_key char(64) NOT NULL,obligation_id bigint NOT NULL,proposal_id bigint NOT NULL,review_id bigint NOT NULL,source_revision char(64) NOT NULL,journal_on date NOT NULL,currency varchar(3) NOT NULL CHECK(currency='MZN'),debit_minor bigint NOT NULL,credit_minor bigint NOT NULL,snapshot jsonb NOT NULL,posted_by bigint NOT NULL,posted_person varchar(160) NOT NULL,reason text NOT NULL,created_at timestamp NOT NULL,CHECK(debit_minor>0 AND debit_minor=credit_minor),UNIQUE(id,tenant_id,company_id,unit_id),UNIQUE(tenant_id,company_id,unit_id,effect_key),UNIQUE(proposal_id),FOREIGN KEY(proposal_id,tenant_id,company_id,unit_id) REFERENCES gl_proposals(id,tenant_id,company_id,unit_id),FOREIGN KEY(review_id,tenant_id,company_id,unit_id) REFERENCES gl_reviews(id,tenant_id,company_id,unit_id))"); + $db->unprepared("CREATE TABLE gl_lines(id bigserial PRIMARY KEY,$scope,journal_id bigint NOT NULL,line_no smallint NOT NULL CHECK(line_no IN(1,2)),account_id bigint NOT NULL,debit_minor bigint NOT NULL CHECK(debit_minor>=0),credit_minor bigint NOT NULL CHECK(credit_minor>=0),CHECK((debit_minor>0 AND credit_minor=0) OR (credit_minor>0 AND debit_minor=0)),UNIQUE(journal_id,line_no),FOREIGN KEY(journal_id,tenant_id,company_id,unit_id) REFERENCES gl_journals(id,tenant_id,company_id,unit_id),FOREIGN KEY(account_id,tenant_id,company_id,unit_id) REFERENCES gl_accounts(id,tenant_id,company_id,unit_id))"); + $db->unprepared("CREATE TABLE gl_commands(id bigserial PRIMARY KEY,$scope,actor_id bigint NOT NULL,command_key uuid NOT NULL,request_hash char(64) NOT NULL,result jsonb NOT NULL,created_at timestamp NOT NULL,UNIQUE(tenant_id,company_id,unit_id,actor_id,command_key))"); + $db->unprepared("CREATE TABLE gl_events(id bigserial PRIMARY KEY,$scope,actor_id bigint NOT NULL,person varchar(160) NOT NULL,kind varchar(80) NOT NULL,entity_id bigint NOT NULL,reason text NOT NULL,previous jsonb NOT NULL,subsequent jsonb NOT NULL,created_at timestamp NOT NULL)"); + $db->unprepared(<<<'SQL' +CREATE FUNCTION gl_append_only() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN RAISE EXCEPTION 'GL_APPEND_ONLY'; END $$; +CREATE FUNCTION gl_assert_balanced(journal bigint) RETURNS void LANGUAGE plpgsql AS $$ +DECLARE j gl_journals%ROWTYPE; n bigint; d bigint; c bigint; bad bigint; +BEGIN + SELECT * INTO STRICT j FROM gl_journals WHERE id=journal; + IF NOT EXISTS(SELECT 1 FROM gl_proposals p JOIN gl_reviews r ON r.proposal_id=p.id AND r.tenant_id=p.tenant_id AND r.company_id=p.company_id AND r.unit_id=p.unit_id + WHERE p.id=j.proposal_id AND r.id=j.review_id AND p.tenant_id=j.tenant_id AND p.company_id=j.company_id AND p.unit_id=j.unit_id + AND r.decision='approved' AND r.revision=p.revision AND r.reviewed_by<>p.prepared_by AND r.reviewed_person<>p.prepared_person + AND j.posted_by=p.prepared_by AND j.posted_person=p.prepared_person AND j.snapshot=p.snapshot AND j.effect_key=p.effect_key + AND j.obligation_id=(p.snapshot->'source'->>'obligation_id')::bigint AND j.source_revision=p.snapshot->'source'->>'recognition_revision' + AND j.journal_on=(p.snapshot->>'journal_on')::date AND j.debit_minor=(p.snapshot->'source'->>'principal_minor')::bigint) + THEN RAISE EXCEPTION 'GL_REVIEW_OR_SOURCE_MISMATCH' USING ERRCODE='23514'; END IF; + SELECT count(*),coalesce(sum(l.debit_minor),0),coalesce(sum(l.credit_minor),0),count(*) FILTER(WHERE NOT a.is_movement OR a.currency<>j.currency + OR l.account_id<>coalesce((j.snapshot->'lines'->(l.line_no-1)->>'account_id')::bigint,0) + OR l.debit_minor<>coalesce((j.snapshot->'lines'->(l.line_no-1)->>'debit_minor')::bigint,-1) + OR l.credit_minor<>coalesce((j.snapshot->'lines'->(l.line_no-1)->>'credit_minor')::bigint,-1)) + INTO n,d,c,bad FROM gl_lines l JOIN gl_accounts a ON a.id=l.account_id AND a.tenant_id=l.tenant_id AND a.company_id=l.company_id AND a.unit_id=l.unit_id + WHERE l.journal_id=journal AND l.tenant_id=j.tenant_id AND l.company_id=j.company_id AND l.unit_id=j.unit_id; + IF n<>2 OR d<>j.debit_minor OR c<>j.credit_minor OR d<>c OR bad<>0 THEN RAISE EXCEPTION 'GL_UNBALANCED_JOURNAL' USING ERRCODE='23514'; END IF; +END $$; +CREATE FUNCTION gl_balance_trigger() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN PERFORM gl_assert_balanced(NEW.id); RETURN NEW; END $$; +CREATE CONSTRAINT TRIGGER gl_balanced_journal AFTER INSERT ON gl_journals DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE FUNCTION gl_balance_trigger(); +SQL); + foreach(self::TABLES as $t)$db->unprepared("CREATE TRIGGER gl_immutable BEFORE UPDATE OR DELETE ON $t FOR EACH ROW EXECUTE FUNCTION gl_append_only()"); + }); + } +} diff --git a/packages/general-ledger/src/PayableJournal.php b/packages/general-ledger/src/PayableJournal.php new file mode 100644 index 0000000..9948b87 --- /dev/null +++ b/packages/general-ledger/src/PayableJournal.php @@ -0,0 +1,159 @@ +db->table('gl_'.$table)->where($this->scope);} + private function hash(array $data):string{return hash('sha256',Payables::canonical($data));} + private function step(string $name):void{if($this->checkpoint!==null)($this->checkpoint)($name);} + private function id(mixed $id):int{if(is_bool($id)||filter_var($id,FILTER_VALIDATE_INT,['options'=>['min_range'=>1]])===false)throw new \InvalidArgumentException('Identificador inválido.');return (int)$id;} + private function exact(array $data,array $keys):void{if(array_diff(array_keys($data),$keys)||array_diff($keys,array_keys($data)))throw new \InvalidArgumentException('Campos incompatíveis.');} + private function reason(mixed $value):string{if(!is_string($value)||mb_strlen(trim($value))<3||mb_strlen($value)>2000)throw new \InvalidArgumentException('Fundamento individual obrigatório.');return trim($value);} + private function latest(string $table,string $column,string $key):object{return $this->q($table)->where($column,$key)->orderByDesc('version')->first()??throw new \DomainException('Configuração não disponível neste âmbito.');} + private function effect(array $source):string{return $this->hash([$this->scope,$source['effect_type'],$source['origin_key'],$source['source_id']??$source['obligation_id']]);} + + private function capture(int $obligation,string $date,string $periodKey,string $ruleKey,string $kind='supplier_payable.recognised'):array + { + if(!preg_match('/^(\d{4})-(\d{2})-(\d{2})$/D',$date,$m)||!checkdate((int)$m[2],(int)$m[3],(int)$m[1]))throw new \InvalidArgumentException('Data de lançamento explícita inválida.'); + $sales=in_array($kind,['sales.invoice','receivable.allocated','receivable.reversed'],true);$cost=in_array($kind,['workshop.direct_cost.validated','workshop.direct_cost.reversal','workshop.direct_cost.replacement'],true); + $industrial=in_array($kind,['industry.cost.validated','industry.cost.reversal','industry.cost.replacement'],true); + $stock=in_array($kind,['stock.receipt','stock.issue','stock.return'],true); + $s=$sales||$cost||$industrial||$stock?($this->additionalSource!==null?($this->additionalSource)($kind,$obligation):throw new \DomainException('Origem adicional não composta neste host.')):($kind==='supplier_payable.recognised'?($this->source)($obligation):$this->cycleSource($kind,$obligation)); + $amount=$s['amount_minor']??$s['principal_minor']??null; + if(($s['effect_type']??'')!==$kind||!($s['compatible']??false)||($s['currency']??'')!=='MZN'||!is_int($amount)||$amount<=0||(!$sales&&($s['tax_minor']??null)!==0)||($s['history_imported']??true))throw new \DomainException('Fonte incompatível com o ensaio contabilístico.'); + $period=$this->latest('periods','period_key',$periodKey);$rule=$this->latest('rules','rule_key',$ruleKey); + if(($cost||$industrial)&&isset($s['original_journal_on'])&&$date<$s['original_journal_on'])throw new \DomainException('Correcção não pode anteceder o original.'); + if(($cost||$industrial||$stock)&&($s['permitted_period_key']??null)!==$periodKey)throw new \DomainException('Período fora da composição seleccionada.'); + if($stock){if(!$this->db->getSchemaBuilder()->hasTable('gl_stock_books')||($s['stock_movement_on']??'')!==$date)throw new \DomainException('Valorização não composta ou data física incompatível.');} + if($industrial&&($s['period_start']<$period->starts_on||$s['period_end']>$period->ends_on))throw new \DomainException('Período não contém o lote seleccionado.'); + if($period->status!=='open'||$date<$period->starts_on||$date>$period->ends_on)throw new \DomainException('Período fechado, incompatível ou alterado.'); + if($rule->policy!==($stock?'QA-STOCK-VALUATION-v1':($sales?'QA-SALES-JOURNAL-v1':($cost?'QA-DIRECT-COST-JOURNAL-v1':($industrial?'QA-INDUSTRIAL-JOURNAL-v1':self::POLICY))))||$rule->effect_type!==$s['effect_type']||$rule->currency!=='MZN'||$date<$rule->valid_from||$date>$rule->valid_to)throw new \DomainException('Regra contabilística ausente, incompatível ou fora de vigência.'); + if($sales)return $this->captureSales($s,$date,$period,$rule,$amount); + $accounts=$this->q('accounts')->whereIn('id',[$rule->debit_account_id,$rule->credit_account_id])->get()->keyBy('id'); + $debit=$accounts->get($rule->debit_account_id);$credit=$accounts->get($rule->credit_account_id); + $codes=match($kind){'stock.receipt'=>['QA-STOCK','QA-COMPENSACAO-STOCK'],'stock.issue'=>['QA-CONSUMO-STOCK','QA-STOCK'],'stock.return'=>['QA-STOCK','QA-CONSUMO-STOCK'],'industry.cost.validated','industry.cost.replacement'=>['QA-CUSTO-INDUSTRIAL','QA-COMPENSACAO-INDUSTRIAL'],'industry.cost.reversal'=>['QA-COMPENSACAO-INDUSTRIAL','QA-CUSTO-INDUSTRIAL'],'supplier_payable.recognised','journal.replacement'=>['QA-CONTRAPARTIDA','QA-FORNECEDOR'],'allocation.confirmed'=>['QA-FORNECEDOR','QA-LIQUIDACAO'],'allocation.reversed'=>['QA-LIQUIDACAO','QA-FORNECEDOR'],'journal.reversal'=>['QA-FORNECEDOR','QA-CONTRAPARTIDA'],'workshop.direct_cost.validated','workshop.direct_cost.replacement'=>['QA-CUSTO-DIRECTO','QA-COMPENSACAO-ENSAIO'],'workshop.direct_cost.reversal'=>['QA-COMPENSACAO-ENSAIO','QA-CUSTO-DIRECTO'],default=>throw new \DomainException('Tipo de efeito não autorizado.')}; + if(!$debit||!$credit||!$debit->is_movement||!$credit->is_movement||$debit->currency!=='MZN'||$credit->currency!=='MZN'||$debit->id===$credit->id||[$debit->code,$credit->code]!==$codes)throw new \DomainException('Contas artificiais de movimento incompatíveis.'); + return ['contract'=>$stock?'COMMON-LEDGER-STOCK-VALUATION-SIM-v1':($industrial?($kind==='industry.cost.validated'?'COMMON-LEDGER-INDUSTRIAL-SIM-v1':'COMMON-LEDGER-INDUSTRIAL-CORRECTION-SIM-v1'):($cost?($kind==='workshop.direct_cost.validated'?'COMMON-LEDGER-DIRECT-COST-SIM-v1':'COMMON-LEDGER-DIRECT-COST-CORRECTION-SIM-v1'):($kind==='supplier_payable.recognised'?'COMMON-LEDGER-PAYABLE-SIM-v1':'COMMON-LEDGER-COMPLETE-CYCLE-SIM-v1'))),'source'=>$s,'journal_on'=>$date,'currency'=>'MZN','period'=>(array)$period,'rule'=>(array)$rule, + 'lines'=>[['account_id'=>$debit->id,'account_code'=>$debit->code,'debit_minor'=>$amount,'credit_minor'=>0],['account_id'=>$credit->id,'account_code'=>$credit->code,'debit_minor'=>0,'credit_minor'=>$amount]], + 'impact'=>['debit_minor'=>$amount,'credit_minor'=>$amount,'financial_balance_changed'=>false,'payment_created'=>false]]; + } + private function proposal(int $id):object{return $this->q('proposals')->where('id',$id)->first()??throw new \DomainException('Proposta indisponível neste contexto.');} + private function current(object $p,string $revision):array + { + if(!hash_equals($p->revision,$revision))throw new \DomainException('Versão da conferência desactualizada.'); + if($this->q('proposals')->where('effect_key',$p->effect_key)->max('capture_version')!=$p->capture_version)throw new \DomainException('Há nova captura; confira a versão actual.'); + $old=json_decode($p->snapshot,true,128,JSON_THROW_ON_ERROR); + $kind=$old['source']['effect_type'];$now=$this->capture((int)($old['source']['source_id']??$p->obligation_id),$old['journal_on'],$old['period']['period_key'],$old['rule']['rule_key'],$kind); + if(!hash_equals($p->revision,$this->hash($now)))throw new \DomainException('Fonte, regra ou período mudaram; prepare nova conferência.'); + return $now; + } + private function event(string $kind,int $id,string $reason,array $before,array $after):void + { + $this->db->table('gl_events')->insert($this->scope+['actor_id'=>$this->actor,'person'=>$this->person,'kind'=>$kind,'entity_id'=>$id,'reason'=>$reason,'previous'=>Payables::canonical($before),'subsequent'=>Payables::canonical($after),'created_at'=>date('Y-m-d H:i:s')]);$this->step('after_event'); + } + public function command(string $action,array $data,string $key):array + { + if(in_array($action,['effect-prepare','correct-prepare','correct-validate','correct-post','period-prepare','period-validate','period-close'],true))return $this->cycleCommand($action,$data,$key); + if(!in_array($action,['prepare','validate','post'],true)||!preg_match('/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/Di',$key))throw new \InvalidArgumentException('Acção ou chave de repetição inválida.'); + $keys=['prepare'=>['obligation_id','journal_on','period_key','rule_key','reason'],'validate'=>['proposal_id','revision','decision','reason'],'post'=>['proposal_id','revision','reason']]; + $this->exact($data,$keys[$action]);$reason=$this->reason($data['reason']); + return $this->db->transaction(function()use($action,$data,$key,$reason):array{ + ($this->authorize)($action); // Host serialises the company and revalidates identity and explicit rights before replay too. + $hash=$this->hash([$action,$data]);$old=$this->q('commands')->where(['actor_id'=>$this->actor,'command_key'=>$key])->first(); + if($old){if(!hash_equals($old->request_hash,$hash))throw new \DomainException('Chave repetida com conteúdo diferente.');return json_decode($old->result,true,64,JSON_THROW_ON_ERROR)+['replayed'=>true];} + if(in_array($action,['validate','post'],true)){ + $candidate=$this->proposal($this->id($data['proposal_id'])); + if(in_array(json_decode($candidate->snapshot,true)['source']['effect_type'],['journal.reversal','journal.replacement','workshop.direct_cost.reversal','workshop.direct_cost.replacement','industry.cost.reversal','industry.cost.replacement'],true))throw new \DomainException('Use a decisão/aplicação do par de correcção completo.'); + } + if($action==='prepare')$result=$this->prepare($data,$reason); + elseif($action==='validate')$result=$this->review($data,$reason); + else $result=$this->post($data,$reason); + $this->db->table('gl_commands')->insert($this->scope+['actor_id'=>$this->actor,'command_key'=>$key,'request_hash'=>$hash,'result'=>Payables::canonical($result),'created_at'=>date('Y-m-d H:i:s')]);$this->step('after_receipt'); + return $result+['replayed'=>false]; + }); + } + private function prepare(array $d,string $reason,string $kind='supplier_payable.recognised'):array + { + foreach(['journal_on','period_key','rule_key'] as $key)if(!is_string($d[$key])||strlen($d[$key])>100)throw new \InvalidArgumentException('Critério contabilístico inválido.'); + $snapshot=$this->capture($this->id($d['obligation_id']),$d['journal_on'],$d['period_key'],$d['rule_key'],$kind);$effect=$this->effect($snapshot['source']);$revision=$this->hash($snapshot); + if($this->q('journals')->where('effect_key',$effect)->exists())throw new \DomainException('Efeito já lançado; consulte o comprovativo existente.'); + $last=$this->q('proposals')->where('effect_key',$effect)->orderByDesc('capture_version')->first(); + if($last&&$last->revision===$revision&&(int)$last->prepared_by===$this->actor&&$last->prepared_person===$this->person&&$last->reason===$reason)return ['state'=>$this->q('reviews')->where('proposal_id',$last->id)->value('decision')??'prepared','proposal_id'=>$last->id,'revision'=>$last->revision]; + $id=$this->db->table('gl_proposals')->insertGetId($this->scope+['effect_key'=>$effect,'obligation_id'=>$snapshot['source']['obligation_id'],'capture_version'=>$last?(int)$last->capture_version+1:1,'revision'=>$revision,'snapshot'=>Payables::canonical($snapshot),'prepared_by'=>$this->actor,'prepared_person'=>$this->person,'reason'=>$reason,'created_at'=>date('Y-m-d H:i:s')]); + $this->event('journal.prepared',$id,$reason,$last?['proposal_id'=>$last->id,'revision'=>$last->revision]:[],['proposal_id'=>$id,'revision'=>$revision,'snapshot'=>$snapshot]); + return ['state'=>'prepared','proposal_id'=>$id,'revision'=>$revision]; + } + private function review(array $d,string $reason):array + { + if(!is_string($d['revision'])||!in_array($d['decision'],['approved','rejected'],true))throw new \InvalidArgumentException('Decisão/revisão explícita inválida.'); + $p=$this->proposal($this->id($d['proposal_id'])); + if(in_array(json_decode($p->snapshot,true)['source']['effect_type'],['journal.reversal','journal.replacement','workshop.direct_cost.reversal','workshop.direct_cost.replacement','industry.cost.reversal','industry.cost.replacement'],true))($this->authorize)('correct_validate'); + if((int)$p->prepared_by===$this->actor||$p->prepared_person===$this->person)throw new \DomainException('Revisão exige outra identidade e pessoa.'); + $this->current($p,$d['revision']);$old=$this->q('reviews')->where('proposal_id',$p->id)->first(); + if($old){if($old->decision!==$d['decision']||$old->reason!==$reason)throw new \DomainException('Decisão já registada; não pode ser alterada.');return ['state'=>$old->decision,'proposal_id'=>$p->id,'review_id'=>$old->id];} + $id=$this->db->table('gl_reviews')->insertGetId($this->scope+['proposal_id'=>$p->id,'revision'=>$p->revision,'decision'=>$d['decision'],'reviewed_by'=>$this->actor,'reviewed_person'=>$this->person,'reason'=>$reason,'created_at'=>date('Y-m-d H:i:s')]); + $this->event('journal.reviewed',$id,$reason,['proposal_id'=>$p->id,'state'=>'prepared'],['proposal_id'=>$p->id,'decision'=>$d['decision'],'revision'=>$p->revision]); + return ['state'=>$d['decision'],'proposal_id'=>$p->id,'review_id'=>$id]; + } + private function post(array $d,string $reason):array + { + if(!is_string($d['revision']))throw new \InvalidArgumentException('Revisão inválida.');$p=$this->proposal($this->id($d['proposal_id'])); + if(in_array(json_decode($p->snapshot,true)['source']['effect_type'],['journal.reversal','journal.replacement','workshop.direct_cost.reversal','workshop.direct_cost.replacement','industry.cost.reversal','industry.cost.replacement'],true))($this->authorize)('correct_post'); + if((int)$p->prepared_by!==$this->actor||$p->prepared_person!==$this->person)throw new \DomainException('Só o preparador autorizado aplica esta versão.'); + $existing=$this->q('journals')->where('effect_key',$p->effect_key)->first(); + if($existing){if((int)$existing->proposal_id!==(int)$p->id||!hash_equals($p->revision,$d['revision'])||$existing->reason!==$reason)throw new \DomainException('Efeito já lançado com conteúdo diferente.');return ['state'=>'posted','proposal_id'=>$p->id,'journal_id'=>$existing->id];} + $snapshot=$this->current($p,$d['revision']);$review=$this->q('reviews')->where('proposal_id',$p->id)->first(); + if(!$review||$review->decision!=='approved'||$review->revision!==$p->revision||(int)$review->reviewed_by===(int)$p->prepared_by||$review->reviewed_person===$p->prepared_person)throw new \DomainException('Falta revisão independente desta versão exacta.'); + $debit=array_sum(array_column($snapshot['lines'],'debit_minor'));$credit=array_sum(array_column($snapshot['lines'],'credit_minor')); + if($debit!==$credit||$debit!==($snapshot['source']['amount_minor']??$snapshot['source']['principal_minor'])||$debit<=0)throw new \DomainException('Lançamento desequilibrado ou montante incompatível.'); + $id=$this->db->table('gl_journals')->insertGetId($this->scope+['effect_key'=>$p->effect_key,'obligation_id'=>$p->obligation_id,'proposal_id'=>$p->id,'review_id'=>$review->id,'source_revision'=>$snapshot['source']['recognition_revision'],'journal_on'=>$snapshot['journal_on'],'currency'=>'MZN','debit_minor'=>$debit,'credit_minor'=>$credit,'snapshot'=>Payables::canonical($snapshot),'posted_by'=>$this->actor,'posted_person'=>$this->person,'reason'=>$reason,'created_at'=>date('Y-m-d H:i:s')]);$this->step('after_header'); + foreach($snapshot['lines'] as $n=>$line)$this->db->table('gl_lines')->insert($this->scope+['journal_id'=>$id,'line_no'=>$n+1,'account_id'=>$line['account_id'],'debit_minor'=>$line['debit_minor'],'credit_minor'=>$line['credit_minor']]);$this->step('after_lines'); + $this->db->select('SELECT gl_assert_balanced(?)',[$id]); + $this->event('journal.posted',$id,$reason,['proposal_id'=>$p->id,'review_id'=>$review->id,'state'=>'approved'],['journal_id'=>$id,'snapshot'=>$snapshot]); + return ['state'=>'posted','proposal_id'=>$p->id,'journal_id'=>$id]; + } + /** Historical receipt only: never replay a command or fetch another actor's receipt. */ + public function receipt(string $key):?array + { + if(!preg_match('/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/Di',$key))throw new \InvalidArgumentException('Chave de pedido inválida.'); + return $this->db->transaction(function()use($key){($this->readAuthorize)();$r=$this->q('commands')->where('actor_id',$this->actor)->where('command_key',$key)->first();return $r?['command_key'=>$r->command_key,'recorded_at'=>$r->created_at,'request_hash'=>$r->request_hash,'result'=>json_decode($r->result,true,128,JSON_THROW_ON_ERROR),'historical_receipt_only'=>true,'operation_executed'=>false]:null;}); + } + public function listing(array $options=[],bool $withAccounts=true):array + { + if(array_diff(array_keys($options),['page','period_key','account_id','obligation_id','sales_invoice_id','cost_order_id','industrial_lot_id']))throw new \InvalidArgumentException('Filtro desconhecido.');$page=$this->id($options['page']??1);if($page>100000)throw new \InvalidArgumentException('Página inválida.'); + return $this->db->transaction(function()use($options,$page,$withAccounts):array{ + ($this->readAuthorize)();$journals=$this->q('journals');$focus=null;$salesInvoice=null;$costOrder=null;$industrialLot=null; + if(isset($options['industrial_lot_id'])){$industrialLot=$this->id($options['industrial_lot_id']);if($this->additionalSource===null||!$this->db->getSchemaBuilder()->hasTable('gl_industrial_sources')||!$this->db->table('gl_industrial_sources')->where($this->scope)->where('lot_id',$industrialLot)->exists())throw new \DomainException('Lote fora do âmbito composto.');$journals->whereIn('snapshot->source->effect_type',['industry.cost.validated','industry.cost.reversal','industry.cost.replacement'])->where('snapshot->source->industrial_lot_id',$industrialLot);} + if(isset($options['cost_order_id'])){$costOrder=$this->id($options['cost_order_id']);if($this->additionalSource===null||!$this->db->getSchemaBuilder()->hasTable('gl_cost_sources')||!$this->db->table('gl_cost_sources')->where($this->scope)->where('order_id',$costOrder)->exists())throw new \DomainException('Custo fora do âmbito composto.');$journals->where('snapshot->source->cost_order_id',$costOrder);} + if(isset($options['sales_invoice_id'])){$salesInvoice=$this->id($options['sales_invoice_id']);if($this->additionalSource===null||!$this->db->table('si_invoices')->where($this->scope)->where('id',$salesInvoice)->exists())throw new \DomainException('Commercial source unavailable in this scope.');$journals->where('snapshot->source->invoice_id',$salesInvoice);} + if(isset($options['obligation_id'])){$focus=$this->id($options['obligation_id']);if(!$this->db->table('pa_obligations')->where($this->scope)->where('id',$focus)->exists())throw new \DomainException('Obrigação indisponível neste contexto.');$journals->where('obligation_id',$focus)->whereIn('snapshot->source->effect_type',self::SUPPLIER_EFFECTS);} + if(isset($options['period_key'])){if(!is_string($options['period_key'])||strlen($options['period_key'])>80)throw new \InvalidArgumentException('Período inválido.');$this->latest('periods','period_key',$options['period_key']);$journals->whereRaw("snapshot->'period'->>'period_key' = ?",[$options['period_key']]);} + $account=null;if(isset($options['account_id'])){$account=$this->q('accounts')->where('id',$this->id($options['account_id']))->first()??throw new \DomainException('Conta indisponível neste contexto.');$journals->whereIn('id',$this->q('lines')->where('account_id',$account->id)->select('journal_id'));} + $pager=(clone $journals)->orderByDesc('id')->paginate(25,['*'],'page',$page);$ids=array_map(fn($j)=>$j->id,$pager->items()); + $lines=$this->q('lines')->whereIn('journal_id',$ids)->orderBy('line_no')->get(); + $totals=$this->q('lines')->whereIn('journal_id',(clone $journals)->select('id'));if($account)$totals->where('account_id',$account->id); + $sum=$totals->selectRaw('coalesce(sum(debit_minor),0) AS debit_minor,coalesce(sum(credit_minor),0) AS credit_minor')->first(); + $proposalQuery=$this->q('proposals');if($industrialLot)$proposalQuery->where('snapshot->source->industrial_lot_id',$industrialLot)->whereIn('snapshot->source->effect_type',['industry.cost.validated','industry.cost.reversal','industry.cost.replacement']);if($costOrder)$proposalQuery->where('snapshot->source->cost_order_id',$costOrder);if($salesInvoice)$proposalQuery->where('snapshot->source->invoice_id',$salesInvoice);if($focus)$proposalQuery->where('obligation_id',$focus)->whereIn('snapshot->source->effect_type',self::SUPPLIER_EFFECTS);$proposals=$proposalQuery->orderByDesc('id')->paginate(25,['*'],'page',$page);$proposalIds=array_map(fn($p)=>$p->id,$proposals->items());$reviews=$this->q('reviews')->whereIn('proposal_id',$proposalIds)->get(); + $posted=$this->q('journals')->whereIn('proposal_id',$proposalIds)->pluck('id','proposal_id');foreach($proposals->items() as $p)$p->journal_id=$posted->get($p->id); + $eventPager=$this->q('events')->when($focus||$salesInvoice||$costOrder||$industrialLot,fn($q)=>$q->where(function($events)use($focus,$salesInvoice,$costOrder,$industrialLot){ + $events->where(fn($e)=>$e->where('kind','journal.prepared')->whereIn('entity_id',$this->q('proposals')->when($focus,fn($q)=>$q->where('obligation_id',$focus)->whereIn('snapshot->source->effect_type',self::SUPPLIER_EFFECTS))->when($salesInvoice,fn($q)=>$q->where('snapshot->source->invoice_id',$salesInvoice))->when($costOrder,fn($q)=>$q->where('snapshot->source->cost_order_id',$costOrder))->when($industrialLot,fn($q)=>$q->where('snapshot->source->industrial_lot_id',$industrialLot)->whereIn('snapshot->source->effect_type',['industry.cost.validated','industry.cost.reversal','industry.cost.replacement']))->select('id'))) + ->orWhere(fn($e)=>$e->where('kind','journal.reviewed')->whereIn('entity_id',$this->q('reviews')->whereIn('proposal_id',$this->q('proposals')->when($focus,fn($q)=>$q->where('obligation_id',$focus)->whereIn('snapshot->source->effect_type',self::SUPPLIER_EFFECTS))->when($salesInvoice,fn($q)=>$q->where('snapshot->source->invoice_id',$salesInvoice))->when($costOrder,fn($q)=>$q->where('snapshot->source->cost_order_id',$costOrder))->when($industrialLot,fn($q)=>$q->where('snapshot->source->industrial_lot_id',$industrialLot)->whereIn('snapshot->source->effect_type',['industry.cost.validated','industry.cost.reversal','industry.cost.replacement']))->select('id'))->select('id'))) + ->orWhere(fn($e)=>$e->where('kind','journal.posted')->whereIn('entity_id',$this->q('journals')->when($focus,fn($q)=>$q->where('obligation_id',$focus)->whereIn('snapshot->source->effect_type',self::SUPPLIER_EFFECTS))->when($salesInvoice,fn($q)=>$q->where('snapshot->source->invoice_id',$salesInvoice))->when($costOrder,fn($q)=>$q->where('snapshot->source->cost_order_id',$costOrder))->when($industrialLot,fn($q)=>$q->where('snapshot->source->industrial_lot_id',$industrialLot)->whereIn('snapshot->source->effect_type',['industry.cost.validated','industry.cost.reversal','industry.cost.replacement']))->select('id'))); + }))->orderByDesc('id')->paginate(25,['*'],'page',$page); + return ['synthetic_only'=>true,'journals'=>$pager->items(),'lines'=>$lines->all(),'proposals'=>$proposals->items(),'reviews'=>$reviews->all(),'accounts'=>$withAccounts?$this->q('accounts')->orderBy('id')->get()->all():[], + 'events'=>$eventPager->items(),'totals'=>['debit_minor'=>(int)$sum->debit_minor,'credit_minor'=>(int)$sum->credit_minor,'net_minor'=>(int)$sum->debit_minor-(int)$sum->credit_minor], + 'pagination'=>['page'=>$page,'total'=>$pager->total(),'last_page'=>$pager->lastPage()],'evidence_pagination'=>['proposals'=>['page'=>$page,'total'=>$proposals->total(),'last_page'=>$proposals->lastPage()],'events'=>['page'=>$page,'total'=>$eventPager->total(),'last_page'=>$eventPager->lastPage()]],'query'=>$options]; + }); + } +} diff --git a/packages/general-ledger/src/ReportsWorkspace.php b/packages/general-ledger/src/ReportsWorkspace.php new file mode 100644 index 0000000..26d5e57 --- /dev/null +++ b/packages/general-ledger/src/ReportsWorkspace.php @@ -0,0 +1,9 @@ +getDatabaseName(),'payable_sgf_'))throw new \LogicException('Sales host composition required'); + if($db->table('gl_proposals')->exists()||$db->table('gl_journals')->exists()||$db->getSchemaBuilder()->hasTable('gl_sales_capability'))throw new \LogicException('Fresh empty sales ledger required; no upgrade/reset'); + $db->transaction(function()use($db){ + $db->statement('ALTER TABLE gl_rules ADD COLUMN tax_account_id bigint NULL'); + $db->statement('ALTER TABLE gl_rules ADD FOREIGN KEY(tax_account_id,tenant_id,company_id,unit_id) REFERENCES gl_accounts(id,tenant_id,company_id,unit_id)'); + $db->statement('ALTER TABLE gl_lines DROP CONSTRAINT gl_lines_line_no_check');$db->statement('ALTER TABLE gl_lines ADD CHECK(line_no IN(1,2,3))'); + $definition=$db->selectOne("SELECT pg_get_functiondef('gl_assert_balanced(bigint)'::regprocedure) d")->d; + if(!str_contains($definition,'n<>2'))throw new \LogicException('Unexpected balance contract'); + $db->unprepared(str_replace('n<>2',"n<>jsonb_array_length(j.snapshot->'lines') OR n<>(CASE WHEN j.snapshot->'source'->>'effect_type'='sales.invoice' THEN 3 ELSE 2 END)",$definition)); + $db->unprepared(<<<'SQL' +CREATE FUNCTION gl_sales_line_balance() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN PERFORM gl_assert_balanced(NEW.journal_id); RETURN NEW; END $$; +CREATE CONSTRAINT TRIGGER gl_sales_line_balance AFTER INSERT ON gl_lines DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE FUNCTION gl_sales_line_balance(); +SQL); + $db->statement('CREATE TABLE gl_sales_capability(id int PRIMARY KEY CHECK(id=1),contract text NOT NULL)');$db->table('gl_sales_capability')->insert(['id'=>1,'contract'=>'COMMON-LEDGER-SALES-RECEIVABLE-SIM-v1']); + $db->unprepared('CREATE TRIGGER gl_immutable BEFORE UPDATE OR DELETE ON gl_sales_capability FOR EACH ROW EXECUTE FUNCTION gl_append_only()'); + }); + } +} diff --git a/packages/general-ledger/src/StockComposition.php b/packages/general-ledger/src/StockComposition.php new file mode 100644 index 0000000..e9f0df6 --- /dev/null +++ b/packages/general-ledger/src/StockComposition.php @@ -0,0 +1,19 @@ +stock=new StockValuation($db,$scope,$actor,$person,$authorize,$readAuthorize);} + public function engine(?\Closure $fault=null):PayableJournal + { + LedgerSchema::assertSynthetic($this->db); + if(!$this->db->getSchemaBuilder()->hasTable('gl_stock_books'))throw new \DomainException('Composição de stock não instalada.'); + return new PayableJournal($this->db,$this->scope,$this->actor,$this->person,$this->authorize,$this->readAuthorize, + fn()=>throw new \DomainException('Reconhecimento de fornecedor não composto neste livro exclusivo.'),$fault, + fn($type,$id)=>$this->stock->source($type,$id),fn($period)=>$this->stock->period($period)); + } +} diff --git a/packages/general-ledger/src/StockSchema.php b/packages/general-ledger/src/StockSchema.php new file mode 100644 index 0000000..d25a8c4 --- /dev/null +++ b/packages/general-ledger/src/StockSchema.php @@ -0,0 +1,50 @@ +getDatabaseName(),'compras_receipts_test_')||!$db->getSchemaBuilder()->hasTable('stock_movements')||$db->getSchemaBuilder()->hasTable('gl_stock_books')||$db->table('gl_proposals')->exists()||$db->table('gl_journals')->exists())throw new \LogicException('New empty physical/valuation composition required'); + $db->transaction(function()use($db){ + $scope='tenant_id bigint NOT NULL,company_id bigint NOT NULL,unit_id bigint NOT NULL'; + $db->statement("CREATE TABLE gl_stock_books(id bigserial PRIMARY KEY,$scope,stock_item_id bigint NOT NULL REFERENCES stock_items(id),warehouse_id bigint NOT NULL REFERENCES warehouses(id),period_key text NOT NULL,unit_code text NOT NULL CHECK(unit_code='UN'),created_by bigint NOT NULL,reason text NOT NULL CHECK(length(reason)>=10),created_at timestamp NOT NULL,UNIQUE(tenant_id,stock_item_id,warehouse_id),UNIQUE(id,tenant_id,company_id,unit_id))"); + $db->statement("CREATE TABLE gl_stock_rates(id bigserial PRIMARY KEY,$scope,book_id bigint NOT NULL,version int NOT NULL CHECK(version>0),unit_minor bigint NOT NULL CHECK(unit_minor>0),currency text NOT NULL CHECK(currency='MZN'),prepared_by bigint NOT NULL,person text NOT NULL,reason text NOT NULL CHECK(length(reason)>=10),created_at timestamp NOT NULL,FOREIGN KEY(book_id,tenant_id,company_id,unit_id) REFERENCES gl_stock_books(id,tenant_id,company_id,unit_id),UNIQUE(book_id,version),UNIQUE(id,tenant_id,company_id,unit_id))"); + $db->statement("CREATE TABLE gl_stock_rate_reviews(id bigserial PRIMARY KEY,$scope,rate_id bigint NOT NULL UNIQUE,decision text NOT NULL CHECK(decision IN('approved','rejected')),reviewed_by bigint NOT NULL,person text NOT NULL,reason text NOT NULL CHECK(length(reason)>=10),created_at timestamp NOT NULL,FOREIGN KEY(rate_id,tenant_id,company_id,unit_id) REFERENCES gl_stock_rates(id,tenant_id,company_id,unit_id))"); + $db->statement("CREATE TABLE gl_stock_commands(id bigserial PRIMARY KEY,$scope,actor_id bigint NOT NULL,command_key uuid NOT NULL,request_hash char(64) NOT NULL,result jsonb NOT NULL,created_at timestamp NOT NULL,UNIQUE(tenant_id,company_id,unit_id,actor_id,command_key))"); + foreach(['gl_stock_books','gl_stock_rates','gl_stock_rate_reviews','gl_stock_commands']as$t)$db->unprepared("CREATE TRIGGER gl_immutable BEFORE UPDATE OR DELETE ON $t FOR EACH ROW EXECUTE FUNCTION gl_append_only()"); + $db->unprepared(<<<'SQL' +CREATE FUNCTION gl_stock_scope() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN + IF TG_TABLE_NAME='gl_stock_books' THEN + IF NOT EXISTS(SELECT 1 FROM stock_items i JOIN warehouses w ON w.tenant_id=i.tenant_id WHERE i.id=NEW.stock_item_id AND w.id=NEW.warehouse_id AND i.tenant_id=NEW.tenant_id AND i.unit=NEW.unit_code) THEN RAISE EXCEPTION 'GL_STOCK_SCOPE'; END IF; + ELSE + IF NOT EXISTS(SELECT 1 FROM gl_stock_rates r WHERE r.id=NEW.rate_id AND (r.tenant_id,r.company_id,r.unit_id)=(NEW.tenant_id,NEW.company_id,NEW.unit_id) AND r.prepared_by<>NEW.reviewed_by AND r.person<>NEW.person) THEN RAISE EXCEPTION 'GL_STOCK_DISTINCT_REVIEW'; END IF; + END IF; RETURN NEW; END $$; +CREATE TRIGGER gl_stock_book_scope BEFORE INSERT ON gl_stock_books FOR EACH ROW EXECUTE FUNCTION gl_stock_scope(); +CREATE TRIGGER gl_stock_review_scope BEFORE INSERT ON gl_stock_rate_reviews FOR EACH ROW EXECUTE FUNCTION gl_stock_scope(); +CREATE UNIQUE INDEX gl_stock_movement_once ON gl_journals(tenant_id,(snapshot->'source'->>'stock_movement_id')) WHERE snapshot->'source'->>'effect_type' IN('stock.receipt','stock.issue','stock.return'); +CREATE FUNCTION gl_stock_journal_assert() RETURNS trigger LANGUAGE plpgsql AS $$ +DECLARE s jsonb; expected text[]; k text; BEGIN + s:=NEW.snapshot->'source'; k:=s->>'effect_type'; + IF k NOT LIKE 'stock.%' THEN RETURN NEW; END IF; + expected:=CASE k WHEN 'stock.receipt' THEN ARRAY['QA-STOCK','QA-COMPENSACAO-STOCK'] WHEN 'stock.issue' THEN ARRAY['QA-CONSUMO-STOCK','QA-STOCK'] WHEN 'stock.return' THEN ARRAY['QA-STOCK','QA-CONSUMO-STOCK'] ELSE NULL END; + IF expected IS NULL OR NEW.snapshot->'rule'->>'policy'<>'QA-STOCK-VALUATION-v1' OR NEW.snapshot->'rule'->>'effect_type'<>k + OR NEW.snapshot->'lines'->0->>'account_code'<>expected[1] OR NEW.snapshot->'lines'->1->>'account_code'<>expected[2] + OR NOT EXISTS(SELECT 1 FROM gl_stock_books b JOIN stock_movements m ON m.tenant_id=b.tenant_id AND m.stock_item_id=b.stock_item_id AND m.warehouse_id=b.warehouse_id JOIN gl_stock_rates r ON r.book_id=b.id JOIN gl_stock_rate_reviews v ON v.rate_id=r.id + WHERE b.id=(s->>'stock_book_id')::bigint AND m.id=(s->>'stock_movement_id')::bigint AND m.id=(s->>'source_id')::bigint AND NEW.obligation_id=m.id + AND (b.tenant_id,b.company_id,b.unit_id)=(NEW.tenant_id,NEW.company_id,NEW.unit_id) AND b.period_key=NEW.snapshot->'period'->>'period_key' + AND r.id=(s->>'stock_rate_id')::bigint AND r.id=(SELECT max(rr.id) FROM gl_stock_rates rr WHERE rr.book_id=b.id) + AND v.decision='approved' AND v.reviewed_by<>r.prepared_by AND v.person<>r.person + AND abs(m.quantity_milli)*r.unit_minor=NEW.debit_minor::numeric*1000 AND m.quantity_milli=(s->>'stock_quantity_milli')::numeric + AND m.moved_at::date=NEW.journal_on AND m.movement_type=CASE k WHEN 'stock.receipt' THEN 'receipt_in' WHEN 'stock.issue' THEN 'issue' WHEN 'stock.return' THEN 'workshop_return_in' END + AND NOT EXISTS(SELECT 1 FROM stock_movements pm WHERE pm.tenant_id=b.tenant_id AND pm.stock_item_id=b.stock_item_id AND pm.warehouse_id=b.warehouse_id AND pm.id'source'->>'stock_movement_id')::bigint=pm.id AND (pj.snapshot->'source'->>'stock_book_id')::bigint=b.id))) + THEN RAISE EXCEPTION 'GL_STOCK_JOURNAL_SOURCE_OR_LINES' USING ERRCODE='23514'; END IF; + RETURN NEW; END $$; +CREATE CONSTRAINT TRIGGER gl_stock_journal AFTER INSERT ON gl_journals DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE FUNCTION gl_stock_journal_assert(); +SQL); + }); + } +} diff --git a/packages/general-ledger/src/StockValuation.php b/packages/general-ledger/src/StockValuation.php new file mode 100644 index 0000000..080caf3 --- /dev/null +++ b/packages/general-ledger/src/StockValuation.php @@ -0,0 +1,166 @@ +'stock.receipt','issue'=>'stock.issue','workshop_return_in'=>'stock.return']; + public function __construct(private ConnectionInterface $db,private array $scope,private int $actor,private string $person,private \Closure $authorize,private \Closure $readAuthorize){} + private function q(string $name){return $this->db->table('gl_stock_'.$name)->where($this->scope);} + private function hash(mixed $v):string{return hash('sha256',Payables::canonical($v));} + private function ready():void{ + LedgerSchema::assertSynthetic($this->db);($this->readAuthorize)(); + if(!$this->db->getSchemaBuilder()->hasTable('gl_stock_books'))throw new \DomainException('Valorização de stock não composta.'); + if($this->db->table('gl_journals')->where($this->scope)->whereIn('snapshot->source->effect_type',['workshop.direct_cost.validated','industry.cost.validated'])->exists())throw new \DomainException('Livro exclusivo: custos directos/industriais já reconhecidos; não duplicar material.'); + } + private function book(int $id):object{return $this->q('books')->where('id',$id)->first()??throw new \DomainException('Livro de stock fora do contexto.');} + private function movements(object $book){return $this->db->table('stock_movements')->where(['tenant_id'=>$this->scope['tenant_id'],'stock_item_id'=>$book->stock_item_id,'warehouse_id'=>$book->warehouse_id]);} + private function priorJournals(object $book,object $movement,object $rate):array + { + if($this->db->transactionLevel()===0)return $this->db->transaction(function()use($book,$movement,$rate){ + $this->db->statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY'); + return $this->priorJournals($book,$movement,$rate); + }); + // No list of all movement IDs, and no transfer of prior full snapshots. + $prior=$this->movements($book)->where('id','<',$movement->id); + $count=(clone $prior)->count();if($count===0)return []; + $qualified=[];foreach($this->scope as$key=>$value)$qualified['j.'.$key]=$value; + $valued=$this->db->table('gl_journals as j')->join('stock_movements as pm',function($join)use($book,$movement){ + $join->on('pm.tenant_id','=','j.tenant_id')->where('pm.stock_item_id',$book->stock_item_id)->where('pm.warehouse_id',$book->warehouse_id) + ->where('pm.id','<',$movement->id)->whereRaw(<<<'SQL' +pm.id=CASE WHEN (j.snapshot->'source'->>'stock_movement_id') ~ '^[1-9][0-9]{0,18}$' + AND (length(j.snapshot->'source'->>'stock_movement_id')<19 OR (j.snapshot->'source'->>'stock_movement_id')<='9223372036854775807') + THEN (j.snapshot->'source'->>'stock_movement_id')::bigint ELSE NULL END +SQL); + })->where($qualified)->where('j.snapshot->source->stock_book_id',$book->id); + if((clone $valued)->count()!==$count)throw new \DomainException('Contabilize primeiro os movimentos físicos anteriores deste livro; entrada, saída e devolução mantêm as suas origens.'); + $metadata=(clone $valued)->select(['j.id','j.source_revision'])->selectRaw("j.snapshot->'source'->'stock_movement_id' movement_value,j.snapshot->'source'->'stock_rate_id' rate_value,j.snapshot->'source'->>'stock_fact_revision' fact_revision"); + $seen=0;$first=[];$hash=hash_init('sha256');$cursor='stock_prefix_'.bin2hex(random_bytes(8));$query=$metadata->orderBy('j.id'); + // A server cursor executes the prefix query once; PDO receives at most one batch. + $this->db->statement('DECLARE '.$cursor.' NO SCROLL CURSOR FOR '.$query->toSql(),$query->getBindings());$error=null; + try{while($seen<$count){ + $rows=$this->db->select('FETCH FORWARD 500 FROM '.$cursor); + if($rows===[])throw new \DomainException('Dependências alteradas durante a leitura; confira novamente.'); + foreach($rows as $row){ + $rateValue=json_decode($row->rate_value??'null',true,2,JSON_THROW_ON_ERROR);$movementValue=json_decode($row->movement_value??'null',true,2,JSON_THROW_ON_ERROR); + if($rateValue!==$rate->id)throw new \DomainException('Origem anterior valorizada com outra taxa; correcção fora deste recorte.'); + if(!preg_match('/^[a-f0-9]{64}$/D',$row->source_revision)||!preg_match('/^[a-f0-9]{64}$/D',$row->fact_revision??''))throw new \DomainException('Referência contabilística anterior incompleta.'); + $ref=['journal_id'=>$row->id,'source_revision'=>$row->source_revision,'movement_id'=>$movementValue,'fact_revision'=>$row->fact_revision]; + // Flat canonical frame: avoid allocating a recursive sorting closure per row. + $frame=['fact_revision'=>$row->fact_revision,'journal_id'=>$row->id,'movement_id'=>$movementValue,'source_revision'=>$row->source_revision]; + hash_update($hash,json_encode($frame,JSON_UNESCAPED_UNICODE|JSON_THROW_ON_ERROR)."\n");if($seen<25)$first[]=$ref;$seen++; + } + unset($rows,$row); + }}catch(\Throwable $e){$error=$e;throw $e;}finally{try{$this->db->statement('CLOSE '.$cursor);}catch(\Throwable $close){if($error===null)throw $close;}} + if($seen!==$count)throw new \DomainException('Dependências alteradas durante a leitura; confira novamente.'); + // Preserve existing small-book source fingerprints byte-for-byte. + if($count<=25)return $first; + return ['format'=>'STOCK-PRIOR-STREAM-v1','count'=>$count,'sha256'=>hash_final($hash),'first_references'=>$first,'omitted_references'=>$count-count($first)]; + } + public function command(string $action,array $data,string $key):array + { + if(!in_array($action,['rate-prepare','rate-validate'],true)||!preg_match('/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/Di',$key))throw new \InvalidArgumentException('Acção/chave inválida.'); + $keys=$action==='rate-prepare'?['book_id','version','unit_minor','reason']:['rate_id','version','decision','reason'];$a=array_keys($data);sort($a);sort($keys); + if($a!==$keys||!is_string($data['reason'])||strlen(trim($data['reason']))<10||strlen($data['reason'])>4000)throw new \InvalidArgumentException('Campos/fundamento inválidos.'); + return $this->db->transaction(function()use($action,$data,$key){ + ($this->authorize)($action==='rate-prepare'?'prepare':'validate');$this->ready(); + $hash=$this->hash([$action,$data]);$old=$this->q('commands')->where(['actor_id'=>$this->actor,'command_key'=>$key])->first(); + if($old){if($old->request_hash!==$hash)throw new \DomainException('Chave já usada com outro conteúdo.');return json_decode($old->result,true)+['replayed'=>true];} + if($action==='rate-prepare'){ + if(!is_int($data['book_id'])||!is_int($data['version'])||!is_int($data['unit_minor'])||$data['unit_minor']<=0||$data['unit_minor']>100000000)throw new \InvalidArgumentException('Taxa/versão inválida.'); + $b=$this->book($data['book_id']);$this->q('books')->where('id',$b->id)->lockForUpdate()->first(); + if($this->db->table('gl_journals')->where($this->scope)->where('snapshot->source->stock_book_id',$b->id)->exists())throw new \DomainException('Correcção de taxa após lançamento fora deste recorte.'); + $last=$this->q('rates')->where('book_id',$b->id)->max('version')??0;if((int)$last!==$data['version'])throw new \DomainException('Taxa alterada; confira a versão actual.'); + $id=$this->db->table('gl_stock_rates')->insertGetId($this->scope+['book_id'=>$b->id,'version'=>$last+1,'unit_minor'=>$data['unit_minor'],'currency'=>'MZN','prepared_by'=>$this->actor,'person'=>$this->person,'reason'=>$data['reason'],'created_at'=>date('Y-m-d H:i:s')]);$out=['rate_id'=>$id,'version'=>$last+1]; + }else{ + if(!is_int($data['rate_id'])||!is_int($data['version'])||!in_array($data['decision'],['approved','rejected'],true))throw new \InvalidArgumentException('Decisão de taxa inválida.'); + $rate=$this->q('rates')->where('id',$data['rate_id'])->first()??throw new \DomainException('Taxa fora do contexto.'); + if($rate->version!==$data['version']||$this->q('rates')->where('book_id',$rate->book_id)->max('version')!==$rate->version)throw new \DomainException('Taxa desactualizada.'); + if($rate->prepared_by===$this->actor||$rate->person===$this->person)throw new \DomainException('Revisão da taxa exige pessoa distinta.'); + if($this->q('rate_reviews')->where('rate_id',$rate->id)->exists())throw new \DomainException('Taxa já decidida.'); + $review=$this->db->table('gl_stock_rate_reviews')->insertGetId($this->scope+['rate_id'=>$rate->id,'decision'=>$data['decision'],'reviewed_by'=>$this->actor,'person'=>$this->person,'reason'=>$data['reason'],'created_at'=>date('Y-m-d H:i:s')]);$out=['rate_id'=>$rate->id,'review_id'=>$review,'decision'=>$data['decision']]; + } + $this->db->table('gl_stock_commands')->insert($this->scope+['actor_id'=>$this->actor,'command_key'=>$key,'request_hash'=>$hash,'result'=>Payables::canonical($out),'created_at'=>date('Y-m-d H:i:s')]);return $out+['replayed'=>false]; + }); + } + public function source(string $kind,int $id):array + { + $this->ready();if(!in_array($kind,self::TYPES,true))throw new \DomainException('Tipo físico não suportado.'); + $m=$this->db->table('stock_movements')->where(['tenant_id'=>$this->scope['tenant_id'],'id'=>$id])->first()??throw new \DomainException('Movimento físico fora do contexto.'); + $b=$this->q('books')->where(['stock_item_id'=>$m->stock_item_id,'warehouse_id'=>$m->warehouse_id])->first()??throw new \DomainException('Artigo/armazém não composto neste contexto.'); + if((self::TYPES[$m->movement_type]??null)!==$kind||(int)$m->quantity_milli===0||($kind==='stock.issue')!==((int)$m->quantity_milli<0))throw new \DomainException('Tipo/sinal físico incompatível.'); + $rate=$this->q('rates')->where('book_id',$b->id)->orderByDesc('version')->first();$review=$rate?$this->q('rate_reviews')->where('rate_id',$rate->id)->first():null; + if(!$rate||!$review||$review->decision!=='approved'||$review->reviewed_by===$rate->prepared_by||$review->person===$rate->person)throw new \DomainException('Taxa actual completa e validada distintamente obrigatória.'); + $item=$this->db->table('stock_items')->where(['tenant_id'=>$this->scope['tenant_id'],'id'=>$m->stock_item_id])->first(); + $warehouse=$this->db->table('warehouses')->where(['tenant_id'=>$this->scope['tenant_id'],'id'=>$m->warehouse_id])->first(); + if(!$item||!$warehouse||$item->unit!==$b->unit_code||$b->unit_code!=='UN')throw new \DomainException('Unidade/artigo/armazém incompatível.'); + $snapshot=json_decode($m->snapshot,true,128,JSON_THROW_ON_ERROR);$dependencies=[]; + if($kind==='stock.receipt'){ + $line=$this->db->table('goods_receipt_items')->where(['tenant_id'=>$this->scope['tenant_id'],'id'=>$m->goods_receipt_item_id])->first(); + $receipt=$line?$this->db->table('goods_receipts')->where(['tenant_id'=>$this->scope['tenant_id'],'id'=>$line->goods_receipt_id])->first():null; + if(!$line||!$receipt||$receipt->confirmed_at===null||$receipt->warehouse_id!==$m->warehouse_id||$receipt->received_by!==$m->moved_by||$line->stock_item_id!==$m->stock_item_id||(int)$line->accepted_milli!==(int)$m->quantity_milli||!preg_match('/^[a-f0-9]{64}$/D',$snapshot['inventory_source_hash']??''))throw new \DomainException('Recepção original incompatível.'); + $dependencies=['line'=>(array)$line,'receipt'=>(array)$receipt]; + }else{ + $operation=$this->db->table('stock_operations')->where(['tenant_id'=>$this->scope['tenant_id'],'id'=>$m->stock_operation_id])->first(); + if(!$operation||$operation->stock_item_id!==$m->stock_item_id||$operation->warehouse_id!==$m->warehouse_id||(int)$operation->quantity_milli!==abs((int)$m->quantity_milli)||$operation->created_by!==$m->moved_by)throw new \DomainException('Operação física incompatível.'); + $dependencies=['operation'=>(array)$operation]; + if($kind==='stock.issue'){ + if($operation->kind!=='issue'||!preg_match('/^[a-f0-9]{64}$/D',$snapshot['inventory_operation_hash']??''))throw new \DomainException('Saída original incompleta.'); + }else{ + $parentId=$snapshot['delivery_movement_id']??null;$parent=is_int($parentId)?$this->movements($b)->where('id',$parentId)->first():null; + $total=$this->movements($b)->where('movement_type','workshop_return_in')->where('snapshot->delivery_movement_id',$parentId)->sum('quantity_milli'); + if(!$parent||$parent->movement_type!=='issue'||$operation->kind!=='workshop_return'||!($snapshot['received_in_warehouse']??false)||$total>abs((int)$parent->quantity_milli)||!preg_match('/^[a-f0-9]{64}$/D',$snapshot['inventory_return_hash']??''))throw new \DomainException('Devolução sem saída original/limite/recepção física.'); + $declaration=$this->db->table('supply_records')->where(['tenant_id'=>$this->scope['tenant_id'],'id'=>$snapshot['declaration_id']??0])->first(); + $confirmation=$declaration?$this->db->table('supply_records')->where(['tenant_id'=>$this->scope['tenant_id'],'record_key'=>$declaration->record_key,'version'=>2,'state'=>'confirmed'])->first():null; + if(!$declaration||!$confirmation||$declaration->created_by===$confirmation->created_by||$confirmation->created_by!==$m->moved_by)throw new \DomainException('Devolução sem conferência distinta.'); + $dependencies+=['parent'=>(array)$parent,'declaration'=>(array)$declaration,'confirmation'=>(array)$confirmation]; + } + } + try{$amount=BigRational::of((string)abs((int)$m->quantity_milli))->multipliedBy($rate->unit_minor)->dividedBy(1000)->toBigInteger()->toInt();}catch(\Throwable $e){throw new \DomainException('Valor não representável em cêntimos exactos.',0,$e);} + if($amount<=0)throw new \DomainException('Valorização positiva obrigatória.'); + $journalDependencies=$this->priorJournals($b,$m,$rate); + $evidence=['book'=>(array)$b,'movement'=>(array)$m,'item'=>(array)$item,'warehouse'=>(array)$warehouse,'rate'=>(array)$rate,'review'=>(array)$review,'dependencies'=>$dependencies,'prior_journals'=>$journalDependencies]; + $book=$this->movements($b)->selectRaw('coalesce(max(id),0) revision,count(*) records,coalesce(sum(quantity_milli),0) quantity')->first(); + $fact=$this->hash($evidence); + return ['effect_type'=>$kind,'source_id'=>$id,'obligation_id'=>$id,'origin_key'=>$this->hash(['physical_database'=>$this->db->getDatabaseName(),'tenant'=>$this->scope['tenant_id'],'movement'=>$id]),'recognition_revision'=>$this->hash([$evidence,(array)$book]),'stock_fact_revision'=>$fact,'principal_minor'=>$amount,'currency'=>'MZN','tax_minor'=>0,'compatible'=>true,'history_imported'=>false,'stock_book_id'=>$b->id,'stock_movement_id'=>$id,'stock_movement_on'=>substr($m->moved_at,0,10),'stock_quantity_milli'=>(int)$m->quantity_milli,'stock_rate_id'=>$rate->id,'permitted_period_key'=>$b->period_key,'stock_evidence'=>$evidence,'physical_book'=>(array)$book]; + } + public function period(array $period):array + { + if($this->db->transactionLevel()===0)return $this->db->transaction(function()use($period){ + $this->db->statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY'); + return $this->period($period); + }); + $this->ready();$facts=0;$pending=0;$h=hash_init('sha256'); + foreach($this->q('books')->where('period_key',$period['period_key'])->lazyById(100)as$b){ + hash_update($h,Payables::canonical((array)$b)); + foreach($this->q('rates')->where('book_id',$b->id)->lazyById(100)as$r){hash_update($h,Payables::canonical((array)$r));foreach($this->q('rate_reviews')->where('rate_id',$r->id)->lazyById(100)as$v)hash_update($h,Payables::canonical((array)$v));} + $this->movements($b)->whereDate('moved_at','>=',$period['starts_on'])->whereDate('moved_at','<=',$period['ends_on'])->chunkById(100,function($batch)use(&$facts,&$pending,$h){ + // Only one projected status per physical fact; no prior full snapshots. + $posted=$this->db->table('gl_journals')->where($this->scope)->whereIn('snapshot->source->stock_movement_id',$batch->pluck('id')->all()) + ->selectRaw("DISTINCT ON (snapshot->'source'->>'stock_movement_id') snapshot->'source'->>'stock_movement_id' movement_id,snapshot->'source'->'stock_fact_revision' fact_revision") + ->orderByRaw("snapshot->'source'->>'stock_movement_id',id")->get()->keyBy('movement_id'); + foreach($batch as$m){ + $facts++;hash_update($h,Payables::canonical((array)$m)); + try{$s=$this->source(self::TYPES[$m->movement_type]??'',(int)$m->id);hash_update($h,$s['stock_fact_revision']);$j=$posted->get($m->id);if(!$j||json_decode($j->fact_revision??'null',true)!==$s['stock_fact_revision'])$pending++;}catch(\DomainException){$pending++;} + } + }); + } + return ['facts'=>$facts,'pending'=>$pending,'hash'=>hash_final($h)]; + } + public function page(int $bookId,int $page=1,int $perPage=25):array + { + $this->ready();if($page<1||$page>100000||!in_array($perPage,[25,100],true))throw new \InvalidArgumentException('Página inválida.');$b=$this->book($bookId);$q=$this->movements($b);$count=(clone$q)->count();$rows=[]; + foreach($q->orderBy('id')->offset(($page-1)*$perPage)->limit($perPage)->get()as$m){$row=['movement'=>(array)$m,'source'=>null,'pending'=>null];try{$row['source']=$this->source(self::TYPES[$m->movement_type]??'',(int)$m->id);}catch(\DomainException $e){$row['pending']=$e->getMessage();}$rows[]=$row;} + $rates=$this->q('rates')->where('book_id',$b->id)->orderByDesc('version')->limit(25)->get();$reviews=$this->q('rate_reviews')->whereIn('rate_id',$rates->pluck('id')->all())->get()->keyBy('rate_id');foreach($rates as$r)$r->review=$reviews->get($r->id); + return ['book'=>(array)$b,'rows'=>$rows,'pagination'=>['page'=>$page,'per_page'=>$perPage,'total'=>$count],'rates'=>$rates->all(),'physical_balance_milli'=>(int)$this->movements($b)->sum('quantity_milli'),'does_not_move_stock'=>true]; + } + public function receipt(string $key):?array + { + $this->ready();if(!preg_match('/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/Di',$key))throw new \InvalidArgumentException('Chave inválida.'); + $r=$this->q('commands')->where(['actor_id'=>$this->actor,'command_key'=>$key])->first();return $r?['command_key'=>$r->command_key,'request_hash'=>$r->request_hash,'created_at'=>$r->created_at,'result'=>json_decode($r->result,true),'historical_receipt_only'=>true,'operation_executed'=>false]:null; + } +} diff --git a/packages/general-ledger/src/StockWorkspace.php b/packages/general-ledger/src/StockWorkspace.php new file mode 100644 index 0000000..1eb31d8 --- /dev/null +++ b/packages/general-ledger/src/StockWorkspace.php @@ -0,0 +1,7 @@ +htmlspecialchars((string)$v,ENT_QUOTES|ENT_SUBSTITUTE,'UTF-8'); +$money=static fn($v)=>($v<0?'-':'').number_format(intdiv(abs($v),100),0,',',' ').','.str_pad((string)(abs($v)%100),2,'0',STR_PAD_LEFT).' MZN'; +$reason=static function(){echo '';}; +$dates=static function(){echo '';}; +$reports=class_exists(\Tempo\Finance\GeneralLedger\ReportsWorkspace::class)?'

Balancete e razão por conta — Outubro de 2026 (QA)

':''; + +$hidden=static function($name,$value)use($e){echo '';}; +?>Ciclo contabilístico sintético
+
Voltar à aplicação

— ciclo contabilístico QA

Exclusivamente sintético: principal60, afectação20, reversão integral e correcção técnica sem alterar a dívida. Contas e período artificiais. Sem execução monetária, fiscalidade real ou reabertura.

Trocar função sintética

Preparação, revisão independente e aplicação são decisões separadas. Os totais contabilísticos incluem os estornos; saldo financeiro não é soma bruta dos lançamentos.

+

1. Reconhecimento contabilístico da obrigação

Obrigações financeiras reconhecidas desta página; preparar não volta a reconhecer a dívida.

+

2. Afectações e reversões financeiras confirmadas

Um pagamento sem afectação confirmada não é origem deste lançamento. O principal da obrigação e o montante afectado permanecem distintos.

['allocation.confirmed','QA-ALLOCATION'],'reversals'=>['allocation.reversed','QA-REVERSAL']] as $name=>[$type,$rule]): ?>

#id ?> · Obrigação #obligation_id ?> · amount_minor) ?>

Evidência financeira confirmada
id);$hidden('rule_key',$rule);$dates();$reason(); ?>
+

3. Propostas, impacto e revisão exacta

snapshot,true);$kind=$snapshot['source']['effect_type'];$correct=in_array($kind,['journal.reversal','journal.replacement','workshop.direct_cost.reversal','workshop.direct_cost.replacement','industry.cost.reversal','industry.cost.replacement'],true);$review=null;foreach($data['book']['reviews'] as $r)if($r->proposal_id===$p->id)$review=$r; ?>

Proposta #id ?> · · Obrigação #obligation_id ?>

Impacto débito/crédito · versão revision) ?> · autor #prepared_by ?>

  • D / C
Fotografia original, regra e período

reason) ?> · decision):'Revisão pendente' ?>journal_id?' · Aplicada no lançamento #'.$p->journal_id:'' ?>

+
id);$hidden('revision',$p->revision); ?>
+decision==='approved'&&!$p->journal_id): ?>
id);$hidden('revision',$p->revision);$reason(); ?>

Esta proposta só pode ser aplicada com o par de correcção abaixo.

+

4. Correcção técnica por par indivisível

O original mantém-se. Estorno60 e substituição60 são revistos e aplicados juntos; não alteram principal, imposto ou moeda.

+correction_id===$c->id)$result=$r; ?>

Correcção #id ?> do original #original_journal_id ?>

Propostas #reverse_proposal_id ?> e #replacement_proposal_id ?> · revisão revision) ?>

reason) ?>

Impacto exacto dos dois lançamentos
reverse_snapshot) ?>
replacement_snapshot) ?>

Par aplicado: lançamentos #reverse_journal_id ?> / #replacement_journal_id ?>.

+
id);$hidden('revision',$c->revision); ?>
+
id);$hidden('revision',$c->revision);$reason(); ?>
+

5. Conferência e fecho do período QA

Reconhecimentos, afectações e reversões confirmados sem contabilização ou propostas necessárias não resolvidas impedem o fecho. Mudança de evidência exige nova conferência. Não existe comando de reabertura.

period_key) ?> vversion ?> · status) ?> · reason) ?>

+
+check_id===$c->id)$closed=$r; ?>

Conferência #id ?> · period_key) ?>

Versão revision) ?> · autor #prepared_by ?> · reason) ?>

snapshot) ?>
check_id===$c->id): ?>

decision) ?> por #actor_id ?> · reason) ?>

+

Fecho #id ?> · nova versão period_version ?> · created_at) ?>

+
id);$hidden('revision',$c->revision); ?>
+
id);$hidden('revision',$c->revision);$reason(); ?>
+

Diário, extracto e histórico

Débitos · Créditos .

Lançamento #id ?> · Obrigação #obligation_id ?> · D/C debit_minor) ?>

Preparação #proposal_id ?> · revisão #review_id ?> · aplicador #posted_by ?> · reason) ?> · created_at) ?>

snapshot) ?>
#id ?> · kind) ?> · autor #actor_id ?> · created_at) ?>

reason) ?>

previous) ?>
subsequent) ?>
+ +
diff --git a/packages/general-ledger/ui/reports.php b/packages/general-ledger/ui/reports.php new file mode 100644 index 0000000..813070d --- /dev/null +++ b/packages/general-ledger/ui/reports.php @@ -0,0 +1,17 @@ +htmlspecialchars((string)$v,ENT_QUOTES|ENT_SUBSTITUTE,'UTF-8'); +$money=static fn($v)=>($v<0?'-':'').number_format(intdiv(abs($v),100),0,',',' ').','.str_pad((string)(abs($v)%100),2,'0',STR_PAD_LEFT); +$query=$data['query'];$detail=$data['kind']==='account_ledger';$base='/general-ledger/'.($detail?'account-ledger':'trial-balance'); +$url=static fn($path,$changes=[])=>$path.'?'.http_build_query(array_replace($query,$changes)); +?><?= $detail?'Razão por conta':'Balancete' ?> de ensaio
+
Voltar ao diário

— de ensaio

Exclusivamente sintético. Contas artificiais, MZN. Consulta de lançamentos aplicados; não constitui demonstração financeira legal nem saldo por liquidar.

Datas inclusivas. Abertura: lançamentos anteriores ao início. Movimentos: intervalo seleccionado. Fecho: abertura mais movimentos. Propostas ainda sem lançamento não entram nos montantes.

+
+

Voltar ao balancete completo do intervalo

—

Abertura D−C · Fecho D−C MZN

+

Movimentos de todo o filtro: débitos · créditos MZN. Totais independentes da página.

+

Abertura: D / C · Fecho: D / C MZN.

+
+
Contas com lançamentos até ao fim do intervalo
ContaAbertura D−CDébitosCréditosFecho D−C

Linhas aplicadas e saldo acumulado por data, lançamento e linha
Data / evidênciaDébitoCréditoSaldo D−C
· lançamento # / linha

Proposta # · revisão # · aplicador # ·

Versão da fonte

Conferir lote, resultado e decisõesConferir ordem, custo e decisõesConferir origem comercial e financeira

Obrigação de origem #; a fotografia completa permanece no diário.

+

Sem linhas nesta página.

+
+

Base da consulta

Tenant # · empresa # · unidade #. Até : lançamentos; último identificador #.

O marcador identifica o estado append-only consultado; uma inserção posterior, mesmo retrodatada, gera outro estado. Não é aprovação de fecho nem uma fotografia persistida do relatório.

+
diff --git a/packages/general-ledger/ui/stock.php b/packages/general-ledger/ui/stock.php new file mode 100644 index 0000000..820b5cf --- /dev/null +++ b/packages/general-ledger/ui/stock.php @@ -0,0 +1,27 @@ +htmlspecialchars((string)$v,ENT_QUOTES|ENT_SUBSTITUTE,'UTF-8');$json=static fn($v)=>json_encode($v,JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR); +$money=static fn($v)=>($v<0?'-':'').intdiv(abs($v),100).','.str_pad((string)(abs($v)%100),2,'0',STR_PAD_LEFT); +$can=fn($a)=>in_array($a,$settings['can'],true);$actor=$settings['actor_id'];$open=($data['cycle']['periods'][0]->status??null)==='open'; +$form=function($action,$body,$label)use($e,$json){echo '
';}; +?>Stock e valorização QA
+
Voltar aos percursos QA

Stock físico → valorização → diário

Exclusivamente sintético. Taxa de ensaio, contas artificiais e MZN. Conferir o impacto não move quantidades nem cria obrigação ou pagamento.

Livro · artigo · armazém · unidade · período ·

Balancete · Razão de stock

+

+

Taxa por UN, com revisão distinta

A última versão tem de estar aprovada. Uma taxa ausente ou uma sucessora pendente deixa a valorização incompleta. Correcção após lançamento não faz parte deste ensaio.

+
+

Versãoversion) ?> · unit_minor)) ?> MZN/UN · autorprepared_by) ?> · review->decision??'pendente de revisão') ?> · reason) ?>

review&&$can('validate')&&$r->prepared_by!==$actor){foreach(['approved'=>'Aprovar taxa','rejected'=>'Recusar taxa']as$decision=>$label)$form('rate-validate',['rate_id'=>$r->id,'version'=>$r->version,'decision'=>$decision],$label);} ?>
+

Movimentos efectivos e dependências

Saldo físico: milésimos de UN. Cada movimento é conferido individualmente; não há valorização em lote.

+
OrigemQuantidade em milésimosValor MZNConferência
#
Versões e dependências actuais
$source['effect_type'],'source_id'=>$m['id'],'journal_on'=>$source['stock_movement_on'],'period_key'=>$source['permitted_period_key'],'rule_key'=>$source['effect_type']],'Preparar conferência deste movimento'); ?>
+
+

Propostas e impacto contabilístico

Conferir débito/crédito, origem, taxa, dependências e versão antes de decidir. A aplicação volta a validar o estado actual.

+snapshot,true);$review=collect($data['ledger']['reviews'])->firstWhere('proposal_id',$p->id); ?>

Propostaid) ?> · capturacapture_version) ?>

Origem · autorprepared_by) ?> · decision??'sem revisão') ?>journal_id?' · lançamento #'.$e($p->journal_id):'' ?>

  • : débito / crédito MZN
Fotografia completa da conferência
+journal_id&&!$review&&$can('validate')&&$p->prepared_by!==$actor){foreach(['approved'=>'Aprovar esta versão','rejected'=>'Recusar esta versão']as$decision=>$label)$form('validate',['proposal_id'=>$p->id,'revision'=>$p->revision,'decision'=>$decision],$label);}if($open&&!$p->journal_id&&($review->decision??null)==='approved'&&$can('post')&&$p->prepared_by===$actor)$form('post',['proposal_id'=>$p->id,'revision'=>$p->revision],'Aplicar exactamente este impacto'); ?>
+

Conferência e fecho do período QA

$data['stock']['book']['period_key']],'Preparar conferência do período'); ?> +firstWhere('check_id',$c->id); ?>

Conferênciaid) ?> · autorprepared_by) ?> · decision??'pendente') ?>

Factos e impacto do fecho
snapshot) ?>
prepared_by!==$actor)$form('period-validate',['check_id'=>$c->id,'revision'=>$c->revision,'decision'=>'approved'],'Aprovar conferência exacta do período');if($open&&($r->decision??null)==='approved'&&$can('period_close')&&$c->prepared_by===$actor)$form('period-close',['check_id'=>$c->id,'revision'=>$c->revision],'Confirmar fecho QA'); ?>
+

Recuperar comprovativo sem executar

Uma resposta perdida não autoriza repetição automática. Consulte a chave do pedido no domínio certo; ausência de comprovativo não prova falha.

+ +
diff --git a/packages/payables/bootstrap.php b/packages/payables/bootstrap.php index ccbcf37..185af96 100644 --- a/packages/payables/bootstrap.php +++ b/packages/payables/bootstrap.php @@ -1,8 +1,10 @@ scope||($source!==$this->source&&$source!==($this->source+['revision'=>Payables::revision($this->source),'missing'=>Payables::missing($this->source)])))throw new \DomainException('Captura histórica fora da origem, versão ou contexto da janela.'); + return $this->capture; + } +} diff --git a/packages/payables/src/Payables.php b/packages/payables/src/Payables.php index cfdf072..f18c7b9 100644 --- a/packages/payables/src/Payables.php +++ b/packages/payables/src/Payables.php @@ -10,7 +10,8 @@ final class Payables public const VERSION = 'COMMON-PAYABLE-SOURCE-SIM-v1'; public function __construct(private ConnectionInterface $db, private int $actor, private string $person, private array $scope, - private \Closure $authorize, private \Closure $loadSource, private ?\Closure $loadHistory = null, private ?\Closure $authorizeRead = null) {} + private \Closure $authorize, private \Closure $loadSource, private ?\Closure $loadHistory = null, private ?\Closure $authorizeRead = null, + private ?\Closure $authorizeSettlementRead = null) {} public static function canonical(array $data): string { @@ -129,7 +130,12 @@ final class Payables throw new \DomainException('Passagem de histórico não activada nesta instalação.'); } - return HistoricalPayments::capture($source, ($this->loadHistory)($source['local_id'])); + $history = ($this->loadHistory)($source['local_id']); + if ($history instanceof HistoricalCapture) { + if (! $availabilityChecked) throw new \DomainException('Capturas de janela são apenas de leitura; comandos exigem histórico actual.'); + return $history->forSource($this->scope, $source); + } + return HistoricalPayments::capture($source, $history); } private function eligibility(array $source, bool $historical): array @@ -176,6 +182,10 @@ final class Payables $compatible ? [] : ['Origem ou histórico divergente; saldo não presumido.'])]; } + public function receipt(string $key):?array + { + return ReceiptReader::read($this->db,'recognition',$this->scope,$this->actor,$key,$this->authorizeRead); + } public function settlements(): SupplierSettlements { return new SupplierSettlements($this->db, $this->actor, $this->person, $this->scope, $this->authorize, function (int $id): array { @@ -195,7 +205,7 @@ final class Payables return $position + ['supplier_key' => hash('sha256', self::canonical([$source['instance'], $source['company'], $source['supplier_id']])), 'supplier_name' => $source['supplier_name']]; - }); + }, $this->authorizeSettlementRead); } public function positionForSource(int $local): ?array @@ -345,14 +355,14 @@ final class Payables } /** Bounded source window with independent proposal/event pages; commands never use these snapshots. */ - public function listingPage(array $localSources, int $proposalPage = 1, int $eventPage = 1, int $perPage = 25): array + public function listingPage(array $localSources, int $proposalPage = 1, int $eventPage = 1, int $perPage = 25, bool $withEvidence = true): array { if (count($localSources) > 100 || ! in_array($perPage, [25, 100], true) || $proposalPage < 1 || $eventPage < 1 || array_filter($localSources, fn ($id) => ! is_int($id) || $id < 1)) { throw new \InvalidArgumentException('Janela de leitura financeira inválida.'); } - return $this->db->transaction(function () use ($localSources, $proposalPage, $eventPage, $perPage) { + return $this->db->transaction(function () use ($localSources, $proposalPage, $eventPage, $perPage, $withEvidence) { $this->authorizeRead === null ? ($this->authorize)('view') : ($this->authorizeRead)(); $documents = []; $current = []; foreach ($localSources as $id) { @@ -376,6 +386,7 @@ final class Payables $origin = $origins->get($obligation->source_id); return $this->position($obligation, $origin ? ($current[$origin->source_key] ?? null) : null, $page); })->all(); + if (! $withEvidence) return ['synthetic_only' => true, 'documents' => $documents, 'obligations' => $positions]; $proposals = $this->q('proposals')->whereIn('source_id', $sources())->orderByDesc('id')->paginate($perPage, ['*'], 'proposal_page', $proposalPage); $events = $this->q('events')->whereIn('source_id', $sources())->orderByDesc('id')->paginate($perPage, ['*'], 'event_page', $eventPage); $meta = fn ($p) => ['page' => $p->currentPage(), 'last_page' => $p->lastPage(), 'total' => $p->total(), 'per_page' => $p->perPage()]; @@ -387,6 +398,12 @@ final class Payables }); } + /** Same position calculation, without loading presentation-only proposal/event pages. */ + public function positionsPage(array $localSources): array + { + return $this->listingPage($localSources, 1, 1, 100, false); + } + public function listing(array $localSources): array { return $this->db->transaction(function () use ($localSources) { diff --git a/packages/payables/src/ReceiptReader.php b/packages/payables/src/ReceiptReader.php new file mode 100644 index 0000000..10dc7ca --- /dev/null +++ b/packages/payables/src/ReceiptReader.php @@ -0,0 +1,13 @@ +'pa_commands','settlement'=>'ps_commands',default=>throw new \InvalidArgumentException('Domínio de comprovativo inválido.')}; + if(!preg_match('/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/Di',$key))throw new \InvalidArgumentException('Chave de pedido inválida.'); + if($authorize===null)throw new \DomainException('Consulta sem autorização própria de leitura.'); + return $db->transaction(function()use($db,$table,$domain,$scope,$actor,$key,$authorize){$authorize();if(!$db->getSchemaBuilder()->hasTable($table))throw new \DomainException('Comprovativos deste domínio indisponíveis.');$r=$db->table($table)->where($scope)->where('actor_id',$actor)->where('command_key',$key)->first();return $r?['domain'=>$domain,'command_key'=>$r->command_key,'recorded_at'=>$r->created_at,'request_hash'=>$r->request_hash,'result'=>json_decode($r->result,true,128,JSON_THROW_ON_ERROR),'historical_receipt_only'=>true,'operation_executed'=>false]:null;}); + } +} diff --git a/packages/payables/src/SettlementHttp.php b/packages/payables/src/SettlementHttp.php index deebff4..8eb4bc6 100644 --- a/packages/payables/src/SettlementHttp.php +++ b/packages/payables/src/SettlementHttp.php @@ -16,6 +16,19 @@ abstract class SettlementHttp extends Controller protected const SERVICE = ''; + /** Host-specific document navigation; the native legacy composition keeps its existing contract. */ + protected function obligationOptions(Request $request): array + { + return []; + } + + /** Null preserves the native host's existing listing. */ + protected function settlementOptions(Request $request): ?array + { + return null; + } + protected function ledgerSettings(Request $request):array { return []; } + protected function guard(): void { $db = DB::connection(); @@ -32,18 +45,40 @@ abstract class SettlementHttp extends Controller private function data(Request $r): array { $this->guard(); + $options = $this->obligationOptions($r); + $paymentOptions = $this->settlementOptions($r); + $own = DB::transactionLevel() === 0; - return DB::transaction(function () use ($r): array { + return DB::transaction(function () use ($r, $options, $paymentOptions, $own): array { + if ($own && static::MODE === 'sgf' && $paymentOptions !== null) DB::statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY'); $s = app(static::SERVICE); $user = $r->user(); if (! $user instanceof User) { abort(401); } - $settlements = $s->engine($user)->settlements()->listing(); - $base = $s->listing($user); + $engine = $s->engine($user)->settlements(); + try { + $settlements = $paymentOptions === null ? $engine->listing() : $engine->listingPage($paymentOptions); + } catch (\DomainException $e) { + if ($paymentOptions === null) throw $e; + abort(403, $e->getMessage()); + } + $base = static::MODE === 'sgf' ? $s->listing($user, $options) : $s->listing($user); + $proposals = null; $sources = null; + if (static::MODE === 'sgf' && $base['obligations']) { + $scope = array_intersect_key($base['obligations'][0], array_flip(['tenant_id', 'company_id', 'unit_id'])); + abort_unless(count($scope) === 3, 409, 'Âmbito da obrigação incompleto.'); + foreach ($base['obligations'] as $o) abort_unless(array_intersect_key($o, $scope) === $scope, 409, 'Âmbito de obrigações divergente.'); + // Recognition refers to one exact proposal, not whichever versions happen to be on the first evidence page. + $proposals = DB::table('pa_proposals')->where($scope)->whereIn('id', array_column($base['obligations'], 'proposal_id'))->get()->keyBy('id'); + $sources = DB::table('pa_sources')->where($scope)->whereIn('id', array_column($base['obligations'], 'source_id'))->get()->keyBy('id'); + } foreach ($base['obligations'] as &$o) { - $proposal = $base['proposals']->first(fn ($p) => (int) $p->id === (int) $o['proposal_id']); + $proposal = $proposals === null ? $base['proposals']->first(fn ($p) => (int) $p->id === (int) $o['proposal_id']) : $proposals->get($o['proposal_id']); + if (static::MODE === 'sgf' && $proposal && ((int) $proposal->source_id !== (int) $o['source_id'] || $proposal->source_revision !== $o['source_revision'])) $proposal = null; $o['origin_snapshot'] = $proposal ? json_decode($proposal->snapshot, true, 64, JSON_THROW_ON_ERROR) : null; + $source = $sources?->get($o['source_id']); + if ($source) $o['evidence_url'] = '/supplier-payables?'.http_build_query(['source' => $source->local_source_id], '', '&', PHP_QUERY_RFC3986); } unset($o); $permissions = []; @@ -54,7 +89,9 @@ abstract class SettlementHttp extends Controller return ['synthetic_only' => true, 'obligations' => $base['obligations'], 'payments' => $settlements['payments'], 'allocation_proposals' => $settlements['proposals'], 'allocations' => $settlements['allocations'], 'events' => $settlements['events'], 'reversals_available' => $settlements['reversals_available'], 'reversal_proposals' => $settlements['reversal_proposals'], 'reversals' => $settlements['reversals'], - 'permissions' => $permissions, 'current_actor' => $user->id]; + 'permissions' => $permissions, 'current_actor' => $user->id] + + (static::MODE === 'sgf' ? ['obligation_pagination' => $base['pagination']['documents'], 'obligation_query' => $base['listing_query']] : []) + + (isset($settlements['pagination']) ? ['settlement_pagination' => $settlements['pagination'], 'settlement_query' => array_replace($base['listing_query'], $settlements['listing_query'])] : []); }); } @@ -73,8 +110,11 @@ abstract class SettlementHttp extends Controller $settings = ['host' => static::MODE === 'compras' ? 'Compras autónomo' : 'ERP SGF', 'actor' => $user->name, 'csrf' => csrf_token(), 'context' => $r->session()->get('company_context.token'), 'api' => '/api/supplier-payments', 'obligations_url' => static::MODE === 'compras' ? '/obrigacoes-fornecedores' : '/supplier-payables']; + if (static::MODE === 'sgf' && isset($data['obligation_query']['source'])) { + $settings['obligations_url'] .= '?'.http_build_query(['source' => $data['obligation_query']['source']], '', '&', PHP_QUERY_RFC3986); + } - return response(Workspace::settlements($data, $settings))->header('Cache-Control', 'no-store'); + return response(Workspace::settlements($data, $settings+$this->ledgerSettings($r)))->header('Cache-Control', 'no-store'); } public function command(Request $r, string $action): JsonResponse diff --git a/packages/payables/src/SupplierSettlements.php b/packages/payables/src/SupplierSettlements.php index 70a163f..ab814ad 100644 --- a/packages/payables/src/SupplierSettlements.php +++ b/packages/payables/src/SupplierSettlements.php @@ -12,15 +12,20 @@ final class SupplierSettlements * @param array $scope * @param \Closure(string):void $authorize * @param \Closure(int):array $obligation + * @param null|\Closure():void $authorizeRead Explicit host authority for paged payment reads; never used by commands. */ public function __construct(private ConnectionInterface $db, private int $actor, private string $person, - private array $scope, private \Closure $authorize, private \Closure $obligation) {} + private array $scope, private \Closure $authorize, private \Closure $obligation, private ?\Closure $authorizeRead = null) {} private function q(string $table): Builder { return $this->db->table('ps_'.$table)->where($this->scope); } + public function receipt(string $key):?array + { + return ReceiptReader::read($this->db,'settlement',$this->scope,$this->actor,$key,$this->authorizeRead); + } private function stamp(): string { return date('Y-m-d H:i:s'); @@ -489,7 +494,86 @@ final class SupplierSettlements return ['proposal_id' => (int) $proposal->id, 'reversal_id' => $id]; } - /** @return array */ + /** Bounded read windows. Commands keep the original fresh balance and version checks. + * @param array $options + * @return array + */ + public function listingPage(array $options = []): array + { + $defaults = ['payments_page' => 1, 'allocation_proposals_page' => 1, 'allocations_page' => 1, 'payment_events_page' => 1, + 'payment_per_page' => 25, 'payment_q' => '', 'payment_state' => 'all']; + if (array_diff(array_keys($options), [...array_keys($defaults), 'payment'])) throw new \InvalidArgumentException('Filtro financeiro desconhecido.'); + $o = array_replace($defaults, $options); + $o['payment_q'] ??= ''; + foreach (['payments_page', 'allocation_proposals_page', 'allocations_page', 'payment_events_page', 'payment_per_page', 'payment'] as $key) { + if (! array_key_exists($key, $o)) continue; + $value = filter_var($o[$key], FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]]); + if ($value === false || is_bool($o[$key]) || ($key === 'payment_per_page' ? ! in_array($value, [25, 100], true) : ($key !== 'payment' && $value > 100000))) throw new \InvalidArgumentException('Página ou pagamento inválido.'); + $o[$key] = $value; + } + if (! is_string($o['payment_q']) || mb_strlen($o['payment_q']) > 100 || ! in_array($o['payment_state'], ['all', 'proposed', 'confirmed', 'rejected'], true)) throw new \InvalidArgumentException('Pesquisa ou estado inválido.'); + $o['payment_q'] = trim($o['payment_q']); + + $own = $this->db->transactionLevel() === 0; + return $this->db->transaction(function () use ($o, $own): array { + if ($own && $this->authorizeRead !== null) $this->db->statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY'); + if ($this->authorizeRead !== null) ($this->authorizeRead)(); + else ($this->authorize)('payments_view'); + $root = $this->q('payments'); + if (isset($o['payment'])) { + if (! (clone $root)->where('id', $o['payment'])->exists()) throw new \DomainException('Pagamento indisponível neste contexto.'); + $root->where('id', $o['payment']); + } + if ($o['payment_q'] !== '') { + $needle = '%'.str_replace(['\\', '%', '_'], ['\\\\', '\\%', '\\_'], $o['payment_q']).'%'; + $root->where('fact_reference', 'ilike', $needle); + } + if ($o['payment_state'] !== 'all') { + $state = $o['payment_state']; + $method = $state === 'proposed' ? 'whereNotExists' : 'whereExists'; + $root->$method(function ($q) use ($state) { + $q->selectRaw('1')->from('ps_payment_decisions')->where($this->scope)->whereColumn('ps_payment_decisions.payment_id', 'ps_payments.id'); + if ($state !== 'proposed') $q->where('decision', $state); + }); + } + $matching = fn () => (clone $root)->select('id'); + $size = $o['payment_per_page']; + $payments = (clone $root)->orderByDesc('id')->paginate($size, ['*'], 'payments_page', $o['payments_page']); + $ids = array_map(fn ($p) => $p->id, $payments->items()); + $decisions = $this->q('payment_decisions')->whereIn('payment_id', $ids)->get()->keyBy('payment_id'); + $reversible = $this->reversalsAvailable(); + $allocated = $this->q('allocations')->whereIn('payment_id', $ids)->selectRaw('payment_id, sum(amount_minor) AS amount')->groupBy('payment_id')->pluck('amount', 'payment_id'); + $reversed = $reversible ? $this->q('reversals')->whereIn('payment_id', $ids)->selectRaw('payment_id, sum(amount_minor) AS amount')->groupBy('payment_id')->pluck('amount', 'payment_id') : collect(); + $positions = array_map(function ($p) use ($decisions, $allocated, $reversed) { + $decision = $decisions->get($p->id); + return (array) $p + ['decision' => $decision, 'state' => $decision?->decision ?? 'proposed', + 'unallocated_minor' => $decision?->decision === 'confirmed' ? (int) $p->amount_minor - (int) $allocated->get($p->id, 0) + (int) $reversed->get($p->id, 0) : null, + 'reconciliation' => 'not_implemented']; + }, $payments->items()); + $proposals = $this->q('proposals')->whereIn('payment_id', $matching())->orderByDesc('id')->paginate($size, ['*'], 'allocation_proposals_page', $o['allocation_proposals_page']); + $proposalDecisions = $this->q('allocation_decisions')->whereIn('proposal_id', array_map(fn ($p) => $p->id, $proposals->items()))->get()->keyBy('proposal_id'); + $plans = array_map(fn ($p) => (array) $p + ['decision' => $proposalDecisions->get($p->id)], $proposals->items()); + $allocations = $this->q('allocations')->whereIn('payment_id', $matching())->orderByDesc('id')->paginate($size, ['*'], 'allocations_page', $o['allocations_page']); + $allocationIds = array_map(fn ($a) => $a->id, $allocations->items()); + $origins = $this->db->table('pa_obligations AS o')->join('pa_sources AS s', 's.id', '=', 'o.source_id') + ->whereIn('o.id', array_map(fn ($a) => $a->obligation_id, $allocations->items())); + foreach ($this->scope as $key => $value) $origins->where('o.'.$key, $value)->whereColumn('s.'.$key, 'o.'.$key); + $origins = $origins->get(['o.id', 's.local_source_id'])->keyBy('id'); + foreach ($allocations->items() as $a) $a->local_source_id = $origins->get($a->obligation_id)?->local_source_id; + $events = $this->q('events')->whereIn('payment_id', $matching())->orderByDesc('id')->paginate($size, ['*'], 'payment_events_page', $o['payment_events_page']); + $meta = fn ($p) => ['page' => $p->currentPage(), 'last_page' => $p->lastPage(), 'total' => $p->total(), 'per_page' => $p->perPage()]; + return ['synthetic_only' => true, 'payments' => $positions, 'proposals' => $plans, 'allocations' => $allocations->items(), 'events' => $events->items(), + 'reversals_available' => $reversible, + 'reversal_proposals' => $reversible ? $this->q('reversal_proposals')->whereIn('allocation_id', $allocationIds)->orderBy('id')->get()->all() : [], + 'reversals' => $reversible ? $this->q('reversals')->whereIn('allocation_id', $allocationIds)->orderBy('id')->get()->all() : [], + 'pagination' => ['payments' => $meta($payments), 'allocation_proposals' => $meta($proposals), 'allocations' => $meta($allocations), 'payment_events' => $meta($events)], + 'listing_query' => $o, 'current_actor' => $this->actor]; + }); + } + + /** Legacy composition; deliberately unchanged until that host opts into the bounded reader. + * @return array + */ public function listing(): array { return $this->db->transaction(function (): array { diff --git a/packages/payables/ui/page.php b/packages/payables/ui/page.php index 5e4c93a..46c7ae9 100644 --- a/packages/payables/ui/page.php +++ b/packages/payables/ui/page.php @@ -3,11 +3,13 @@
get('payables_demo_entry')): ?>

Trocar função ou sair da demonstração

←

·

Obrigações a fornecedores

ENSAIO SINTÉTICO — SEM UTILIZAÇÃO REAL. Documento, dívida, pagamento e contabilidade são factos distintos. Este percurso reconhece o principal e, quando activado, preserva o histórico existente.

Fornecedor, montantes e conferência são reutilizados da factura. Vencimento desconhecido não é substituído por uma data ou zero dias de atraso.

-'page','proposals'=>'proposal_page','events'=>'event_page'][$key];echo '';}; ?> -

Filtrar documentos

Obrigações, propostas e eventos abaixo pertencem aos documentos desta página. A pesquisa e o estado são aplicados antes da paginação.

-

Pagamentos e afectações sintéticas — sem execução bancária

+

Relatório das obrigações reconhecidas abrangidas pelo filtro

+

Conferência da origem #. Consultar todas as origens

+'page','proposals'=>'proposal_page','events'=>'event_page'][$key];$label=['documents'=>'documentos','proposals'=>'propostas','events'=>'histórico'][$key];echo '';}; ?> +

Filtrar documentos

Obrigações, propostas e eventos abaixo pertencem aos documentos desta página. A pesquisa e o estado são aplicados antes da paginação.

+

Pagamentos e afectações sintéticas — sem execução bancária

Facturas de origem

- +
DocumentoFornecedorBaseImposto documentalTotalConferência / revisão
Origem e pendências

Conferir evidências desta origem

Origem e pendências

Preparar a obrigação

Sem edição de fornecedor, valor ou imposto. Vencimento mantém-se desconhecido neste recorte.

($d['payment_count']??0)>0); if(($data['history_import_available']??false)&&$data['permissions']['prepare']&&$historyDocuments): ?>

Incorporar factura com pagamentos anteriores

Preserva o principal integral e liga os pagamentos originais uma única vez. Só os confirmados reduzem o saldo; pendentes e rejeitados mantêm o seu estado. Não executa nem confirma pagamentos.

@@ -21,6 +23,7 @@

Sem execução de novos pagamentos, cobrança, efeitos de stock, novo consumo orçamental ou lançamento automático. A passagem de histórico não confirma pagamentos pendentes.

diff --git a/packages/payables/ui/settlement-allocations.php b/packages/payables/ui/settlement-allocations.php new file mode 100644 index 0000000..54281fe --- /dev/null +++ b/packages/payables/ui/settlement-allocations.php @@ -0,0 +1,6 @@ + +

Afectações confirmadas

+ +

Sem afectações confirmadas nesta janela.

+
diff --git a/packages/payables/ui/settlement-navigation.php b/packages/payables/ui/settlement-navigation.php new file mode 100644 index 0000000..36a85fa --- /dev/null +++ b/packages/payables/ui/settlement-navigation.php @@ -0,0 +1,33 @@ + 'payments_page', 'allocation_proposals' => 'allocation_proposals_page', 'allocations' => 'allocations_page', 'payment_events' => 'payment_events_page'][$key]; + $anchor = ['payments' => 'payments', 'allocation_proposals' => 'allocation-proposals', 'allocations' => 'allocation-history', 'payment_events' => 'payment-history'][$key]; + $label = ['payments' => 'pagamentos', 'allocation_proposals' => 'propostas de afectação', 'allocations' => 'afectações confirmadas', 'payment_events' => 'eventos de pagamentos'][$key]; + echo ''; +}; +$paymentFocusUrl = static function (int $id) use ($data): string { + $query = array_replace($data['settlement_query'], ['payment' => $id, 'payment_state' => 'all', 'payment_q' => '', + 'payments_page' => 1, 'allocation_proposals_page' => 1, 'allocations_page' => 1, 'payment_events_page' => 1]); + return '/supplier-payments?'.http_build_query($query, '', '&', PHP_QUERY_RFC3986).'#payments'; +}; +if (! isset($data['settlement_pagination'])) return; +$sq = $data['settlement_query']; +?> +

Filtrar pagamentos e histórico

+$value): ?> + + + +
+

Estes filtros abrangem pagamentos, propostas de afectação, afectações e eventos. Cada lista tem paginação própria. Os filtros de documentos escolhem as obrigações e não restringem este histórico. Os montantes por afectar incluem todo o histórico do pagamento, também fora da página.

+

Conferência do pagamento # · Consultar outros pagamentos

+
diff --git a/packages/payables/ui/settlements.php b/packages/payables/ui/settlements.php index f6b844a..ef335b3 100644 --- a/packages/payables/ui/settlements.php +++ b/packages/payables/ui/settlements.php @@ -12,13 +12,27 @@ body{font:17px system-ui;color:#172f29;background:#f4f6f5;margin:0}main{max-widt
← Obrigações a fornecedores · Trocar função ou sair

·

Pagamentos e afectações a fornecedores

ENSAIO SINTÉTICO — SEM MOVIMENTAÇÃO DE DINHEIRO. Propor não confirma; confirmar um pagamento não abate automaticamente uma dívida. Só uma afectação confirmada reduz o saldo. Não há execução bancária, reconciliação, stock, orçamento adicional ou lançamento contabilístico.

As referências de pagamento e evidência são artificiais e começam por SIM-. Não introduza dados bancários ou comprovativos reais.

-

Obrigações e saldo por liquidar

Origem / fornecedorPrincipalAfectado neste percursoSaldoVencimento
# ·

Versão · Validador #
Versão e decisão
Pendente
Atraso indeterminado
Dias de atraso: sem valor

Reconheça primeiro a obrigação no percurso existente. Não é criada uma dívida por registar um pagamento.

+ + +

Escolher origens para conferência

+$value): ?> + + + +
+

A selecção de obrigações abaixo acompanha esta página de documentos. O histórico de pagamentos e afectações mantém a sua consulta própria; os filtros de documentos não o restringem.

+1,'proposal_page'=>1,'event_page'=>1,'q'=>'','recognition'=>'all']); unset($allSources['source']); ?>

Origem # · Consultar todas as origens

+
+ +

Obrigações e saldo por liquidar

Origem / fornecedorPrincipalAfectado neste percursoSaldoVencimento
# ·

Conferir origem, propostas e histórico


Versão · Validador #
Versão e decisão
Pendente
Atraso indeterminado
Dias de atraso: sem valor

Reconheça primeiro a obrigação no percurso existente. Não é criada uma dívida por registar um pagamento.

1. Propor pagamento sintético

-

2. Pagamentos propostos e decisões

A confirmação exige outra identidade. Depois de confirmar, troque para Preparar para propor a afectação; a dívida ainda não foi reduzida.

Pagamento # ·

· Data simulada · Estado: 'Proposto','confirmed'=>'Confirmado em ensaio','rejected'=>'Rejeitado'][$p['state']]) ?>

Por afectar: · Reconciliação bancária: não implementada.

Preparação e evidência preservadas
-

Sem pagamentos propostos neste contexto.

+

2. Pagamentos propostos e decisões

A confirmação exige outra identidade. Depois de confirmar, troque para Preparar para propor a afectação; a dívida ainda não foi reduzida.

Pagamento # ·

· Data simulada · Estado: 'Proposto','confirmed'=>'Confirmado em ensaio','rejected'=>'Rejeitado'][$p['state']]) ?>

Conferir este pagamento e as suas evidências

Por afectar: · Reconciliação bancária: não implementada.

Preparação e evidência preservadas
+

Sem pagamentos propostos nesta janela.

3. Propor afectações

Mesmo fornecedor e moeda. O excedente fica por afectar. Não existe reembolso/crédito automático nem edição de uma afectação confirmada.

-

4. Propostas de afectação

A proposta não reduz a dívida. Troque para Validar para confirmar a afectação com outra identidade.

Proposta # · · Pagamento #

Preparador # ·

  • Obrigação #: · versão

Estado: decision === 'confirmed' ? 'Afectação confirmada' : 'Rejeitada') : 'Proposta — sem efeito no saldo' ?>

-
+

4. Propostas de afectação

A proposta não reduz a dívida. Troque para Validar para confirmar a afectação com outra identidade.

Proposta # · · Pagamento #

Conferir pagamento de origem

Preparador # ·

  • Obrigação #: · versão

Estado: decision === 'confirmed' ? 'Afectação confirmada' : 'Rejeitada') : 'Proposta — sem efeito no saldo' ?>

+
+

5. Reversão integral e nova afectação

Propor não altera saldos. Confirmar com outra identidade compensa integralmente a afectação original e volta a disponibilizar esse montante do pagamento. O pagamento continua confirmado: não há cancelamento bancário. Depois, use «Propor afectações» com uma nova referência para corrigir o valor.

Actualização de reversões ainda não aplicada neste ensaio. Os saldos e o percurso anterior permanecem disponíveis.

allocation_id === (int) $a->id) $reversal = $r; foreach ($data['reversal_proposals'] as $r) if ((int) $r->allocation_id === (int) $a->id) $proposal = $r; ?> @@ -29,10 +43,11 @@ body{font:17px system-ui;color:#172f29;background:#f4f6f5;margin:0}main{max-widt
Proposta original de reversão preservada
-

Histórico durável

#id) ?> · kind) ?> · actor #actor_id) ?> · created_at) ?>
payload) ?>
+

Histórico durável

#id) ?> · kind) ?> · actor #actor_id) ?> · created_at) ?>

Conferir pagamento #payment_id) ?>

payload) ?>

Reversões parciais, cancelamento bancário, reconciliação e novos pagamentos sobre documentos com histórico importado ficam fora desta entrega. Os originais e as decisões confirmadas não são editados ou apagados.

diff --git a/resources/views/accounting/general-ledger.blade.php b/resources/views/accounting/general-ledger.blade.php new file mode 100644 index 0000000..ffcc9f6 --- /dev/null +++ b/resources/views/accounting/general-ledger.blade.php @@ -0,0 +1,33 @@ +@php $ctx=app(\App\Shared\Context\CompanyContext::class);$supplierAccess=app(\App\Modules\Identity\Services\Permissions::class)->has(auth()->id(),$ctx->identifiers()['tenant_id'],$ctx->identifiers()['company_id'],'supplier_payables.view',$ctx->unitId());$money=static fn($n)=>($n<0?'-':'').number_format(intdiv(abs($n),100),0,',',' ').','.str_pad((string)(abs($n)%100),2,'0',STR_PAD_LEFT).' MZN'; @endphp +Lançamento sintético — SGF
+
Voltar à navegação SGF / mudar módulo@if(config('sales_ledger.synthetic_enabled')===true||config('cost_ledger.synthetic_enabled')===true)

Contabilidade — diário de teste por origem

EXCLUSIVAMENTE SINTÉTICO. Contas, regras e períodos artificiais. Sem uso real, contas PGC aprovadas ou execução monetária.

Fontes técnicas, comerciais e financeiras são efeitos distintos, com fotografia e revisão próprias. O lançamento não cria nem altera a dívida financeira.

@else

Contabilidade — primeiro lançamento de ensaio

EXCLUSIVAMENTE SINTÉTICO. Duas contas e um período artificiais. Sem uso real, contas PGC aprovadas, emissão, execução bancária ou fecho operacional.

Origem: obrigação reconhecida pelo Payables. Aplicar o lançamento não cria nem altera a dívida financeira. Vencimento e período contabilístico são factos separados.

@endif
+@if(config('general_ledger.composition_enabled')===true)

Painel conjunto de vendas, fornecedores e custos QA

@endif +

+@if(config('cost_ledger.synthetic_enabled')===true)

Oficina → custo directo validado → diário e relatórios QA

@endif +

Balancete e razão por conta — Outubro de 2026 (QA)

+@if(config('general_ledger.cycle_enabled')===true&&$supplierAccess)

Ciclo integrado: afectação, reversão, correcção técnica e fecho QA

@endif +@if(config('sales_ledger.synthetic_enabled')===true)

Comercial → recebíveis → contabilidade: origem, decisões e extracto

@endif +@if(session('ledger_demo'))

Trocar função no ensaio sintético

@endif +@if($data['permissions']['prepare']&&$supplierAccess)

Preparar da origem reconhecida

@endif +

Propostas e conferência individual

+@foreach($data['proposals'] as $p) +@php $snapshot=json_decode($p->snapshot,true);$isPart=in_array($snapshot['source']['effect_type'],['journal.reversal','journal.replacement','workshop.direct_cost.reversal','workshop.direct_cost.replacement','industry.cost.reversal','industry.cost.replacement'],true);$review=collect($data['reviews'])->firstWhere('proposal_id',$p->id); @endphp +@if(isset($snapshot['source']['industrial_lot_id']))

Conferir lote e resultado industrial

@elseif(isset($snapshot['source']['cost_order_id']))

Conferir ordem e custo directo seleccionado

@elseif(isset($snapshot['source']['invoice_id']))

Conferir percurso e origem comercial

@else

Conferir percurso e origem

@endif +

Proposta #{{ $p->id }} · captura {{ $p->capture_version }}

@if(isset($snapshot['source']['industrial_lot_id']))Lote #{{ $snapshot['source']['industrial_lot_id'] }}@elseif(isset($snapshot['source']['cost_order_id']))Ordem #{{ $snapshot['source']['cost_order_id'] }}@else Obrigação #{{ $p->obligation_id }}@endif · preparador #{{ $p->prepared_by }} · {{ $p->created_at }}

{{ $p->reason }}

Data {{ $snapshot['journal_on'] }} · período {{ $snapshot['period']['period_key'] }} v{{ $snapshot['period']['version'] }} · regra v{{ $snapshot['rule']['version'] }}

+
    @foreach($snapshot['lines'] as $line)
  • {{ $line['account_code'] }} — débito {{ $money($line['debit_minor']) }} / crédito {{ $money($line['credit_minor']) }}
  • @endforeach

Impacto: lançamento equilibrado de {{ $money($snapshot['impact']['debit_minor']) }}. Sem novo pagamento ou alteração do saldo financeiro.

Revisão exacta {{ $p->revision }}@unless(isset($snapshot['source']['cost_order_id'])||isset($snapshot['source']['industrial_lot_id'])) · Vencimento da origem: {{ $snapshot['source']['due_on'] ?? 'desconhecido' }}@endunless

+
Fotografia da fonte, regra e período
{{ json_encode($snapshot,JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE) }}
+@if($review)

Decisão {{ $review->decision==='approved'?'aprovada':'recusada' }} por #{{ $review->reviewed_by }} · {{ $review->reason }}

@endif +@if($p->journal_id)

Aplicada uma vez no lançamento #{{ $p->journal_id }}. Consulte o comprovativo abaixo.

@endif +@if(!$isPart&&$data['permissions']['validate']&&!$review&&$p->prepared_by!==auth()->id())
@endif +@if(!$isPart&&$data['permissions']['post']&&$review&&$review->decision==='approved'&&$p->prepared_by===auth()->id()&&!$p->journal_id)
@endif +
@endforeach
+

Lançamentos e extracto sintético

+

Débitos {{ $money($data['totals']['debit_minor']) }} · Créditos {{ $money($data['totals']['credit_minor']) }} · Débito menos crédito {{ $money($data['totals']['net_minor']) }}

Os totais incluem todos os lançamentos do filtro; as contrapartidas dos lançamentos da página aparecem abaixo. Não são um balancete legal ou uma posição financeira por liquidar.

+@foreach($data['journals'] as $j)@php $journalSource=json_decode($j->snapshot,true)['source']; @endphp

Lançamento #{{ $j->id }} · {{ $j->journal_on }}

@if(isset($journalSource['industrial_lot_id']))Lote #{{ $journalSource['industrial_lot_id'] }}@elseif(isset($journalSource['cost_order_id']))Ordem #{{ $journalSource['cost_order_id'] }}@else Obrigação #{{ $j->obligation_id }}@endif · Proposta #{{ $j->proposal_id }} · Revisão #{{ $j->review_id }} · Aplicador #{{ $j->posted_by }}

{{ $j->reason }} · {{ $j->created_at }}

    @foreach($data['lines'] as $l)@if($l->journal_id===$j->id)
  • Conta #{{ $l->account_id }}: D {{ $money($l->debit_minor) }} / C {{ $money($l->credit_minor) }}
  • @endif @endforeach
Fotografia imutável da origem, regra e período aplicados
{{ json_encode(json_decode($j->snapshot,true),JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE) }}
@if(isset($journalSource['cost_order_id']))

Conferir a ordem, o custo e as decisões. A fotografia acima conserva o estado aplicado.

@else

Para conferir a posição financeira actual, volte à navegação, seleccione Compras e use a referência local da origem. A fotografia acima conserva o estado aplicado.

@endif
@endforeach +
+

Histórico do ensaio

@foreach($data['events'] as $event)
#{{ $event->id }} · {{ $event->kind }} · actor #{{ $event->actor_id }} · {{ $event->created_at }}

{{ $event->reason }}

{{ $event->previous }}
{{ $event->subsequent }}
@endforeach
+@include('accounting.receipt-recovery') +
diff --git a/resources/views/accounting/industrial-correction-demo-entry.blade.php b/resources/views/accounting/industrial-correction-demo-entry.blade.php new file mode 100644 index 0000000..a2c96fd --- /dev/null +++ b/resources/views/accounting/industrial-correction-demo-entry.blade.php @@ -0,0 +1 @@ +Correcção industrial1800→1820 QA

Correcção industrial1800→1820 — QA

Os workflows industriais validaram o original1800/10UN e a taxa sucessora51/KG para20KG:1020 material+500 trabalho+300 CIF=1820,182/UN. O residual300 permanece separado. O original1800 está lançado; nenhuma correcção industrial ou fecho inicial foi aplicado nesta demonstração.

Preparar / aplicar · Conferir distintamente · Consultar

  1. No painel conjunto, abrir o lote industrial. Conferir original1800, sucessor1820, diferença20, origens, taxa, critério e versões.
  2. Preparador captura o par com fundamento. Validador confere as quatro linhas: estorno1800 e substituição1820.
  3. Preparador revalida e aplica o grupo numa transacção. Consultar original, par, decisões, diário e razão com saldo industrial1820 e bruto5420 por lado; residual300 fora do diário.
  4. Completar os percursos já autorizados de venda1000/recebimentos400+600/reversão400, fornecedor60 e correcção directa275→295.
  5. Conferir o conjunto:11 lançamentos/23 linhas, bruto8725 por lado, cliente400/directo295/industrial1820/fornecedor60. Capturar/rever distintamente e fechar QA.

Usar sessões separadas. A fixture começa com dois lançamentos originais: directo275 e industrial1800. Sem reposição automática, partes aplicadas isoladamente, cadeias adicionais ou reabertura. Nenhum movimento real, stock valorizado, folha salarial, activação de Compras ou publicação. Demos anteriores preservadas; revisão visual, carga e implantação separadas.

diff --git a/resources/views/accounting/industrial-correction.blade.php b/resources/views/accounting/industrial-correction.blade.php new file mode 100644 index 0000000..b95ab31 --- /dev/null +++ b/resources/views/accounting/industrial-correction.blade.php @@ -0,0 +1,12 @@ +@php $c=$i;$c['original_journal']=$i['journal'];$source=$i['source']; @endphp +@php $original=$c['original_journal']; @endphp +@if($original&&$source)

Correcção explícita do resultado industrial lançado

Original #{{ $original->id }}: {{ $money($original->debit_minor) }}. Resultado industrial actual validado: {{ $money($source['principal_minor']) }}. Diferença: {{ $money($source['principal_minor']-$original->debit_minor) }}.

O original permanece imutável. O par contém estorno integral e substituição; nenhuma das partes pode ser revista ou aplicada isoladamente.

+@if(!$closed&&$c['accounting_state']==='requires_future_correction'&&$data['permissions']['correct_prepare']&&!collect($data['correction_results'])->contains('original_journal_id',$original->id))
@endif +@foreach($data['corrections'] as $group)@php $reverse=json_decode($group->reverse_snapshot,true);$replacement=json_decode($group->replacement_snapshot,true); @endphp

Grupo #{{ $group->id }} · original #{{ $group->original_journal_id }}

Autor #{{ $group->prepared_by }} · {{ $group->reason }} · versão exacta {{ $group->revision }}

Estorno {{ $money($reverse['impact']['debit_minor']) }} · substituição {{ $money($replacement['impact']['debit_minor']) }} · diferença {{ $money($replacement['impact']['debit_minor']-$reverse['impact']['debit_minor']) }}.

Estorno

    @foreach($reverse['lines'] as $line)
  • {{ $line['account_code'] }} — D {{ $money($line['debit_minor']) }} / C {{ $money($line['credit_minor']) }}
  • @endforeach

Substituição

    @foreach($replacement['lines'] as $line)
  • {{ $line['account_code'] }} — D {{ $money($line['debit_minor']) }} / C {{ $money($line['credit_minor']) }}
  • @endforeach
Fotografias do original, fonte actual, contas e período
{{ json_encode(['reverse'=>$reverse,'replacement'=>$replacement],JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE) }}
+@foreach([$group->reverse_review,$group->replacement_review] as $review)@if($review)

Proposta #{{ $review->proposal_id }} · {{ $review->decision }} · revisor #{{ $review->reviewed_by }} · {{ $review->reason }}

@endif @endforeach +@if($group->result)

Par aplicado: resultado #{{ $group->result->id }}, estorno #{{ $group->result->reverse_journal_id }} e substituição #{{ $group->result->replacement_journal_id }} · autor #{{ $group->result->actor_id }} · {{ $group->result->created_at }} · {{ $group->result->reason }}

+@elseif(!$group->current)

Captura superada; conservar o histórico e conferir o grupo actual.

+@elseif(!$closed) +@if($data['permissions']['correct_validate']&&!$group->reverse_review&&!$group->replacement_review&&$group->prepared_by!==auth()->id())
@endif +@if($data['permissions']['correct_post']&&$group->prepared_by===auth()->id()&&$group->reverse_review?->decision==='approved'&&$group->replacement_review?->decision==='approved')
@endif +@endif
@endforeach
@endif diff --git a/resources/views/accounting/industrial-ledger-demo-entry.blade.php b/resources/views/accounting/industrial-ledger-demo-entry.blade.php new file mode 100644 index 0000000..2716a5e --- /dev/null +++ b/resources/views/accounting/industrial-ledger-demo-entry.blade.php @@ -0,0 +1 @@ +Ciclo industrial integrado QA

Resultado industrial1800 e diário conjunto QA

Lote com material1000, trabalho500 e CIF imputado300:1800MZN,10UN,180/UN. Residual300 separado e não contabilizado. Entradas, taxas, critério e resultado validados pelos workflows; nenhum lançamento industrial inicial.

Preparar / aplicar · Conferir distintamente · Consultar

  1. No painel conjunto, abrir o lote industrial. Conferir resultado, origens, taxas, critério, versões e impacto1800 em duas contas artificiais.
  2. Preparador captura com fundamento; validador confere a versão exacta; preparador revalida e aplica uma vez.
  3. Completar os percursos já autorizados: factura1000, recebimentos/afectações400+600 e reversão400; fornecedor60; par de correcção de custo275→295.
  4. Conferir9 lançamentos/19 linhas e bruto5105 por lado. Contas cliente400, custo directo295, industrial1800; fornecedor60. Residual300 fora do diário.
  5. Capturar conferência conjunta, rever distintamente e fechar o período QA. Uma alteração de origem ou versão impede a confirmação.

Na fixture inicial só o custo directo275 está lançado. Usar sessões separadas; sem reset automático. Sem stock valorizado, folha salarial, dinheiro, operações reais, activação de Compras ou publicação. Demos anteriores preservadas. Revisão visual, carga sustentada e implantação permanecem separadas.

diff --git a/resources/views/accounting/industrial-ledger.blade.php b/resources/views/accounting/industrial-ledger.blade.php new file mode 100644 index 0000000..5159145 --- /dev/null +++ b/resources/views/accounting/industrial-ledger.blade.php @@ -0,0 +1,17 @@ +@php $i=$data['industrial'];$b=$data['book'];$closed=$data['closed'];$money=fn($n)=>number_format($n/100,2,',',' ').' MZN'; @endphp +Resultado industrial e diário QA
+
Painel conjunto e fecho QA · Diário · Balancete e razão

Lote industrial validado → Contabilidade QA

Só ensaio sintético. Resultado seleccionado, residual separado, contas artificiais. Sem stock valorizado, folha salarial ou utilização real.

+

Perímetros compostos

@foreach($i['lots'] as $l)

Lote #{{ $l->lot_id }} · {{ $l->period_key }}

@endforeach
+@if($i['facts'])@php $c=$i['facts']['conference'];$s=$c['snapshot']; @endphp

Conferência actual do lote #{{ $i['lot_id'] }}

{{ $c['lot']['reference'] }} · resultado #{{ $c['result']['id']??'pendente' }} / versão {{ $c['result']['version']??'—' }} · decisão {{ $c['decision']['decision']??'pendente' }}.

Material {{ $s['material_exact']??'indisponível' }} + trabalho {{ $s['labour_exact']??'indisponível' }} + CIF imputado {{ $s['allocated_exact']??'indisponível' }} MZN. Total seleccionado {{ $s['selected_total_exact']??'indisponível' }} MZN; {{ $s['good_units']??'—' }} UN; unitário {{ $s['unit_cost_exact']??'indisponível' }} MZN.

Residual {{ $s['residual_exact']??'indisponível' }} MZN separado; sem lançamento do residual.

@if($i['pending'])

{{ $i['pending'] }}

@endif @if($i['accounting_state']==='requires_future_correction')

A origem difere do resultado já lançado. Não reconhecer novamente. @if(config('industrial_ledger.correction_enabled')===true)Exige correcção explícita do par; o fecho fica impedido até à resolução.@else Correcção industrial futura por autorizar; o fecho fica impedido.@endif

@endif
Entradas, taxas, critério, decisões, versões e resultado
{{ json_encode($i['facts'],JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE) }}
+@if($i['source'])

Impacto: D QA-CUSTO-INDUSTRIAL {{ $money($i['source']['principal_minor']) }} / C QA-COMPENSACAO-INDUSTRIAL {{ $money($i['source']['principal_minor']) }}. Sem outra dívida ou movimento de stock.

@if(!$closed&&!$i['journal']&&$b['permissions']['prepare'])
@endif @endif
@endif +@if(config('industrial_ledger.correction_enabled')===true)@include('accounting.industrial-correction')@endif +

Conferência individual do impacto

@foreach($b['proposals'] as $p)@php $snap=json_decode($p->snapshot,true);$isPart=in_array($snap['source']['effect_type'],['industry.cost.reversal','industry.cost.replacement'],true);$r=collect($b['reviews'])->firstWhere('proposal_id',$p->id); @endphp

Proposta #{{ $p->id }} · captura {{ $p->capture_version }}

Preparador #{{ $p->prepared_by }} · {{ $p->reason }} · revisão {{ $p->revision }}

    @foreach($snap['lines'] as $line)
  • {{ $line['account_code'] }} · D {{ $money($line['debit_minor']) }} / C {{ $money($line['credit_minor']) }}
  • @endforeach
Fotografia capturada e impacto
{{ $p->snapshot }}
@if($r)

{{ $r->decision }} · autor #{{ $r->reviewed_by }} · {{ $r->reason }}

@endif +@if(!$closed&&!$isPart&&!$r&&$b['permissions']['validate']&&$p->prepared_by!==auth()->id())
@endif +@if(!$closed&&!$isPart&&$r?->decision==='approved'&&!$p->journal_id&&$b['permissions']['post']&&$p->prepared_by===auth()->id())
@endif
@endforeach
+

Aplicações e histórico

@if($closed)

Período QA encerrado; consulta preservada, sem reabertura.

@endif

Débitos {{ $money($b['totals']['debit_minor']) }} · créditos {{ $money($b['totals']['credit_minor']) }}.

@foreach($b['journals'] as $j)
Lançamento #{{ $j->id }} · {{ $j->journal_on }} · aplicador #{{ $j->posted_by }} · proposta #{{ $j->proposal_id }} / revisão #{{ $j->review_id }} · {{ $j->reason }}
@endforeach @foreach($b['events'] as $e)
#{{ $e->id }} · {{ $e->kind }} · autor #{{ $e->actor_id }}

{{ $e->reason }}

{{ $e->previous }}
{{ $e->subsequent }}
@endforeach
+@php $last=max($i['pagination']['last_page'],$b['pagination']['last_page'],...array_column($b['evidence_pagination'],'last_page'),...array_column($data['pagination'],'last_page'));$page=$b['pagination']['page']; @endphp +@include('accounting.receipt-recovery') +
diff --git a/resources/views/accounting/ledger-composition-demo-entry.blade.php b/resources/views/accounting/ledger-composition-demo-entry.blade.php new file mode 100644 index 0000000..a1de474 --- /dev/null +++ b/resources/views/accounting/ledger-composition-demo-entry.blade.php @@ -0,0 +1 @@ +Percurso financeiro composto QA

Percurso financeiro composto QA

Uma empresa, unidade, diário e período artificiais. A fixture inicial contém factura de teste1000, obrigação de fornecedor60 e custo original275 lançado, com sucessor295 validado. Não contém abertura de recebíveis, contabilização da venda/fornecedor, correcção ou fecho conjuntos.

Preparar e aplicar · Conferir distintamente · Consultar

  1. Abra o painel e cada origem. No percurso Comercial, abra a obrigação documental e contabilize a factura1000 com revisão distinta.
  2. Prepare, confirme e afecte os recebimentos400 e600. Contabilize cada afectação; peça e aprove a reversão400 e contabilize-a. Saldo final400.
  3. Conferir fornecedor60 e aplicar o seu reconhecimento uma vez no diário.
  4. Na ordem de oficina, conferir original275 e sucessor295; capturar, rever e aplicar o par indivisível de correcção.
  5. Consultar diário8 lançamentos/17 linhas, bruto3305 por lado, contas cliente400/custo295. Capturar, rever distintamente e fechar o período conjunto.

Use sessões separadas. Sem reposição automática. Contas, imposto documental e actores artificiais. Sem dinheiro, utilização real, activação de Compras ou publicação. Revisão visual e implantação continuam pendentes.

diff --git a/resources/views/accounting/ledger-composition.blade.php b/resources/views/accounting/ledger-composition.blade.php new file mode 100644 index 0000000..28c3f66 --- /dev/null +++ b/resources/views/accounting/ledger-composition.blade.php @@ -0,0 +1,29 @@ +@php +$closed=$data['period']?->status==='closed'; +$money=fn($n)=>number_format($n/100,2,',',' ').' MZN'; +$pager=function($key,$p)use($data){$q=$data['query'];$links=[];foreach([-1=>'Anterior',1=>'Seguinte'] as $d=>$label)if($p['page']+$d>=1&&$p['page']+$d<=$p['last_page'])$links[]=['label'=>$label,'url'=>'?'.http_build_query(array_merge($q,[$key=>$p['page']+$d]))];return $links;}; +@endphp +Percurso financeiro composto QA
+
Perfis e guia QA · Diário detalhado · Balancete e razão

Vendas, fornecedores e custos no mesmo diário

Exclusivamente sintético. Empresa #{{ $data['scope']['company_id'] }} / unidade #{{ $data['scope']['unit_id'] }}. Sem emissão fiscal, dinheiro ou utilização real.

Os cartões mostram evidências registadas. Abra cada origem para conferir o estado actual, dependências, versões e impacto antes de decidir. Nenhuma associação ou operação é executada ao consultar este painel.

+@foreach(array_merge(['sales'=>'Comercial e recebíveis','costs'=>'Oficina e custos directos','suppliers'=>'Obrigações a fornecedores'],config('industrial_ledger.synthetic_enabled')===true?['industrial'=>'Lote industrial e CIF seleccionado']:[]) as $kind=>$label) +@php $panel=$data['panels'][$kind]; @endphp +

{{ $label }}

@if(!$panel['allowed'])

Consulta da origem indisponível para este perfil.

@else +@forelse($panel['rows'] as $row)
+@if($kind==='sales')

Factura {{ $row['number'] }}

Abertura financeira confirmada: {{ $row['confirmed_opening']?'sim':'não' }}. Lançamento original: {{ $row['original_journal_id']??'pendente' }}.

+@elseif($kind==='costs')

Ordem #{{ $row['order_id'] }}

Cálculo #{{ $row['calculation_id']??'pendente' }} / versão {{ $row['calculation_version']??'—' }}. Decisão registada: {{ $row['recorded_decision']??'pendente' }}. Original #{{ $row['original_journal_id']??'pendente' }}; resultado de correcção #{{ $row['recorded_correction_result_id']??'pendente' }}.

Conferência actual das dependências exigida na origem.

+@elseif($kind==='industrial')

Lote #{{ $row['lot_id'] }}

Resultado #{{ $row['result_id']??'pendente' }} / versão {{ $row['result_version']??'—' }} · decisão registada {{ $row['recorded_decision']??'pendente' }} · lançamento #{{ $row['original_journal_id']??'pendente' }}. Conferir dependências actuais na origem; residual separado.

+@else

Fornecedor · {{ $row['document_number'] }}

Principal reconhecido {{ $money($row['principal_minor']) }}; este valor não representa saldo actual. Lançamento original #{{ $row['original_journal_id']??'pendente' }}.

Conferir origem e obrigação@endif +
@empty

Nenhum registo neste contexto e página.

@endforelse +@php $key=['sales'=>'invoices_page','costs'=>'costs_page','suppliers'=>'suppliers_page','industrial'=>'industrial_page'][$kind]; @endphp@endif
@endforeach +

Diário conjunto

Débitos {{ $money($data['book']['totals']['debit_minor']) }} · créditos {{ $money($data['book']['totals']['credit_minor']) }}.

@foreach($data['book']['journals'] as $j)@php $source=json_decode($j->snapshot,true)['source']; @endphp

Lançamento #{{ $j->id }} · {{ $source['effect_type'] }} · {{ $j->journal_on }} · {{ $money($j->debit_minor) }}

Proposta #{{ $j->proposal_id }} · revisão #{{ $j->review_id }} · autor #{{ $j->posted_by }} · {{ $j->reason }}

@endforeach
+

Conferência e fecho conjunto

Período {{ $data['period']?->period_key }} · {{ $data['period']?->status }}. A confirmação revalida todas as fontes compostas, incluindo as que não aparecem nesta página. Uma pendência impede o fecho.

@if($closed)

Período QA encerrado. Consulta preservada, sem reabertura.

@elseif(!$data['all_current_source_views'])

Este perfil não pode conferir todas as origens. Não há acções de fecho neste painel.

@endif +@if(!$closed&&$data['all_current_source_views']&&$data['period_permissions']['period_prepare'])
@endif +@foreach($data['checks']['rows'] as $item)@php $p=(object)$item['capture'];$r=$item['review']; @endphp

Conferência #{{ $p->id }}

Preparador #{{ $p->prepared_by }} · {{ $p->reason }} · versão {{ $p->revision }}

Evidências e impacto capturados
{{ $p->snapshot }}
@if($r)

{{ $r->decision }} · autor #{{ $r->actor_id }} · {{ $r->reason }}

@endif +@if(!$closed&&$data['all_current_source_views']&&!$r&&$data['period_permissions']['period_validate']&&$p->prepared_by!==auth()->id())
@endif +@if(!$closed&&$data['all_current_source_views']&&$r?->decision==='approved'&&$data['period_permissions']['period_close']&&$p->prepared_by===auth()->id())
@endif +@if($item['closure'])

Fecho #{{ $item['closure']->id }} · {{ $item['closure']->reason }}

@endif
@endforeach
+@include('accounting.receipt-recovery') +
diff --git a/resources/views/accounting/ledger-cycle-entry.blade.php b/resources/views/accounting/ledger-cycle-entry.blade.php new file mode 100644 index 0000000..d9eee8b --- /dev/null +++ b/resources/views/accounting/ledger-cycle-entry.blade.php @@ -0,0 +1 @@ +Ciclo contabilístico integrado — QA

Ciclo financeiro e contabilístico sintético

Obrigação #{{ $obligation }} de60MZN já reconhecida financeiramente. Nenhum lançamento ou pagamento nesta fixture inicial. Contas e período artificiais, sem uso real.

Preparar / aplicar · Rever com outra pessoa · Consultar

  1. Capturar, rever e lançar o reconhecimento de60.
  2. Em Compras, preparar pagamento sintético20, confirmação independente, afectação20 e sua confirmação. Saldo40.
  3. Capturar, rever e contabilizar a afectação confirmada. O lançamento não volta a abater a dívida.
  4. Preparar e confirmar reversão integral da afectação; saldo60. Conferir e contabilizar a reversão.
  5. Capturar par de correcção técnica do reconhecimento original; revisão independente e aplicação conjunta de estorno60/substituição60.
  6. Capturar conferência do períodoQA-2026-10, rever com outra pessoa e fechar. Novas gravações nesse período são recusadas.

Referências sintéticas únicas SIM-… e data29/10/2026. Registos e decisões são conservados; sem reset automático. Não há reabertura, execução monetária ou reconciliação bancária. Revisão visual e implantação continuam separadas.

diff --git a/resources/views/accounting/payable-flow-entry.blade.php b/resources/views/accounting/payable-flow-entry.blade.php new file mode 100644 index 0000000..35c06bd --- /dev/null +++ b/resources/views/accounting/payable-flow-entry.blade.php @@ -0,0 +1 @@ +Percurso integrado SGF — QA

Da conferência financeira ao lançamento

Ensaio integrado de 60 MZN. Origem local #{{ $source }}, duas contas e período artificiais. Começa sem obrigação reconhecida ou lançamento. As decisões da equipa ficam conservadas; não há reposição automática.

Preparar / aplicar · Rever com outra identidade · Consultar evidências

  1. Preparador abre a conferência e prepara a proposta financeira.
  2. Revisor confere a mesma origem e reconhece a obrigação.
  3. Preparador abre o percurso e captura a proposta contabilística.
  4. Revisor aprova ou recusa a fotografia exacta e o impacto.
  5. Preparador aplica uma vez; consulta mostra origem, posição, lançamento e extracto.

Data explícita 29/10/2026. Sem pagamento, alteração de stock ou orçamento. Recibo documental sintético, sem ligação viva a Compras. Revisão visual e implantação pendentes.

diff --git a/resources/views/accounting/payable-flow.blade.php b/resources/views/accounting/payable-flow.blade.php new file mode 100644 index 0000000..f51c5b8 --- /dev/null +++ b/resources/views/accounting/payable-flow.blade.php @@ -0,0 +1,26 @@ +@php + $money=static fn($n)=>$n===null?'Indeterminado':($n<0?'-':'').number_format(intdiv(abs($n),100),0,',',' ').','.str_pad((string)(abs($n)%100),2,'0',STR_PAD_LEFT).' MZN'; + $source=$flow['source_id'];$position=$flow['position'];$proposal=$flow['proposal'];$review=$flow['review'];$journal=$flow['journal']; +@endphp +Conferência até ao lançamento — SGF
+
Diário e extracto · Navegação SGF

Conferência → obrigação → lançamento

Demonstração sintética. Cada decisão mantém o seu autor, fundamento e revisão. Abrir uma etapa não reconhece uma obrigação nem aplica um lançamento.

Empresa #{{ $flow['scope']['company_id'] }} / Unidade #{{ $flow['scope']['unit_id'] }} · Origem local #{{ $source }}

@if(session('ledger_demo'))Trocar função sintética@endif
+ +

1. Documento e conferência financeira

{{ $flow['document']['number'] }} · {{ $money($flow['document']['total_minor']) }}

A origem desta demonstração é um recibo sintético. Não comprova ligação operacional viva a Compras. Consulte a fotografia, pendências e propostas antes de decidir.

Fotografia documental
{{ json_encode($flow['document'],JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE) }}
+

2. Reconhecimento independente e posição financeira

+@if($position)

Obrigação #{{ $position['id'] }} · Principal {{ $money($position['principal_minor']) }} · Saldo {{ $money($position['balance_minor']) }}

Vencimento {{ $position['due_on']??'desconhecido' }}. O lançamento contabilístico não reduz o saldo.

@if($flow['source_conflict'])

Origem divergente. Exige nova conferência; a existência de uma proposta contabilística não resolve esta pendência.

@endif +@else

Ainda não reconhecida. Um documento ou uma proposta preparados não são uma obrigação validada. A contabilidade recusará uma origem sem reconhecimento.

@endif + +@foreach($flow['financial_proposals'] as $p)
Proposta financeira #{{ $p->id }} · captura {{ $p->capture_version }}

{{ $p->reason }}

{{ $p->snapshot }}
@endforeach +@foreach($flow['financial_events'] as $event)
Evidência #{{ $event->id }} · {{ $event->kind }} · autor #{{ $event->actor_id }} · {{ $event->created_at }}
{{ $event->payload }}
@endforeach
+

3. Preparação e revisão contabilística

+@if($proposal)

Proposta #{{ $proposal->id }} · captura {{ $proposal->capture_version }} · autor #{{ $proposal->prepared_by }}

Revisão exacta {{ $proposal->revision }}

{{ $review ? ($review->decision==='approved'?'Aprovada':'Recusada').' por #'.$review->reviewed_by : 'Conferência independente pendente' }}

+@else

Sem proposta contabilística. A preparação exige uma obrigação reconhecida e configuração compatível.

@endif +@if($position)Abrir proposta e impacto desta obrigação@endif
+

4. Aplicação única e extracto

+@if($journal)

Lançamento #{{ $journal->id }} · {{ $journal->journal_on }} · Débito {{ $money($journal->debit_minor) }} / Crédito {{ $money($journal->credit_minor) }}

Aplicador #{{ $journal->posted_by }} · {{ $journal->created_at }} · {{ $journal->reason }}

Conferir comprovativo, linhas e histórico +@else

Nenhum lançamento aplicado. A aprovação da proposta não o aplica automaticamente.

@endif
+

Revisão visual, carga de implantação, contas reais e composição autónoma contabilística continuam separadas. Esta página consulta o estado actual; as fotografias aplicadas conservam o histórico.

+
diff --git a/resources/views/accounting/receipt-recovery.blade.php b/resources/views/accounting/receipt-recovery.blade.php new file mode 100644 index 0000000..0b88643 --- /dev/null +++ b/resources/views/accounting/receipt-recovery.blade.php @@ -0,0 +1,17 @@ +

Consultar comprovativo de um pedido

Se perdeu a resposta, consulte a chave apresentada pela operação. Esta consulta mostra apenas comprovativos seus no contexto actual e não executa operações. A ausência de comprovativo nesta captura não prova falha nem autoriza repetição; confira o estado e as evidências antes de reenviar.

+ \ No newline at end of file diff --git a/resources/views/accounting/sales-demo-entry.blade.php b/resources/views/accounting/sales-demo-entry.blade.php new file mode 100644 index 0000000..5bf2083 --- /dev/null +++ b/resources/views/accounting/sales-demo-entry.blade.php @@ -0,0 +1 @@ +Ciclo Comercial — QA

Comercial, recebíveis e contabilidade — ensaio integrado

Factura de teste #{{ $invoice }} efectivamente emitida: base862,07, imposto documental137,93, total1000MZN. Sem validade fiscal ou movimentação de dinheiro. A emissão e as suas revisões ficam preservadas; abertura da dívida, recebimentos e lançamentos ainda exigem decisões.

Preparar / aplicar · Rever com outra pessoa · Consultar

  1. Preparar abertura da obrigação1000; outra pessoa confirma.
  2. Capturar três linhas contabilísticas; rever e aplicar uma vez.
  3. Preparar recebimento400, confirmar independentemente e afectar400. Saldo600; conferir e contabilizar a afectação.
  4. Repetir com600. Saldo0; contabilizar essa afectação.
  5. Preparar reversão integral da primeira afectação400; outra pessoa aprova. Saldo400; conferir e contabilizar a reversão.
  6. Conferir o períodoQA-2026-10, obter revisão distinta e fechar. Conta de clientes e posição financeira devem indicar400.

Data explícita29/10/2026, contas artificiais. Não há reset ou reabertura. Demos e provas anteriores ficam separadas. Revisão visual e implantação permanecem pendentes.

diff --git a/resources/views/accounting/sales-ledger.blade.php b/resources/views/accounting/sales-ledger.blade.php new file mode 100644 index 0000000..c5177f0 --- /dev/null +++ b/resources/views/accounting/sales-ledger.blade.php @@ -0,0 +1,47 @@ +@php + $c=$data['commercial'];$inv=$c['invoice'];$id=$inv['id']??null;$p=$c['position']??null;$ob=$c['obligation_id']??null; + $money=static fn($n)=>($n<0?'-':'').number_format(intdiv(abs($n),100),0,',',' ').','.str_pad((string)(abs($n)%100),2,'0',STR_PAD_LEFT).' MZN'; + $fp=$c['finance_permissions']??[]; + $periodClosed=(collect($data['periods'])->where('period_key','QA-2026-10')->sortByDesc('version')->first()?->status)==='closed'; + if($periodClosed){$fp=array_fill_keys(array_keys($fp),false);$data['permissions']=array_fill_keys(array_keys($data['permissions']),false);} +@endphp +Comercial, recebíveis e contabilidade — QA
+
Diário e extracto · Navegação SGF@if(session('sales_demo')) · Trocar função sintética@endif

Comercial → Recebíveis → Contabilidade

TESTE — SEM VALIDADE FISCAL. Sem movimentação de dinheiro. Contas e período artificiais, sem reabertura. As decisões da emissão e da dívida permanecem separadas do lançamento.

Empresa #{{ $c['scope']['company_id'] }} / Unidade #{{ $c['scope']['unit_id'] }}. As operações financeiras abaixo seleccionam explicitamente Financeiro, usam os seus comandos existentes e regressam a Contabilidade. Cada envio exige fundamento; mudança de contexto invalida separadores antigos.

+

Escolher documento emitido

+@if($periodClosed)

Período QA encerrado. Este percurso conserva a consulta e os comprovativos; não propõe novos efeitos para o período fechado. Não existe reabertura ou reposição automática do exemplo.

@endif +@if($inv) +

1. Documento original e cálculo conservado

Factura #{{ $id }} · Base {{ $inv['snapshot']['calculation']['base_exact'] }} · Imposto documental {{ $inv['snapshot']['calculation']['vat_document_proposed'] }} · Total {{ $inv['snapshot']['calculation']['total_document_proposed'] }} MZN.

IVA exacto de teste {{ $inv['snapshot']['calculation']['vat_exact'] }}; diferença conservada {{ $inv['snapshot']['calculation']['discarded_difference'] }}. Não se recalcula o imposto ao contabilizar.

Fotografia de emissão, pressupostos e versões
{{ json_encode($inv['snapshot'],JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE) }}
+

2. Obrigação e recebimentos sintéticos

+@if($p)

Obrigação #{{ $ob }} · Principal {{ $p['original'] }} MZN · Saldo {{ $p['balance'] }} MZN · Recebimentos por afectar {{ $p['available'] }} MZN · revisão {{ $p['revision'] }}

Vencimento {{ $p['due_date']??'desconhecido' }}. As posições vêm do núcleo financeiro existente; um lançamento não abate o saldo novamente.

+@if(!$p['opened'])

Esta é uma proposta de abertura ainda sem confirmação. O montante proposto não constitui dívida aprovada; o reconhecimento contabilístico fica bloqueado.

@endif +@else

Nenhuma obrigação confirmada. Primeiro preparar a abertura e obter decisão independente; o documento sozinho não aprova a dívida.

@endif +@if(($fp['prepare']??false)&&!$ob)
@endif +@if(($fp['prepare']??false)&&($p['opened']??false))
@endif +@foreach($c['records'] as $r)

Registo financeiro #{{ $r->id }} · {{ $r->kind }} · {{ $r->amount }} MZN

Autor #{{ $r->actor_id }} · {{ $r->created_at }} · {{ $r->decision_kind??'Decisão pendente' }}

Origem, fundamento e versão
{{ $r->data }}
+@if(!$r->decision_kind&&($r->kind==='correction'?($fp['correction_approve']??false):($fp['confirm']??false))&&$r->actor_id!==auth()->id())
@endif +@if($r->kind==='receipt'&&($fp['allocate']??false)&&(($p['receipts'][$r->id]['state']??'')==='confirmed'))

Disponível deste recebimento: {{ $p['receipts'][$r->id]['available'] }} MZN.

@endif +
@endforeach
+

3. Fontes contabilísticas e reversão financeira

+@if(($p['opened']??false)&&$data['permissions']['prepare'])
@endif +@foreach($c['effects'] as $e)@if(in_array($e->kind,['allocate','reverse_allocation']))

Efeito #{{ $e->id }} · {{ $e->kind }} · {{ $e->amount }} MZN

Registo #{{ $e->record_id }} · autor #{{ $e->actor_id }} · {{ $e->created_at }}

+@if($data['permissions']['prepare'])
@endif +@if($e->kind==='allocate'&&($fp['correction_request']??false))
@endif
@endif @endforeach
+

4. Conferência e aplicação contabilística

@foreach($data['book']['proposals'] as $proposal)@php $snap=json_decode($proposal->snapshot,true);$review=collect($data['book']['reviews'])->firstWhere('proposal_id',$proposal->id); @endphp

Proposta #{{ $proposal->id }} · {{ $snap['source']['effect_type'] }}

Autor #{{ $proposal->prepared_by }} · revisão exacta {{ $proposal->revision }}

Data {{ $snap['journal_on'] }} · regra {{ $snap['rule']['rule_key'] }} v{{ $snap['rule']['version'] }} · período v{{ $snap['period']['version'] }}.

    @foreach($snap['lines'] as $line)
  • {{ $line['account_code'] }} · D {{ $money($line['debit_minor']) }} / C {{ $money($line['credit_minor']) }}
  • @endforeach

Impacto D/C {{ $money($snap['impact']['debit_minor']) }}; sem nova dívida ou alteração do saldo financeiro.

Fotografia exacta da fonte, regra e período
{{ json_encode($snap,JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE) }}

{{ $review?'Decisão '.$review->decision.' por #'.$review->reviewed_by:'Revisão independente pendente' }} · {{ $proposal->journal_id?'Lançamento #'.$proposal->journal_id:'' }}

+@if($data['permissions']['validate']&&!$review&&$proposal->prepared_by!==auth()->id())
@endif +@if($data['permissions']['post']&&$review&&$review->decision==='approved'&&!$proposal->journal_id&&$proposal->prepared_by===auth()->id())
@endif
@endforeach
+

5. Fecho QA, extracto e evidências

Totais brutos desta factura: D {{ $money($data['book']['totals']['debit_minor']) }} / C {{ $money($data['book']['totals']['credit_minor']) }}. Não representam saldo por receber.

O fecho abaixo confere todos os efeitos reconhecidos da empresa/unidade, incluindo fornecedores quando existirem; não apenas a factura seleccionada.

@if($data['permissions']['period_prepare'])
@endif +@if($data['client_account'])

Conta de clientes desta factura: débito menos crédito {{ $money($data['client_account']['net_minor']) }}. Compare com a posição financeira acima; efeitos confirmados ainda não lançados continuam pendentes de conferência.

@endif +@foreach($data['period_checks'] as $check)@php $periodReview=collect($data['period_reviews'])->firstWhere('check_id',$check->id);$closed=collect($data['period_closures'])->firstWhere('check_id',$check->id); @endphp

Conferência #{{ $check->id }} · {{ $check->period_key }}

{{ $check->snapshot }}

{{ $closed?'Fecho #'.$closed->id:($periodReview?'Revisão '.$periodReview->decision:'Revisão pendente') }}

+@if($data['permissions']['period_validate']&&!$periodReview&&!$closed)
@endif +@if($data['permissions']['period_close']&&$periodReview&&$periodReview->decision==='approved'&&!$closed)
@endif
@endforeach +@foreach($data['book']['journals'] as $j)
Lançamento #{{ $j->id }} · {{ $j->journal_on }} · D/C {{ $money((int)$j->debit_minor) }}

Proposta #{{ $j->proposal_id }} · revisão #{{ $j->review_id }} · autor #{{ $j->posted_by }} · {{ $j->reason }}

{{ $j->snapshot }}
@endforeach +@foreach($data['book']['events'] as $event)
Evidência #{{ $event->id }} · {{ $event->kind }} · autor #{{ $event->actor_id }} · {{ $event->created_at }}

{{ $event->reason }}

{{ $event->previous }}
{{ $event->subsequent }}
@endforeach
+@endif +@php $pagers=$data['pagination']+['documents'=>$c['pagination']]+($id?['financial_records'=>$c['records_pagination'],'financial_effects'=>$c['effects_pagination']]+$data['book']['evidence_pagination']:[]);$current=$c['pagination']['page'];$max=max(array_column($pagers,'last_page')); @endphp +@include('accounting.receipt-recovery') +
diff --git a/resources/views/accounting/stock-valuation-read.blade.php b/resources/views/accounting/stock-valuation-read.blade.php new file mode 100644 index 0000000..270c65f --- /dev/null +++ b/resources/views/accounting/stock-valuation-read.blade.php @@ -0,0 +1,3 @@ +Stock valorizado — consulta QA

Stock valorizado — livro de origem QA

Consulta do mesmo livro físico e contabilístico, com acesso SQL apenas de leitura. As confirmações pertencem à composição de origem; esta página não executa movimentos ou lançamentos.

Estado: {{ $data['status'] }} · Livro {{ $data['book']['id'] }} · artigo {{ $data['book']['stock_item_id'] }} · armazém {{ $data['book']['warehouse_id'] }} · {{ $data['book']['period_key'] }}

Quantidade física: {{ $data['physical_quantity_milli'] }} milésimos de {{ $data['book']['unit'] }}. Valor contabilizado de stock: {{ number_format($data['posted_stock_value_minor']/100,2,',',' ') }} MZN. Movimentos sem valorização: {{ $data['unposted_movements'] }}. Lançamentos com taxa anterior: {{ $data['stale_rate_journals'] }}.

@if($data['status']!=='reconciled')

Conferência incompleta. O valor contabilizado não é uma valorização actual confirmada de todo o stock.

@endif +

A indicação de reconciliação cobre os movimentos com lançamento e as versões de taxa. A conferência actual das restantes dependências e do período pertence à composição de origem; esta consulta não a substitui.

@foreach($data['journals'] as $journal)@endforeach
Lançamentos de origem — página {{ $data['pagination']['page'] }}
IdentificadorDataValor débito/crédito MZNEvidência imutável
{{ $journal->id }}{{ $journal->journal_on }}{{ number_format($journal->debit_minor/100,2,',',' ') }}
Origem, taxa, revisão e dependências
{{ json_encode(json_decode($journal->snapshot,true),JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE) }}
+
diff --git a/resources/views/geography-workspace.blade.php b/resources/views/geography-workspace.blade.php new file mode 100644 index 0000000..1b68f69 --- /dev/null +++ b/resources/views/geography-workspace.blade.php @@ -0,0 +1 @@ +Localização e segmentação — SGF
Voltar ao SGF

Localização para segmentação

Indique apenas a precisão territorial conhecida. A selecção conserva a versão e os códigos da cartografia. Não altera endereços fiscais ou de entrega, direitos de acesso, revisão de fornecedores ou localizações de registos dependentes.

Escolher território da cartografia

Nenhum território escolhido.

diff --git a/resources/views/order-workspace.blade.php b/resources/views/order-workspace.blade.php new file mode 100644 index 0000000..0a1733a --- /dev/null +++ b/resources/views/order-workspace.blade.php @@ -0,0 +1 @@ +Ordens de compra — SGF@include('partials.purchasing-navigation')
Voltar ao SGFRecepção de mercadoria

Ordens de compra

Ensaio sintético. Emitir uma ordem não recebe mercadoria, não cria uma factura e não executa um pagamento. Sem envio externo.

Adjudicações autorizadas neste contexto

diff --git a/resources/views/partials/purchasing-navigation.blade.php b/resources/views/partials/purchasing-navigation.blade.php new file mode 100644 index 0000000..159d202 --- /dev/null +++ b/resources/views/partials/purchasing-navigation.blade.php @@ -0,0 +1,14 @@ +@php($purchasingLinks=app(\App\Modules\Purchasing\WorkspaceNavigation::class)->links()) +@if(config('purchasing_workspace.single_installation')===true) +@php($activeProfile=collect(config('purchasing_workspace.profiles',[]))->firstWhere('user_id',auth()->id())) + +
Compras · {{ $activeProfile['label'] ?? 'Função autorizada' }} · Entrada de Compras / trocar função · {{ \Illuminate\Support\Facades\DB::table('companies')->where('id',app(\App\Shared\Context\CompanyContext::class)->identifiers()['company_id'])->value('name') }} · {{ \Illuminate\Support\Facades\DB::table('units')->where('id',app(\App\Shared\Context\CompanyContext::class)->unitId())->value('name') }}
+@endif +@if(count($purchasingLinks)) + +@endif diff --git a/resources/views/purchasing-dossier.blade.php b/resources/views/purchasing-dossier.blade.php new file mode 100644 index 0000000..5a839ba --- /dev/null +++ b/resources/views/purchasing-dossier.blade.php @@ -0,0 +1 @@ +Dossiê de Compras — SGF@include('partials.purchasing-navigation')

Dossiê de Compras

Consulta das origens e registos efectivos da requisição. Cada etapa exige o seu direito de consulta; uma etapa restrita não é apresentada como vazia. Esta página não prepara, confirma, paga ou contabiliza.

diff --git a/resources/views/purchasing-entry.blade.php b/resources/views/purchasing-entry.blade.php new file mode 100644 index 0000000..e374914 --- /dev/null +++ b/resources/views/purchasing-entry.blade.php @@ -0,0 +1,5 @@ +Compras — SGF Tempo
Abrir o SGF

Compras

{{ $company->name }} · {{ $unit->name }}

Uma instalação para fornecedores, requisições, propostas, adjudicação, ordens, recepções, facturas e obrigações. Escolha a função que vai exercer; as revisões e aprovações exigem identidades distintas.

Ambiente sintético local. Os documentos ficam conservados nesta instalação. Não são pagamentos, emissão fiscal ou operações reais.

+

Como percorrer uma compra

Compras prepara o fornecedor; Finanças confere. O solicitante cria a necessidade e a chefia aprova. Compras regista propostas; Compras e Finanças avaliam. A chefia decide a adjudicação e Compras emite a ordem. Armazém recebe. Finanças regista a factura, o revisor valida. Finanças prepara a obrigação e o revisor reconhece.

Para trocar de função use «Entrada de Compras / trocar função», disponível em todas as etapas. As listas e os atalhos mantêm os mesmos documentos; não precisa de copiar identificadores.

Entrar numa função

+@foreach($profiles as $key=>$profile)

{{ $profile['label'] }}

{{ $profile['description'] }}

@csrf
+@if($returnTo && preg_match('~^/purchasing/([a-z]+)(?:\?|$)~',$returnTo,$m) && isset($profile['stages'][$m[1]]))
@csrf
@endif +
@endforeach

O orçamento e os cadastros de ensaio estão preparados. As decisões são individuais e conservam fundamento, versão e histórico. Nenhuma função recebe acesso real por esta entrada.

diff --git a/resources/views/purchasing-workspace.blade.php b/resources/views/purchasing-workspace.blade.php new file mode 100644 index 0000000..bc12b0f --- /dev/null +++ b/resources/views/purchasing-workspace.blade.php @@ -0,0 +1,4 @@ +Percurso de Compras — SGF@include('partials.purchasing-navigation')
Voltar ao SGF

Percurso de Compras

Continue as etapas disponíveis para o seu perfil na empresa e unidade actuais. Os documentos são os mesmos entre etapas; não é necessário copiar identificadores ou criar outro saldo.

Requisição aprovada → propostas comparadas e adjudicação aprovada → ordem emitida → recepção aceite → factura conferida → obrigação reconhecida. Cada decisão continua individual, fundamentada e sujeita às permissões actuais.

+@foreach($links as $step)@endforeach +@if(config('purchasing_workspace.single_installation')===true)

Documentos nesta instalação

@endif +

Ensaio sintético. As páginas apresentam os registos autorizados e a evidência efectiva. Este mapa não confirma operações, não atribui localizações, não paga e não contabiliza.

diff --git a/resources/views/purchasing/payable-report.blade.php b/resources/views/purchasing/payable-report.blade.php new file mode 100644 index 0000000..f12bc1d --- /dev/null +++ b/resources/views/purchasing/payable-report.blade.php @@ -0,0 +1,17 @@ +@php + $money = static fn ($n) => $n === null ? 'Indeterminado' : number_format(intdiv($n, 100), 0, ',', ' ').','.str_pad((string) abs($n % 100), 2, '0', STR_PAD_LEFT).' MZN'; + $query = http_build_query($report['criteria'], '', '&', PHP_QUERY_RFC3986); + $details = http_build_query($report['criteria'] + ['recognition' => 'recognised'], '', '&', PHP_QUERY_RFC3986); +@endphp +Relatório de obrigações — ensaio SGF +
+
Conferir documentos, posições e evidências

Obrigações reconhecidas — posição actual

ENSAIO SINTÉTICO. Este relatório agrega as posições financeiras pelo núcleo existente. Não constitui razão contabilístico, balancete, reconciliação bancária ou relatório histórico por data de corte.

Históricos importados usam recibos de ensaio conferidos. Não há origem histórica SGF viva ou passagem operacional de responsabilidade validada.

Capturado em {{ $report['captured_at_utc'] }} UTC · Empresa #{{ $report['scope']['company_id'] }} / Unidade #{{ $report['scope']['unit_id'] }}

+

Critérios

+@if(isset($report['criteria']['source']))

Origem local #{{ $report['criteria']['source'] }} · Consultar todas as origens

@endif +

Apenas obrigações reconhecidas dos documentos abrangidos. Documentos por reconhecer e pagamentos ainda por afectar não são abatidos como dívida liquidada.

+

Posição abrangida

Obrigações reconhecidas
{{ $report['totals']['count'] }}
Principal original reconhecido
{{ $money($report['totals']['principal_minor']) }}
Saldo global por liquidar
{{ $money($report['totals']['balance_minor']) }}
Posições com saldo indeterminado
{{ $report['totals']['unknown_balance_count'] }}
Obrigações com vencimento desconhecido
{{ $report['totals']['unknown_due_count'] }}
+@if($report['totals']['unknown_balance_count'])

Há evidência por conferir. O saldo global permanece indeterminado; o montante conhecido abaixo é parcial e não representa o total por liquidar.

@endif +
+

Componentes das posições conhecidas

Posições com saldo sustentado
{{ $report['known_positions']['count'] }}
Principal dessas posições
{{ $money($report['known_positions']['principal_minor']) }}
Confirmados históricos incorporados
{{ $money($report['known_positions']['historical_confirmed_minor']) }}
Afectações líquidas de reversões
{{ $money($report['known_positions']['net_allocated_minor']) }}
Saldo conhecido{{ $report['totals']['unknown_balance_count'] ? ' — parcial' : '' }}
{{ $money($report['known_positions']['balance_minor']) }}

Conferência: principal conhecido − confirmados históricos − afectações líquidas = saldo conhecido. Reversões preservam os originais e são consideradas pelo núcleo financeiro.

+

Rastreabilidade

Identificador de conteúdo das posições: {{ $report['positions_sha256'] }}

O mesmo conteúdo e âmbito produzem o mesmo identificador. Uma nova consulta ou os documentos abertos depois podem já reflectir alterações posteriores à captura.

Consultar os dados deste relatório em JSON

O link gera uma nova captura da posição actual; não recupera um documento arquivado. Não se guardou um relatório ou um lançamento por esta consulta.

+
diff --git a/resources/views/receipt-workspace.blade.php b/resources/views/receipt-workspace.blade.php new file mode 100644 index 0000000..fcb9bf3 --- /dev/null +++ b/resources/views/receipt-workspace.blade.php @@ -0,0 +1,3 @@ +Recepção de mercadoria — SGF + +@include('partials.purchasing-navigation')
Voltar ao SGF

Recepção de mercadoria

Ensaio sintético — sem utilização operacional. Receber mercadoria não paga nem contabiliza a compra.

Ordens autorizadas

diff --git a/resources/views/request-workspace.blade.php b/resources/views/request-workspace.blade.php new file mode 100644 index 0000000..69a3f59 --- /dev/null +++ b/resources/views/request-workspace.blade.php @@ -0,0 +1 @@ +Requisições para compra — SGF@include('partials.purchasing-navigation')
Voltar ao SGFFornecedoresPropostas e adjudicação

Requisições para compra

Ensaio sintético. Este percurso usa o mesmo livro de Compras desde o rascunho até à ordem. Submeter reserva uma vez; rejeitar liberta a reserva. A aprovação exige outra identidade. Não converte requisições antigas nem transfere os seus saldos.

diff --git a/resources/views/sourcing-workspace.blade.php b/resources/views/sourcing-workspace.blade.php new file mode 100644 index 0000000..55d94ce --- /dev/null +++ b/resources/views/sourcing-workspace.blade.php @@ -0,0 +1 @@ +Propostas e adjudicação — SGF@include('partials.purchasing-navigation')
Voltar ao SGFOrdens de compra@if(config('receipt_qa.suppliers_enabled')===true)Fornecedores e revis?o@endif

Propostas, comparação e adjudicação

Ensaio sintético. Cada proposta, avaliação e decisão exige conferência individual. A pontuação não selecciona um fornecedor automaticamente. Sem envio externo.

Processos autorizados

diff --git a/resources/views/supplier-invoice-workspace.blade.php b/resources/views/supplier-invoice-workspace.blade.php new file mode 100644 index 0000000..c40f8be --- /dev/null +++ b/resources/views/supplier-invoice-workspace.blade.php @@ -0,0 +1 @@ +Conferência de facturas de fornecedor — SGF@include('partials.purchasing-navigation')
Voltar ao SGF@if($obligations)Reconhecer obrigação separadamente@endif

Conferência de facturas de fornecedor

Ensaio sintético. Registe os dados do documento recebido e confira-os com a ordem e a recepção aceite. A validação exige outra identidade e consome o compromisso no mesmo livro orçamental. Não emite documentos fiscais, não paga nem lança na contabilidade.

Ordens da origem autorizada

diff --git a/resources/views/supplier-obligation-workspace.blade.php b/resources/views/supplier-obligation-workspace.blade.php new file mode 100644 index 0000000..c5f5e3c --- /dev/null +++ b/resources/views/supplier-obligation-workspace.blade.php @@ -0,0 +1 @@ +Reconhecimento de obrigações — SGF@include('partials.purchasing-navigation')
Voltar ao SGFConferir facturas

Reconhecimento de obrigações

Ensaio sintético. A factura conferida é a origem; preparar não reconhece dívida. Outra pessoa valida a versão exacta no mesmo núcleo. Vencimento desconhecido permanece pendente, com atraso indeterminado. Este percurso não paga, não contabiliza e não volta a consumir orçamento ou stock.

diff --git a/resources/views/supplier-workspace.blade.php b/resources/views/supplier-workspace.blade.php new file mode 100644 index 0000000..0e4a892 --- /dev/null +++ b/resources/views/supplier-workspace.blade.php @@ -0,0 +1 @@ +Fornecedores — SGF@include('partials.purchasing-navigation')
Voltar ao SGFPropostas e adjudicação

Fornecedores e revisão independente

Ensaio sintético. Preparar uma ficha deixa-a pendente. Outra identidade confere os dados e decide a activação ou suspensão da versão exacta. Alterações voltam a exigir revisão. Documentos são referências declaradas; não há envio externo nem carregamento de anexos neste percurso.

diff --git a/routes/web.php b/routes/web.php index acfae2e..128ee1e 100644 --- a/routes/web.php +++ b/routes/web.php @@ -27,6 +27,72 @@ Route::middleware(['auth', RequireValidSession::class])->group(function (): void Route::post('/api/logout', [IdentityController::class, 'logout']); Route::post('/api/context', [IdentityController::class, 'select']); Route::middleware(RequireCompanyContext::class)->group(function (): void { + Route::get('/geography/segments/{kind}',[\App\Shared\Geography\GeographyController::class,'segmentScreen']); + Route::get('/api/geography/segments/{kind}',[\App\Shared\Geography\GeographyController::class,'segments']); + Route::get('/geography/{kind}/{id}',[\App\Shared\Geography\GeographyController::class,'screen'])->whereNumber('id'); + Route::get('/api/geography/catalogue',[\App\Shared\Geography\GeographyController::class,'catalogue']); + Route::get('/api/geography/entities/{kind}/{id}',[\App\Shared\Geography\GeographyController::class,'show'])->whereNumber('id'); + Route::get('/api/geography/entities/{kind}/{id}/history',[\App\Shared\Geography\GeographyController::class,'history'])->whereNumber('id'); + Route::post('/api/geography/entities/{kind}/{id}/preview',[\App\Shared\Geography\GeographyController::class,'preview'])->whereNumber('id'); + Route::post('/api/geography/entities/{kind}/{id}/confirm',[\App\Shared\Geography\GeographyController::class,'confirm'])->whereNumber('id'); + Route::get('/purchasing/workspace',[\App\Modules\Purchasing\WorkspaceNavigation::class,'screen']); + Route::get('/api/purchasing-suppliers/{supplier}/documents',[\App\Modules\Purchasing\SupplierDocumentsController::class,'index'])->whereNumber('supplier'); + Route::post('/api/purchasing-suppliers/{supplier}/documents/preview',[\App\Modules\Purchasing\SupplierDocumentsController::class,'preview'])->whereNumber('supplier'); + Route::post('/api/purchasing-suppliers/{supplier}/documents/confirm',[\App\Modules\Purchasing\SupplierDocumentsController::class,'confirm'])->whereNumber('supplier'); + Route::get('/api/purchasing-suppliers/{supplier}/documents/{document}/download',[\App\Modules\Purchasing\SupplierDocumentsController::class,'download'])->whereNumber('supplier')->whereNumber('document'); + Route::get('/purchasing/dossiers',[\App\Modules\Purchasing\DossierController::class,'screen']); + Route::get('/api/purchasing-dossiers',[\App\Modules\Purchasing\DossierController::class,'index']); + Route::get('/api/purchasing-dossiers/{id}',[\App\Modules\Purchasing\DossierController::class,'show'])->whereNumber('id'); + Route::get('/purchasing/obligations',[\App\Modules\Purchasing\ObligationController::class,'screen']); + Route::get('/api/purchasing-obligations',[\App\Modules\Purchasing\ObligationController::class,'index']); + Route::get('/api/purchasing-obligations/{id}',[\App\Modules\Purchasing\ObligationController::class,'show'])->whereNumber('id'); + Route::post('/api/purchasing-obligations/{id}/preview',[\App\Modules\Purchasing\ObligationController::class,'preview'])->whereNumber('id'); + Route::post('/api/purchasing-obligations/{id}/confirm',[\App\Modules\Purchasing\ObligationController::class,'confirm'])->whereNumber('id'); + Route::get('/purchasing/invoices',[\App\Modules\Purchasing\InvoiceController::class,'screen'])->name('invoices.index'); + Route::get('/api/purchasing-invoices',[\App\Modules\Purchasing\InvoiceController::class,'index']); + Route::get('/api/purchasing-invoices/orders/{id}',[\App\Modules\Purchasing\InvoiceController::class,'show'])->whereNumber('id'); + Route::get('/api/purchasing-invoices/orders/{id}/history',[\App\Modules\Purchasing\InvoiceController::class,'history'])->whereNumber('id'); + Route::post('/api/purchasing-invoices/orders/{id}/preview',[\App\Modules\Purchasing\InvoiceController::class,'preview'])->whereNumber('id'); + Route::post('/api/purchasing-invoices/orders/{id}/confirm',[\App\Modules\Purchasing\InvoiceController::class,'confirm'])->whereNumber('id'); + Route::get('/purchasing/receipts',[\App\Modules\Purchasing\ReceiptController::class,'screen']); + Route::get('/purchasing/orders',[\App\Modules\Purchasing\OrderController::class,'screen']); + Route::get('/purchasing/requests',[\App\Modules\Purchasing\RequestController::class,'screen']); + Route::get('/api/purchasing-requests',[\App\Modules\Purchasing\RequestController::class,'index']); + Route::get('/api/purchasing-requests/{id}/history',[\App\Modules\Purchasing\RequestController::class,'history'])->whereNumber('id'); + Route::get('/api/purchasing-requests/{id}',[\App\Modules\Purchasing\RequestController::class,'show'])->whereNumber('id'); + Route::post('/api/purchasing-requests/{id}/preview',[\App\Modules\Purchasing\RequestController::class,'preview'])->whereNumber('id'); + Route::post('/api/purchasing-requests/{id}/confirm',[\App\Modules\Purchasing\RequestController::class,'confirm'])->whereNumber('id'); + Route::get('/purchasing/suppliers',[\App\Modules\Purchasing\SupplierController::class,'screen']); + Route::get('/api/purchasing-suppliers',[\App\Modules\Purchasing\SupplierController::class,'index']); + Route::get('/api/purchasing-suppliers/{supplier}',[\App\Modules\Purchasing\SupplierController::class,'show'])->whereNumber('supplier')->name('suppliers.show'); + Route::get('/api/purchasing-suppliers/{supplier}/history',[\App\Modules\Purchasing\SupplierController::class,'history'])->whereNumber('supplier'); + Route::post('/api/purchasing-suppliers/{supplier}/preview',[\App\Modules\Purchasing\SupplierController::class,'preview'])->whereNumber('supplier'); + Route::post('/api/purchasing-suppliers/{supplier}/confirm',[\App\Modules\Purchasing\SupplierController::class,'confirm'])->whereNumber('supplier'); + Route::get('/purchasing/sourcing',[\App\Modules\Purchasing\SourcingController::class,'screen']); + Route::get('/api/purchasing-sourcing',[\App\Modules\Purchasing\SourcingController::class,'index']); + Route::get('/api/purchasing-sourcing/requests/{id}',[\App\Modules\Purchasing\SourcingController::class,'show'])->whereNumber('id'); + Route::get('/api/purchasing-sourcing/requests/{id}/history',[\App\Modules\Purchasing\SourcingController::class,'history'])->whereNumber('id'); + Route::get('/api/purchasing-sourcing/requests/{id}/suppliers',[\App\Modules\Purchasing\SourcingController::class,'suppliers'])->whereNumber('id'); + Route::post('/api/purchasing-sourcing/requests/{id}/preview',[\App\Modules\Purchasing\SourcingController::class,'preview'])->whereNumber('id'); + Route::post('/api/purchasing-sourcing/requests/{id}/confirm',[\App\Modules\Purchasing\SourcingController::class,'confirm'])->whereNumber('id'); + Route::get('/api/purchasing-orders',[\App\Modules\Purchasing\OrderController::class,'index']); + Route::get('/api/purchasing-orders/awards/{id}',[\App\Modules\Purchasing\OrderController::class,'show'])->whereNumber('id'); + Route::post('/api/purchasing-orders/awards/{id}/preview',[\App\Modules\Purchasing\OrderController::class,'preview'])->whereNumber('id'); + Route::post('/api/purchasing-orders/awards/{id}/issue',[\App\Modules\Purchasing\OrderController::class,'issue'])->whereNumber('id'); + Route::get('/api/purchasing-receipts',[\App\Modules\Purchasing\ReceiptController::class,'index']); + Route::get('/api/purchasing-receipts/movements/{id}/origin',[\App\Modules\Purchasing\StockReceiptTraceController::class,'show'])->whereNumber('id'); + Route::get('/api/purchasing-receipts/orders/{id}',[\App\Modules\Purchasing\ReceiptController::class,'show'])->whereNumber('id'); + Route::get('/api/purchasing-receipts/orders/{id}/history',[\App\Modules\Purchasing\ReceiptController::class,'history'])->whereNumber('id'); + Route::get('/api/purchasing-receipts/orders/{id}/lines/{line}/catalogue',[\App\Modules\Purchasing\ReceiptController::class,'catalogue'])->whereNumber('id')->whereNumber('line'); + Route::post('/api/purchasing-receipts/orders/{id}/preview',[\App\Modules\Purchasing\ReceiptController::class,'preview'])->whereNumber('id'); + Route::post('/api/purchasing-receipts/orders/{id}/confirm',[\App\Modules\Purchasing\ReceiptController::class,'confirm'])->whereNumber('id'); + Route::get('/api/purchasing-receipts/history/{id}/documents',[\App\Modules\Purchasing\ReceiptDocumentsController::class,'index'])->whereNumber('id'); + Route::post('/api/purchasing-receipts/history/{id}/documents/preview',[\App\Modules\Purchasing\ReceiptDocumentsController::class,'preview'])->whereNumber('id'); + Route::post('/api/purchasing-receipts/history/{id}/documents/confirm',[\App\Modules\Purchasing\ReceiptDocumentsController::class,'confirm'])->whereNumber('id'); + Route::get('/api/purchasing-receipts/history/{id}/documents/{document}/download',[\App\Modules\Purchasing\ReceiptDocumentsController::class,'download'])->whereNumber('id')->whereNumber('document'); + Route::get('/api/purchasing-receipts/history/{id}',[\App\Modules\Purchasing\ReceiptController::class,'receipt'])->whereNumber('id'); + Route::get('/api/stock-valuation-read',[\App\Modules\Accounting\StockValuationRead::class,'index']); + Route::get('/general-ledger/stock-valuation',[\App\Modules\Accounting\StockValuationRead::class,'index']); Route::get('/api/workshop-stock',[\App\Modules\Workshop\Http\WorkshopStockController::class,'index']); Route::post('/api/workshop-stock/prepare',[\App\Modules\Workshop\Http\WorkshopStockController::class,'prepare']); Route::post('/api/workshop-stock/prepare-delivery',[\App\Modules\Workshop\Http\WorkshopStockController::class,'prepareDelivery']); @@ -40,6 +106,26 @@ Route::middleware(['auth', RequireValidSession::class])->group(function (): void Route::post('/api/module-records/preview', [\App\Modules\Identity\Http\ModuleRecordsController::class,'preview']); Route::post('/api/module-records', [\App\Modules\Identity\Http\ModuleRecordsController::class,'associate']); Route::get('/supplier-payables', [\App\Modules\Purchasing\SupplierPayablesController::class,'page']); + Route::get('/general-ledger', [\App\Modules\Accounting\GeneralLedgerController::class,'page']); + Route::get('/general-ledger/industrial', [\App\Modules\Accounting\IndustrialLedgerController::class,'index']); + Route::get('/api/general-ledger/industrial', [\App\Modules\Accounting\IndustrialLedgerController::class,'index']); + Route::get('/general-ledger/workspace',[\App\Modules\Accounting\LedgerCompositionController::class,'index']); + Route::get('/api/general-ledger/workspace',[\App\Modules\Accounting\LedgerCompositionController::class,'index']); + Route::get('/general-ledger/costs', [\App\Modules\Accounting\CostLedgerController::class,'index']); + Route::get('/api/general-ledger/costs', [\App\Modules\Accounting\CostLedgerController::class,'index']); + Route::get('/general-ledger/{kind}', [\App\Modules\Accounting\GeneralLedgerController::class,'report'])->whereIn('kind',['trial-balance','account-ledger']); + Route::get('/api/general-ledger/{kind}', [\App\Modules\Accounting\GeneralLedgerController::class,'report'])->whereIn('kind',['trial-balance','account-ledger']); + Route::get('/general-ledger/flow', [\App\Modules\Accounting\GeneralLedgerController::class,'flow']); + Route::get('/general-ledger/cycle', [\App\Modules\Accounting\GeneralLedgerController::class,'cycle']); + Route::get('/general-ledger/sales', [\App\Modules\Accounting\SalesLedgerController::class,'page']); + Route::get('/api/general-ledger/sales', [\App\Modules\Accounting\SalesLedgerController::class,'index']); + Route::get('/api/general-ledger/cycle', [\App\Modules\Accounting\GeneralLedgerController::class,'cycleData']); + Route::get('/api/general-ledger', [\App\Modules\Accounting\GeneralLedgerController::class,'index']); + Route::get('/api/general-ledger/financial-receipts/{domain}/{key}', [\App\Modules\Accounting\GeneralLedgerController::class,'financialReceipt']); + Route::get('/api/general-ledger/receipts/{key}', [\App\Modules\Accounting\GeneralLedgerController::class,'receipt']); + Route::post('/api/general-ledger/{action}', [\App\Modules\Accounting\GeneralLedgerController::class,'command'])->whereIn('action',['prepare','validate','post','effect-prepare','correct-prepare','correct-validate','correct-post','period-prepare','period-validate','period-close']); + Route::get('/supplier-payables/report', [\App\Modules\Purchasing\SupplierPayableReportController::class,'page']); + Route::get('/api/supplier-payables/report', [\App\Modules\Purchasing\SupplierPayableReportController::class,'index']); Route::get('/supplier-payments', [\App\Modules\Purchasing\SupplierPaymentsController::class,'page']); Route::get('/api/supplier-payments', [\App\Modules\Purchasing\SupplierPaymentsController::class,'index']); Route::post('/api/supplier-payments/{action}', [\App\Modules\Purchasing\SupplierPaymentsController::class,'command'])->whereIn('action',['payment-prepare','payment-decide','allocation-prepare','allocation-decide','reversal-prepare','reversal-confirm']); diff --git a/scripts/abrir-compras.ps1 b/scripts/abrir-compras.ps1 new file mode 100644 index 0000000..c0f86c2 --- /dev/null +++ b/scripts/abrir-compras.ps1 @@ -0,0 +1,7 @@ +$ErrorActionPreference = 'Stop' +$sgfProject = 'C:\laragon\www\sgf-tempo' +Push-Location -LiteralPath $sgfProject +try { + & 'C:\laragon\tools\sgf-tempo\node-v24.22.1-win-arm64\node.exe' 'scripts/purchasing-single-installation.mjs' 'start' + if ($LASTEXITCODE -ne 0) { throw 'Não foi possível abrir a instalação de Compras. Nenhuma base nova foi criada.' } +} finally { Pop-Location } diff --git a/scripts/archive-ledger-cost-correction-scope.mjs b/scripts/archive-ledger-cost-correction-scope.mjs new file mode 100644 index 0000000..36ef2e6 --- /dev/null +++ b/scripts/archive-ledger-cost-correction-scope.mjs @@ -0,0 +1,3 @@ +import fs from 'node:fs';import path from 'node:path';import crypto from 'node:crypto'; +const read=p=>JSON.parse(fs.readFileSync(p,'utf8')),hash=b=>crypto.createHash('sha256').update(b).digest('hex'),state=read('C:/laragon/data/sgf-tempo/run/modular-regression-current.json'),file='docs/GENERAL_LEDGER_DIRECT_COST_CORRECTION_SCOPE.md',expected=read('docs/proofs/common-ledger-direct-cost-20261103.json').next_scope.sha256,archive=path.join(state.root,'private/ledger-cost-correction-approved-scope.md');if(state.port!==55439)throw Error('Owned scope archive required');const current=fs.readFileSync(file,'utf8'); +if(fs.existsSync(archive)){if(hash(fs.readFileSync(archive))!==expected)throw Error('Approved archive changed');}else{if(hash(current)!==expected)throw Error('Scope differs from presented proposal');fs.writeFileSync(archive,current);}const original=fs.readFileSync(archive,'utf8'),updated=original.replace(/^03\/11\/2026\..+$/m,'03/11/2026. **Autorização expressa recebida: «Autorizar a correcção sintética proposta». Implementação/provas concluídas; ver [entrega e limites](GENERAL_LEDGER_DIRECT_COST_CORRECTION_DELIVERY.md).** O texto seguinte conserva o recorte apresentado. A decisão pedida no final é histórica; não constitui aceitação, reabertura ou autorização operacional.');if(current!==original&¤t!==updated)throw Error('Unexpected scope edits; preserve and inspect');if(current!==updated)fs.writeFileSync(file,updated);console.log(JSON.stringify({scope_archive_matches_presented_proposal:true,approved_scope_sha256:expected,authorization_recorded:true})); diff --git a/scripts/archive-ledger-cost-scope.mjs b/scripts/archive-ledger-cost-scope.mjs new file mode 100644 index 0000000..02af67a --- /dev/null +++ b/scripts/archive-ledger-cost-scope.mjs @@ -0,0 +1,4 @@ +import fs from 'node:fs';import path from 'node:path';import crypto from 'node:crypto'; +const read=p=>JSON.parse(fs.readFileSync(p,'utf8')),hash=b=>crypto.createHash('sha256').update(b).digest('hex'),state=read('C:/laragon/data/sgf-tempo/run/modular-regression-current.json'),file='docs/GENERAL_LEDGER_DIRECT_COST_SCOPE.md',expected=read('docs/proofs/common-ledger-reports-20261103.json').next_scope.sha256,archive=path.join(state.root,'private/ledger-cost-approved-scope.md');if(state.port!==55439)throw Error('Owned archive root required');const current=fs.readFileSync(file,'utf8'); +if(fs.existsSync(archive)){if(hash(fs.readFileSync(archive))!==expected)throw Error('Approved archive changed');}else{if(hash(current)!==expected)throw Error('Current scope differs from presented proposal');fs.writeFileSync(archive,current);} +const original=fs.readFileSync(archive,'utf8'),authorized='03/11/2026. **Autorização expressa recebida: «Autorizar o ciclo sintético proposto». Implementação/provas concluídas no recorte sintético; ver [entrega e limites](GENERAL_LEDGER_DIRECT_COST_DELIVERY.md).** O texto seguinte conserva o recorte apresentado; a decisão pedida no final é histórica. Não equivale a aceitação ou autorização de correcção de custo já lançado.';const updated=original.replace(/^03\/11\/2026\..+$/m,authorized);if(current!==original&¤t!==updated)throw Error('Unexpected scope edits; preserve and inspect');if(current!==updated)fs.writeFileSync(file,updated);console.log(JSON.stringify({archive_matches_presented_scope:true,approved_scope_sha256:expected,authorization_recorded:true})); diff --git a/scripts/audit-module-matrix.mjs b/scripts/audit-module-matrix.mjs new file mode 100644 index 0000000..4f02784 --- /dev/null +++ b/scripts/audit-module-matrix.mjs @@ -0,0 +1,14 @@ +import fs from 'node:fs';import path from 'node:path';import crypto from 'node:crypto';import {fileURLToPath} from 'node:url'; +export function validateEvidence(spec,read,loadXml){ + const value=read(spec.file);let checks=0; + for(const c of spec.checks??[]){let v=value;for(const key of c.pointer.split('/').slice(1))v=v?.[key];if(v!==c.equals)throw Error('Failed evidence selector '+spec.file+' '+c.pointer);checks++;} + if(spec.selected_junit){const seen=new Set();if(!value.selected_cases?.length||value.selected_cases.length!==value.totals.distinct_tests)throw Error('Incomplete selected case coverage');for(const c of value.selected_cases){if(seen.has(c.name))throw Error('Duplicate selected case');seen.add(c.name);const p=value.proofs.find(p=>p.file===c.proof);if(!p)throw Error('Missing JUnit reference');const xml=loadXml(p.file,p.sha256),cases=[...xml.matchAll(/]*\/>|]*>[\s\S]*?<\/testcase>/g)].map(m=>m[0]),test=cases.find(t=>t.match(/\bname="([^"]+)"/)?.[1]===c.name);if(!test||/<(?:failure|error|skipped)\b/.test(test))throw Error('Selected case did not pass '+c.name);checks++;}} + if(!checks)throw Error('Evidence has no success criterion');return {verified_checks:checks,recorded_proof_verified:true}; +} +export function validateOrigins(plan){const ids=new Set(plan.stages.map(s=>s.id));for(const s of plan.stages)for(const branch of s.origin_paths??[]){if(!branch.id||!Array.isArray(branch.requires)||branch.requires.some(x=>!ids.has(x)||x===s.id))throw Error('Invalid alternative origin path');}return true;} +if(process.argv[1]&&path.resolve(process.argv[1])===fileURLToPath(import.meta.url)){ + const root=path.resolve('.'),read=file=>JSON.parse(fs.readFileSync(path.join(root,file),'utf8').replace(/^\uFEFF/,'')),hash=file=>crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex'),plan=read('docs/integration/sgf-flow-plan.json'),state=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json','utf8')),roots={sgf:root,compras:path.resolve('../compras')};validateOrigins(plan); + const stages=plan.stages.map(stage=>{if(!stage.evidence?.length)throw Error('Unmapped evidence '+stage.id);const code=stage.source_ids.map(id=>{const s=plan.sources.find(s=>s.id===id);if(!s)throw Error('Unknown source');const base=fs.realpathSync(roots[s.repository]),file=fs.realpathSync(path.join(base,s.path));if(!file.startsWith(base+path.sep))throw Error('Source escape');return {id,file:s.path,repository:s.repository,sha256:hash(file),source_present_only:true};});const evidence=stage.evidence.map(e=>{if(!/^docs\/proofs\/[a-z0-9-]+\.json$/.test(e.file))throw Error('Unsafe evidence path');return {...e,sha256:hash(path.join(root,e.file)),...validateEvidence(e,read,(name,pin)=>{if(!/^workshop-stock-\d+\.xml$/.test(name))throw Error('Unsafe XML reference');const file=path.join(state.root,name);if(hash(file)!==pin)throw Error('JUnit changed');return fs.readFileSync(file,'utf8');})};});for(const source of code){const pins=[];for(const spec of stage.evidence){const p=read(spec.file);for(const field of ['source_files','sources','source_hashes','source_sha256']){const entries=p[field];if(Array.isArray(entries)){for(const e of entries)if((e.file??e.path)?.replaceAll('\\','/').endsWith(source.file)&&e.sha256)pins.push({proof:spec.file,sha256:e.sha256});}else if(entries&&typeof entries==='object'){for(const [file,value]of Object.entries(entries)){const pin=typeof value==='string'?value:value?.sha256;if(file.replaceAll('\\','/').endsWith(source.file)&&/^[a-f0-9]{64}$/.test(pin??''))pins.push({proof:spec.file,sha256:pin});}}}}source.recorded_source_pins=pins;source.current_hash_has_matching_recorded_evidence=pins.length?pins.some(p=>p.sha256===source.sha256):null;} +return {id:stage.id,owner:stage.owner,state:stage.state,code,evidence,remaining_gap:stage.gap,operational_validated:false,current_entire_stage_code_regression_repeated:false};}); + const output=process.argv[2];if(!output||!/^docs\/proofs\/[a-z0-9-]+\.json$/.test(output)||fs.existsSync(output))throw Error('Fresh proof output required');fs.writeFileSync(output,JSON.stringify({date:new Date().toISOString(),kind:'matrix_code_recorded_evidence_audit',plan_sha256:hash(path.join(root,'docs/integration/sgf-flow-plan.json')),stages,stages_checked:stages.length,visual_review_pending:true,deployment_capacity_validated:false,limitations:['Historical selected proofs verified; source presence/current hashes are not proof that all later edits were regressed.','No runtime modules, real data, rights, cache or databases altered by this audit.'],database_connections:0,financial_effects:0},null,2));console.log(JSON.stringify({output,stages:stages.length,selected_criteria:stages.reduce((n,s)=>n+s.evidence.reduce((m,e)=>m+e.verified_checks,0),0)})); +} diff --git a/scripts/build-receipt-runtime.php b/scripts/build-receipt-runtime.php new file mode 100644 index 0000000..c0a9d4f --- /dev/null +++ b/scripts/build-receipt-runtime.php @@ -0,0 +1,16 @@ +$source.'/app','fortify'=>$source.'/vendor/laravel/fortify/src']as$prefix=>$directory){ + foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory,FilesystemIterator::SKIP_DOTS))as$file){ + if(!$file->isFile()||$file->getExtension()!=='php')continue;if($file->isLink())throw new LogicException('Linked source refused');$relative=$prefix.'/'.str_replace('\\','/',substr($file->getPathname(),strlen($directory)+1));$raw=file_get_contents($file->getPathname());$text=''; + foreach(token_get_all($raw)as$token){if(!is_array($token)){$text.=$token;continue;}[$type,$value]=$token; + if($prefix==='app'&&in_array($type,[T_NAME_QUALIFIED,T_NAME_FULLY_QUALIFIED],true))$value=preg_replace('/^(\\\\?)App\\\\/','$1Tempo\\Purchasing\\Embedded\\',$value); + $text.=$value; + } + $destination=$target.'/'.$relative;if(!is_dir(dirname($destination)))mkdir(dirname($destination),0777,true);file_put_contents($destination,$text);$files[$relative]=hash('sha256',$text);$originals[$relative]=hash('sha256',$raw); + } +} +ksort($files);ksort($originals);file_put_contents($target.'/manifest.json',json_encode(['format'=>'sgf.receipt.native-namespace.v1','files'=>$files,'originals'=>$originals,'transformation'=>'Only App-qualified PHP name tokens become Tempo\\Purchasing\\Embedded; strings and rule expressions unchanged.'],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($files)." original PHP files packaged with namespace-only adaptation.\n"; diff --git a/scripts/cartography-proof.php b/scripts/cartography-proof.php new file mode 100644 index 0000000..1ae3121 --- /dev/null +++ b/scripts/cartography-proof.php @@ -0,0 +1,7 @@ +in_array($n['codes']['village_quarter'],['7A','7B'],true)));$ok(count($alpha)===2,'alphanumeric source codes survive unchanged');$province=Cartography::selection($c,$s['sha256'],$c['nodes'][0]['key']);$ok($province['designation']==='Niassa'&&$province['codes']['district']==='','explicit selection permits a province without imposing deeper precision');$refuse=function($fn,$message)use($ok){try{$fn();throw new RuntimeException('Selection accepted unexpectedly');}catch(DomainException $e){$ok($e->getMessage()===$message,$message);}}; +$refuse(fn()=>Cartography::selection($c,str_repeat('0',64),$c['nodes'][0]['key']),'CARTOGRAPHY_VERSION_CHANGED');$refuse(fn()=>Cartography::selection($c,$s['sha256'],'Niassa'),'CARTOGRAPHY_TERRITORY_UNKNOWN');$ambiguous=array_values(array_filter($c['nodes'],fn($n)=>in_array('duplicate_path',$n['issues'],true)))[0];$refuse(fn()=>Cartography::selection($c,$s['sha256'],$ambiguous['key']),'CARTOGRAPHY_REVIEW_REQUIRED');$ok(Cartography::prepare($s)===$c,'preparation is deterministic without source mutation');$bad=$s;$bad['rows'][0]['cells']['B']='Other';try{Cartography::prepare($bad);throw new RuntimeException('Wrong schema accepted');}catch(InvalidArgumentException $e){$ok($e->getMessage()==='CARTOGRAPHY_SOURCE_REFUSED','unexpected workbook schema is refused');}$bad=$s;$bad['rows'][2]['cells']['A']=$bad['rows'][1]['cells']['A'];try{Cartography::prepare($bad);throw new RuntimeException('Duplicate ID accepted');}catch(InvalidArgumentException $e){$ok($e->getMessage()==='CARTOGRAPHY_SOURCE_ID_REFUSED','duplicate source IDs are refused');} +file_put_contents($prepared,json_encode($c,JSON_UNESCAPED_UNICODE|JSON_THROW_ON_ERROR));file_put_contents($out,json_encode(['passed'=>true,'checks'=>count($checks),'names'=>$checks,'source'=>$c['source'],'total'=>$c['total'],'levels'=>$c['levels'],'diagnostics'=>$c['diagnostics'],'prepared_sha256'=>hash_file('sha256',$prepared),'implementation_sha256'=>hash_file('sha256',dirname(__DIR__).'/app/Shared/Geography/Cartography.php'),'original_workbook_modified'=>false,'database_connections'=>0,'business_records_assigned'=>0,'catalogue_activated'=>false,'authority_independently_verified'=>false,'public_data_payload_committed'=>false],JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE|JSON_THROW_ON_ERROR));echo count($checks)." cartography preparation checks passed.\n"; diff --git a/scripts/composition-stock-body.php b/scripts/composition-stock-body.php new file mode 100644 index 0000000..e059d92 --- /dev/null +++ b/scripts/composition-stock-body.php @@ -0,0 +1,60 @@ +table('purchase_orders')->where('tenant_id',$n['tenant'])->count()===1&&is_file($s['root'].'/composition-stock-progress.json')){ + // Recover the completed source setup after an assertion failure; do not issue another order. + $id=$db->table('purchase_orders')->where('tenant_id',$n['tenant'])->value('id'); + $order=['id'=>$id,'items'=>[['id'=>$db->table('purchase_order_items')->where('purchase_order_id',$id)->value('id')]]]; + file_put_contents($origin,json_encode($order,JSON_THROW_ON_ERROR)); +}else{require __DIR__.'/receipt-workspace-source.php';file_put_contents($origin,json_encode($order,JSON_THROW_ON_ERROR));} +$enter('validator',0,['module'=>'stock']);$stock='/api/stock-read'; +$read=fn($query=[])=>$call('validator',$stock.'?'.http_build_query($query)); +$r=$read();$ok($r['status']===200&&$r['data']['rows']===[]&&$r['data']['status']==='available','composed stock starts with a genuine empty physical book');$before=$r['data']['snapshot']; +$ok(in_array($call('actor',$stock)['status'],[403,409],true),'purchasing authority does not grant stock access'); +$enter('validator',1);$ok(in_array($call('validator',$stock,null,1)['status'],[403,409],true),'stock endpoint refuses Purchasing module context'); +$enter('validator',1,['module'=>'stock','foreign'=>1]);$ok($call('validator',$stock,null,1)['status']===403,'another unit cannot inherit the source binding'); +$ok($read(['warehouse_id'=>$n['foreign_warehouse']])['status']===403,'foreign warehouse explicitly refused'); +$ok($read(['per_page'=>101])['status']===422&&$read(['per_page'=>1])['status']===422&&$read(['unknown'=>1])['status']===422,'page bounds and unknown filters rejected'); +$enter('validator',1,['module'=>'stock']); +$r=$call('validator',$stock,null,1,['X-SGF-Context'=>'stale']);$ok($r['status']===409,'stale HTTP context refused before source observation'); +// Catalogue volume is fixture metadata only, not artificial physical movements. +$base=(array)$db->table('stock_items')->where('id',$n['stock'])->first();unset($base['id']); +$db->transaction(function()use($db,$base){for($i=1;$i<=102;$i++){$row=$base;$row['code']='QA-COMPOSED-'.str_pad((string)$i,3,'0',STR_PAD_LEFT);$row['name']=$i===102?'Literal%_marker':'Composed QA article '.$i;$db->table('stock_items')->insert($row);}}); +$r=$read(['view'=>'items','per_page'=>100]);$r2=$read(['view'=>'items','per_page'=>100,'page'=>2,'snapshot'=>$r['data']['snapshot']]); +$total=$db->table('stock_items')->where('tenant_id',$n['tenant'])->count(); +$ok($r['status']===200&&$r2['status']===200&&count($r['data']['rows'])===100&&count($r2['data']['rows'])===$total-100,'catalogue uses bounded pages100 and remainder'); +$ids=[];for($page=1;$page<=ceil($total/25);$page++){$r=$read(['view'=>'items','page'=>$page]);$ids=array_merge($ids,array_column($r['data']['rows'],'id'));} +$ok(count($ids)===$total&&count(array_unique($ids))===$total&&!in_array($n['foreign_stock'],$ids,true),'pages25 cover the same tenant catalogue once without foreign articles'); +$r=$read(['view'=>'items','search'=>'%_']);$ok($r['status']===200&&count($r['data']['rows'])===1&&$r['data']['rows'][0]['name']==='Literal%_marker','search preserves literal wildcard semantics'); +$r=$read(['view'=>'warehouses']);$ok($r['status']===200&&array_column($r['data']['rows'],'id')===[$n['warehouse']],'only explicitly mapped warehouse is visible'); +$r=$read();$before=$r['data']['snapshot']; +$id=$order['id'];$line=$order['items'][0]['id'];$url='/api/purchasing-receipts/orders/'.$id; +$enter('validator',1);$r=$call('validator',$url,null,1); +$payload=['revision'=>$r['data']['revision'],'idempotency_key'=>(string)Str::uuid(),'delivery_note'=>'QA-COMPOSED-STOCK','received_on'=>date('Y-m-d'),'warehouse_id'=>$n['warehouse'], + 'items'=>[['purchase_order_item_id'=>$line,'received_quantity'=>'1.000','accepted_quantity'=>'1.000','quality_status'=>'compliant','stock_item_id'=>$n['stock'],'notes'=>null]]]; +$p=$call('validator',$url.'/preview',$payload,1);$ok($p['status']===200&&$db->table('stock_movements')->count()===0,'original receipt preview has no physical effect'); +$r=$call('validator',$url.'/confirm',['preview'=>$p['data']['preview']],1);$ok($r['status']===201&&count($r['data']['movements'])===1,'original receipt confirmation creates exactly one native movement');$movement=$r['data']['movements'][0]['id']; +$r=$call('validator',$url.'/confirm',['preview'=>$p['data']['preview']],1);$ok($r['status']===200&&$r['data']['replayed']&&$db->table('stock_movements')->count()===1,'receipt replay remains idempotent across the integration'); +$ok($read(['snapshot'=>$before])['status']===409,'new native movement invalidates an earlier stock snapshot'); +$r=$read(['view'=>'movements']);$ok($r['status']===200&&count($r['data']['rows'])===1&&$r['data']['rows'][0]['id']===$movement&&$r['data']['rows'][0]['quantity_milli']==='1000','Stock reads the exact canonical receipt movement and rational quantity'); +$ok(!array_intersect(['snapshot','cost','unit_price','supplier_id'],array_keys($r['data']['rows'][0])),'stock projection exposes no raw document or financial snapshot'); +$r=$read();$ok($r['data']['rows'][0]['physical_milli']==='1000'&&$r['data']['rows'][0]['available_milli']===null&&!$r['data']['capabilities']['write'],'Stock derives physical balance without inventing availability or another writer');$token=$r['data']['snapshot']; +$enter('validator',0,['module'=>'stock']);$ok($read(['snapshot'=>$token])['status']===409,'renewed session context invalidates prior pagination token'); +$grant=DB::table('permission_grants')->where($f['scope']+['user_id'=>$f['validator'],'permission'=>'stock.view'])->first(); +DB::table('permission_grants')->where('id',$grant->id)->delete();try{$ok($read()['status']===403,'revoked stock grant is rechecked on every page');}finally{DB::table('permission_grants')->insert((array)$grant);} +$profile=$s['root'].'/stock-binding.json';$original=file_get_contents($profile);$binding=json_decode($original,true);$key=array_key_first($binding['bindings']); +$binding['bindings'][$key]['warehouse_ids']=[$n['foreign_warehouse']];file_put_contents($profile,json_encode($binding)); +try{$r=$read();$ok($r['status']===503,'incompatible tenant warehouse mapping returns unavailable rather than a zero balance');}finally{file_put_contents($profile,$original);} +$ok($read()['status']===200,'valid private mapping recovers without changing the book'); +$binding=json_decode($original,true);$binding['connection']['password']='invalid-qa-only';file_put_contents($profile,json_encode($binding)); +try{$r=$read();$ok($r['status']===503&&!str_contains($r['body'],'stock_receipt_read_')&&!str_contains($r['body'],'SQLSTATE'),'source authentication failure is generic and does not expose credentials');}finally{file_put_contents($profile,$original);} +$ok($read()['status']===200,'source authentication recovers with original profile'); +config(['database.connections.composition_security'=>json_decode($original,true)['connection']]);$reader=DB::connection('composition_security'); +foreach(['DELETE FROM stock_movements WHERE false','SELECT * FROM goods_receipts LIMIT 0','SELECT * FROM audit_logs LIMIT 0','SELECT * FROM pa_obligations LIMIT 0']as$sql){$refused=false;try{$reader->statement($sql);}catch(\PDOException $e){$refused=in_array($e->errorInfo[0]??'',['42501','25006'],true);}$ok($refused,'technical reader refuses '.strtok($sql,' ').' outside its capability: '.explode(' ',$sql)[2]);} +$refused=false;try{$db->table('stock_movements')->where('id',$movement)->update(['quantity_milli'=>1001]);}catch(\PDOException $e){$refused=($e->errorInfo[0]??'')==='P0001';} +$ok($refused&&(int)$db->table('stock_movements')->sum('quantity_milli')===1000,'new QA append-only trigger preserves revision assumptions'); +// An outstanding native writer mutex must not block the observational connection. +$db->beginTransaction();try{$db->table('tenants')->where('id',$n['tenant'])->lockForUpdate()->first();$ok($read()['status']===200,'Stock read does not acquire the native tenant writer mutex');}finally{$db->rollBack();} +$ok($db->table('goods_receipts')->count()===1&&$db->table('stock_movements')->count()===1&&$db->table('invoices')->where('tenant_id',$n['tenant'])->count()===0&&$db->table('pa_obligations')->where('tenant_id',$n['tenant'])->count()===0&&$db->table('external_payments')->where('tenant_id',$n['tenant'])->count()===0,'integration leaves one receipt/movement and creates no invoice debt or payment'); +file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'same_native_book'=>true,'receipts'=>1,'movements'=>1,'physical_milli'=>1000,'catalogue_rows'=>$total,'page_sizes'=>[25,100],'new_permission_names'=>[],'visual_review'=>false,'deployment_capacity_validated'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." composed stock checks passed.\n"; diff --git a/scripts/composition-stock-demo.php b/scripts/composition-stock-demo.php new file mode 100644 index 0000000..5e7c504 --- /dev/null +++ b/scripts/composition-stock-demo.php @@ -0,0 +1,25 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); +$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true);$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.stock_demo'=>$s['nativeConnection']]);$db=DB::connection('stock_demo'); +$checks=[];$ok=function($v,$name)use(&$checks){if(!$v)throw new RuntimeException($name);$checks[]=$name;}; +$fingerprint=fn()=>hash('sha256',json_encode([$db->table('stock_items')->orderBy('id')->get(),$db->table('warehouses')->orderBy('id')->get(),$db->table('stock_movements')->orderBy('id')->get(),$db->table('audit_logs')->orderBy('id')->get(),DB::table('permission_grants')->orderBy('id')->get()]));$before=$fingerprint(); +$ok($db->table('requisitions')->where('tenant_id',$n['tenant'])->count()===0&&$db->table('goods_receipts')->count()===0&&$db->table('stock_movements')->count()===0,'new demonstration begins without main operations or physical movements'); +$client=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:8083','http_errors'=>false,'timeout'=>25]);$jar=new GuzzleHttp\Cookie\CookieJar; +$r=$client->get('/qa/enter/validator',['cookies'=>$jar,'query'=>['module'=>'stock']]);$v=json_decode((string)$r->getBody(),true);$options=['cookies'=>$jar,'headers'=>['Accept'=>'application/json','X-SGF-Context'=>$v['context']]]; +$r=$client->get('/',$options);$ok($r->getStatusCode()===200&&str_contains((string)$r->getBody(),'id="app"'),'existing SGF React shell is served in explicit Stock context'); +$manifest=json_decode(file_get_contents($s['app'].'/public/build/manifest.json'),true);$entry=$manifest['resources/js/app.jsx']['file'];$r=$client->get('/build/'.$entry); +$ok($r->getStatusCode()===200&&hash('sha256',(string)$r->getBody())===hash_file('sha256',$s['app'].'/public/build/'.$entry),'served existing React bundle matches the local manifest'); +$r=$client->get('/api/stock-read',$options);$d=json_decode((string)$r->getBody(),true); +$ok($r->getStatusCode()===200&&$d['rows']===[]&&$d['status']==='available'&&!$d['capabilities']['write'],'same existing Stock reader observes the new empty source without inventing balances'); +$r=$client->get('/api/session',$options);$d=json_decode((string)$r->getBody(),true);$ok($r->getStatusCode()===200&&str_contains(json_encode($d),'stock.view'),'existing session API exposes only the explicit QA stock grant'); +// Hold a real host authority lock in a separate connection, then release and recover. +$c=DB::connection()->getConfig();config(['database.connections.stock_lock'=>$c]);$hold=DB::connection('stock_lock');$hold->beginTransaction(); +try{$hold->table('permission_grants')->where($f['scope']+['user_id'=>$f['validator'],'permission'=>'stock.view'])->lockForUpdate()->first();$r=$client->get('/api/stock-read',$options);$ok($r->getStatusCode()===503,'host authority lock contention fails boundedly with unavailable');}finally{$hold->rollBack();} +$r=$client->get('/api/stock-read',$options);$ok($r->getStatusCode()===200,'read recovers after host authority lock release'); +$controller=new App\Modules\Inventory\CompositionStockRead;$request=Illuminate\Http\Request::create('/api/stock-read');$ctx=app(App\Shared\Context\CompanyContext::class);$permissions=app(App\Modules\Identity\Services\Permissions::class); +foreach(['disabled','production']as$mode){$old=app()->environment();$flag=config('receipt_qa.stock_read_enabled');if($mode==='disabled')config(['receipt_qa.stock_read_enabled'=>false]);else app()->instance('env','production');$status=0;try{$controller->index($request,$ctx,$permissions);}catch(Symfony\Component\HttpKernel\Exception\HttpException $e){$status=$e->getStatusCode();}finally{config(['receipt_qa.stock_read_enabled'=>$flag]);app()->instance('env',$old);}$ok($status===($mode==='disabled'?404:403),'direct adapter refuses '.$mode.' before accessing a source');} +$ok($fingerprint()===$before,'demo reads preserve source metadata movements audit and grants'); +file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'before'=>$before,'after'=>$fingerprint(),'direct_guard_probes'=>2,'visual_review'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." composed stock demo checks passed.\n"; diff --git a/scripts/composition-stock-proof.php b/scripts/composition-stock-proof.php new file mode 100644 index 0000000..57aa1d3 --- /dev/null +++ b/scripts/composition-stock-proof.php @@ -0,0 +1,9 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true);$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.sourcing_verify'=>$s['nativeConnection']]);$db=DB::connection('sourcing_verify');$checks=[];$ok=function($v,$name)use(&$checks,$s){if(!$v)throw new RuntimeException($name);$checks[]=$name;file_put_contents($s['root'].'/composition-stock-progress.json',json_encode($checks,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));};$servers=[];$clients=[];$sessions=[]; +try{ + foreach([0,1]as$i){$socket=stream_socket_server('tcp://127.0.0.1:0');$port=(int)substr(strrchr(stream_socket_get_name($socket,false),':'),1);fclose($socket);$server=new Symfony\Component\Process\Process([PHP_BINARY,'-S','127.0.0.1:'.$port,'-t',$s['app'].'/public',dirname(__DIR__).'/scripts/receipt-composition-http.php'],$s['app'],null,null,180);$server->start();$servers[]=$server;for($j=0;$j<80;$j++){if($socket=@fsockopen('127.0.0.1',$port,$errno,$error,.1)){fclose($socket);break;}usleep(50000);}$clients[]=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:'.$port,'http_errors'=>false,'timeout'=>25]);} + $enter=function($role,$i=0,$query=[])use(&$sessions,$clients){$jar=new GuzzleHttp\Cookie\CookieJar;$r=$clients[$i]->get('/qa/enter/'.$role,['cookies'=>$jar,'query'=>$query]);$sessions[$role.$i]=['jar'=>$jar]+json_decode((string)$r->getBody(),true,32,JSON_THROW_ON_ERROR);};$options=function($role,$i=0,$data=null,$headers=[])use(&$sessions){$v=$sessions[$role.$i];$o=['cookies'=>$v['jar'],'headers'=>$headers+['Accept'=>'application/json','X-SGF-Context'=>$v['context'],'X-CSRF-TOKEN'=>$v['csrf']]];if($data!==null)$o['json']=$data;return $o;};$call=function($role,$path,$data=null,$i=0,$headers=[])use($clients,$options,$s){$r=$clients[$i]->request($data===null?'GET':'POST',$path,$options($role,$i,$data,$headers));$text=(string)$r->getBody();if($r->getStatusCode()>=500)file_put_contents($s['root'].'/composition-stock-last-500.txt',$text);return ['status'=>$r->getStatusCode(),'data'=>json_decode($text,true),'body'=>$text];};foreach(['actor','issuer','validator','reviewer','auditor','requester','approver']as$role)$enter($role);$enter('issuer',1);$enter('auditor',1);$base='/api/purchasing-invoices'; + require __DIR__.'/composition-stock-body.php'; +}finally{foreach($servers as$i=>$server){$server->stop(2);file_put_contents($s['root'].'/composition-stock-http-'.$i.'.log',$server->getOutput().$server->getErrorOutput());}} diff --git a/scripts/composition-stock-setup.php b/scripts/composition-stock-setup.php new file mode 100644 index 0000000..0ec3174 --- /dev/null +++ b/scripts/composition-stock-setup.php @@ -0,0 +1,27 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); +App\Modules\Purchasing\BudgetAdapter::guard(); +$tag=$s['tag'];$run=$s['env']['SGF_ISOLATED_REGRESSION_RUN']; +if(!preg_match('/^[a-f0-9]{12}$/D',$tag)||!preg_match('/^[a-f0-9]{12}$/D',$run)||str_replace('\\','/',$s['root'])!=='C:/laragon/data/sgf-tempo/run/modular-regression-'.$run.'/private/receipt-composition-'.$tag)throw new LogicException('Owned fixture required'); +$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true);$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true); +$admin=new PDO('pgsql:host=127.0.0.1;port=55439;dbname=compras_receipts_test_'.$tag,'sgf_regression_owner',trim(file_get_contents(dirname($s['root']).'/admin-password.txt')),[PDO::ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION]); +if($admin->query("SELECT current_setting('cluster_name')")->fetchColumn()!=='sgf_modular_regression_'.$run)throw new LogicException('Wrong physical cluster'); +$reader='stock_receipt_read_'.$tag;$password=bin2hex(random_bytes(32)); +$admin->exec("CREATE ROLE $reader LOGIN PASSWORD '$password' NOSUPERUSER NOCREATEDB NOCREATEROLE NOREPLICATION NOBYPASSRLS; ALTER ROLE $reader SET default_transaction_read_only=on; GRANT CONNECT ON DATABASE compras_receipts_test_$tag TO $reader; GRANT USAGE ON SCHEMA public TO $reader; GRANT SELECT ON stock_items,warehouses,stock_movements TO $reader;"); +// New isolated book only: make the reader revision's append-only assumption enforceable. +$admin->exec("CREATE FUNCTION composition_stock_append_only() RETURNS trigger LANGUAGE plpgsql AS \$\$ BEGIN RAISE EXCEPTION 'Preserve stock movement evidence'; END; \$\$; + CREATE TRIGGER composition_stock_append_only BEFORE UPDATE OR DELETE ON stock_movements FOR EACH ROW EXECUTE FUNCTION composition_stock_append_only();"); +DB::transaction(function()use($f){ + $def=DB::selectOne("SELECT pg_get_constraintdef(oid) definition FROM pg_constraint WHERE conname='permission_grants_scope_check' AND conrelid='permission_grants'::regclass")->definition; + DB::statement('ALTER TABLE permission_grants DROP CONSTRAINT permission_grants_scope_check'); + DB::statement('ALTER TABLE permission_grants ADD CONSTRAINT permission_grants_scope_check CHECK ('.substr($def,6)." OR (unit_id IS NOT NULL AND permission='stock.view'))"); + DB::table('permission_grants')->insert($f['scope']+['user_id'=>$f['validator'],'permission'=>'stock.view','created_at'=>now(),'updated_at'=>now()]); +}); +$binding=['schema'=>'public','source_tenant_id'=>$n['tenant'],'warehouse_ids'=>[$n['warehouse']],'append_only'=>true]; +$connection=$s['nativeConnection'];$connection['username']=$reader;$connection['password']=$password; +file_put_contents($s['root'].'/stock-binding.json',json_encode(['connection'=>$connection,'bindings'=>[implode(':',array_values($f['scope'])).':'.$f['validator']=>$binding]],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); +file_put_contents($s['root'].'/composition-stock-baseline.json',json_encode(['passed'=>true,'existing_qa_right'=>'stock.view','granted_only_to_fixture_validator'=>true,'source_select_tables'=>['stock_items','warehouses','stock_movements'],'native_writer_changed'=>false,'append_only_trigger_new_qa_book_only'=>true,'new_permission_names'=>[],'real_grants'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); +echo "Stock read composition prepared.\n"; diff --git a/scripts/continuity-boundaries-body.php b/scripts/continuity-boundaries-body.php new file mode 100644 index 0000000..6c6540a --- /dev/null +++ b/scripts/continuity-boundaries-body.php @@ -0,0 +1,3 @@ +(string)Str::uuid(),'revision'=>$id?$r['data']['revision']:$r['data']['new_revision'],'action'=>$action,'data'=>$data]);if($p['status']!==200)throw new RuntimeException('Source request preview');$r=$call($role,$base.'/'.$id.'/confirm',['preview'=>$p['data']['preview']]);if($r['status']!==201)throw new RuntimeException('Source request confirmation');return $r['data'];}; +$r=$requestCommand('requester',0,'save',['cost_center_id'=>$n['centre'],'priority'=>'normal','needed_by'=>date('Y-m-d',strtotime('+30 days')),'justification'=>'Fixture aberta para o selector inicial de fornecedores.','items'=>[['description'=>'Consulta inicial QA','category'=>'Outro','purchase_type'=>'consumable','quantity'=>'1.000','unit'=>'UN','unit_price'=>'1.00','tax_rate'=>'0']]]);$id=$r['request_id'];$requestCommand('requester',$id,'submit',[]);$requestCommand('approver',$id,'decide',['decision'=>'approved','comment'=>'Conferencia distinta da fixture aberta de1MZN.']);$url='/api/purchasing-sourcing/requests/'.$id.'/suppliers';$a=$call('actor',$url.'?page=1');$b=$call('actor',$url.'?page=1&search=');$ok($a['status']===200&&$b['status']===200&&$a['data']['data']===$b['data']['data']&&$a['data']['total']===$b['data']['total']&&$b['data']['total']===3,'supplier empty initial search equals omitted search and returns native paginated eligible directory');$r=$call('actor',$url.'?page=1&search=%20%20');$ok($r['status']===200&&$r['data']['data']===$a['data']['data'],'trimmed blank supplier search keeps unfiltered initial-page semantics');$ok($call('actor',$url.'?search[]=x')['status']===422&&$call('actor',$url.'?per_page=30')['status']===422,'nullable empty filter still rejects array search and unsupported page size');$ok($call('validator',$url.'?search=')['status']===403,'empty search does not bypass sourcing preparation right');$source=json_decode(file_get_contents($s['root'].'/receipt-ui-source.json'),true);$ok($call('actor','/api/purchasing-sourcing/requests/'.$source['request_id'].'/suppliers?search=')['status']===403,'empty search does not reopen proposals closed by actual award');$catalogue='/api/purchasing-receipts/orders/'.$source['order']['id'].'/lines/'.$source['order']['items'][0]['id'].'/catalogue';$a=$call('validator',$catalogue.'?page=1');$b=$call('validator',$catalogue.'?search=&page=1');$ok($a['status']===200&&$b['status']===200&&$a['data']['data']===$b['data']['data'],'empty article filter equals omitted filter in actual receipt catalogue');$ok($call('validator',$catalogue.'?search[]=x')['status']===422&&$call('validator',$catalogue.'?unknown=1')['status']===422,'article catalogue keeps strict parameter types and allowlist');$ok($db->table('goods_receipts')->count()===1&&$db->table('stock_movements')->count()===1&&(int)$db->table('stock_movements')->sum('quantity_milli')===1000&&$db->table('invoices')->count()===0&&$db->table('pa_obligations')->count()===0&&$db->table('external_payments')->count()===0,'catalogue checks preserve one UI receipt and physical movement without invoice debt or payment');file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'open_request_fixture_minor'=>100,'supplier_rows'=>3,'new_right_names'=>[],'visual_review'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." continuity boundary checks passed.\n"; diff --git a/scripts/continuity-boundaries.php b/scripts/continuity-boundaries.php new file mode 100644 index 0000000..454ba68 --- /dev/null +++ b/scripts/continuity-boundaries.php @@ -0,0 +1,10 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true);$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.sourcing_verify'=>$s['nativeConnection']]);$db=DB::connection('sourcing_verify');$checks=[];$ok=function($v,$name)use(&$checks,$s){if(!$v)throw new RuntimeException($name);$checks[]=$name;file_put_contents($s['root'].'/continuity-boundaries-progress.json',json_encode($checks,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));};$servers=[];$clients=[];$sessions=[]; +try{ + foreach([0,1]as$i){$socket=stream_socket_server('tcp://127.0.0.1:0');$port=(int)substr(strrchr(stream_socket_get_name($socket,false),':'),1);fclose($socket);$server=new Symfony\Component\Process\Process([PHP_BINARY,'-S','127.0.0.1:'.$port,'-t',$s['app'].'/public',dirname(__DIR__).'/scripts/receipt-composition-http.php'],$s['app'],null,null,180);$server->start();$servers[]=$server;for($j=0;$j<80;$j++){if($socket=@fsockopen('127.0.0.1',$port,$errno,$error,.1)){fclose($socket);break;}usleep(50000);}$clients[]=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:'.$port,'http_errors'=>false,'timeout'=>25]);} + $enter=function($role,$i=0,$query=[])use(&$sessions,$clients){$jar=new GuzzleHttp\Cookie\CookieJar;$r=$clients[$i]->get('/qa/enter/'.$role,['cookies'=>$jar,'query'=>$query]);$sessions[$role.$i]=['jar'=>$jar]+json_decode((string)$r->getBody(),true,32,JSON_THROW_ON_ERROR);};$options=function($role,$i=0,$data=null,$headers=[])use(&$sessions){$v=$sessions[$role.$i];$o=['cookies'=>$v['jar'],'headers'=>$headers+['Accept'=>'application/json','X-SGF-Context'=>$v['context'],'X-CSRF-TOKEN'=>$v['csrf']]];if($data!==null)$o['json']=$data;return $o;};$call=function($role,$path,$data=null,$i=0,$headers=[])use($clients,$options,$s){$r=$clients[$i]->request($data===null?'GET':'POST',$path,$options($role,$i,$data,$headers));$text=(string)$r->getBody();if($r->getStatusCode()>=500)file_put_contents($s['root'].'/receipt-documents-last-500.txt',$text);return ['status'=>$r->getStatusCode(),'data'=>json_decode($text,true),'body'=>$text];};foreach(['actor','issuer','validator','reviewer','auditor','requester','approver']as$role)$enter($role);$enter('issuer',1);$enter('auditor',1);$base='/api/purchasing-invoices'; + require dirname(__DIR__).'/scripts/receipt-workspace-source.php'; + require dirname(__DIR__).'/scripts/continuity-boundaries-body.php'; +}finally{foreach($servers as$i=>$server){$server->stop(2);file_put_contents($s['root'].'/receipt-documents-http-'.$i.'.log',$server->getOutput().$server->getErrorOutput());}} diff --git a/scripts/continuity-ui.mjs b/scripts/continuity-ui.mjs new file mode 100644 index 0000000..6be33fa --- /dev/null +++ b/scripts/continuity-ui.mjs @@ -0,0 +1,20 @@ +import fs from 'node:fs';import path from 'node:path';import assert from 'node:assert/strict';import {appendProcessLinks} from '../public/purchasing-focus.mjs'; +const tag=process.argv[2];assert(/^[a-f0-9]{12}$/.test(tag??''));const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),root=path.join(run.root,'private/receipt-composition-'+tag),out=path.join(root,'continuity-ui.json');assert(!fs.existsSync(out));const checks=[],ok=(v,name)=>{assert(v,name);checks.push(name);};let enabled=true,allowed=new Set(['receipts','invoices','obligations','dossiers']); +class Element{constructor(tag,text){this.tag=tag;this.textContent=text??'';this.children=[];this.dataset={focusEnabled:'true',continuityEnabled:enabled?'true':'false',context:'qa-context',csrf:'qa-csrf'};this.isConnected=true;}append(...nodes){this.children.push(...nodes);}prepend(...nodes){this.children.unshift(...nodes);}replaceChildren(...nodes){this.children=[...nodes];}setAttribute(k,v){this[k]=v;}dispatchEvent(){} } +globalThis.Option=class extends Element{constructor(text,value){super('option',text);this.value=value;}};globalThis.FormData=class{*[Symbol.iterator](){} };const walk=e=>[e,...e.children.flatMap(walk)],paginator=data=>({data,current_page:1,last_page:1,per_page:25,total:data.length}),rev='a'.repeat(64),calls=[];let elements=new Map,mismatchReceipt=false; +globalThis.document={createElement:tag=>new Element(tag),querySelector:selector=>{if(selector.startsWith('nav[')){const stage=selector.match(/a\[href="\/purchasing\/([a-z]+)"\]/)?.[1];return allowed.has(stage)?new Element('a'):null;}if(!elements.has(selector))elements.set(selector,new Element(selector));return elements.get(selector);}}; +const request={id:3,number:'REQ-EXACT',status:'approved',items:[],steps:[],total_minor:10000,process_version:3};const invoice={id:77,number:'INV-EXACT',status:'validated',issued_on:'2026-11-03',total_minor:10000,created_by:1,validated_by:2,items:[],purchase_order_id:41}; +const responses={ + '/api/purchasing-requests':{new_revision:rev,centres:[],can_prepare:false,requests:paginator([])},'/api/purchasing-requests/3':{request,capabilities:{},history:[],revision:rev}, + '/api/purchasing-sourcing/requests/3':{request,capabilities:{},comparison:{policy:{minimum_proposals:3,minimum_evaluators:2},ready:true,rows:[],top_ids:[]},quotes:[],award:{id:2,status:'approved',total_minor:10000,approvals:[]},history:[]}, + '/api/purchasing-orders/awards/2':{basis:{award:{id:2,status:'approved',approvals:[],total_minor:10000},quote:{supplier:{name:'QA'},items:[],currency:'MZN'}},existing:{order:{id:41,number:'OC-EXACT',items:[]}},can_issue:false}, + '/api/purchasing-receipts/orders/41':{order:{id:41,number:'OC-EXACT'},progress:{state:'complete'},history:{...paginator([]),last_page:2},can_confirm:false}, + '/api/purchasing-receipts/history/91':{receipt:{id:91,purchase_order_id:41,number:'REC-EXACT'},documents_enabled:false}, + '/api/purchasing-invoices/orders/41':{order:{id:41,number:'OC-EXACT',currency:'MZN',items:[]},invoices:[invoice],can_prepare:false,revision:rev,receipt_progress:{},physical_corrections:[]}, + '/api/purchasing-obligations/77':{documents:[{local_id:77,number:'INV-EXACT',supplier_name:'QA',total_minor:10000,status:'validated',order_id:41,missing:[],lines:[]}],obligations:[],permissions:{},proposals:[],events:[],revision:rev,pagination:{proposals:{page:1,last_page:1},events:{page:1,last_page:1}}}, + '/api/purchasing-dossiers/3':{request,view_revision:rev,_links:[{href:'/purchasing/requests?request=3',label:'Consultar esta requisição'}],stages:Object.fromEntries(['quotes','awards','orders','receipts','invoices','obligations'].map(k=>[k,{accessible:false}])),events:{accessible:true,data:[],pagination:{page:1,last_page:1}}} +}; +globalThis.fetch=async(url,options={})=>{calls.push({url,method:options.method??'GET'});const pathname=url.split('?')[0];let data=responses[pathname];if(!data&&(/\/history$/.test(pathname)||/^\/api\/purchasing-(sourcing|orders|receipts|invoices|obligations|dossiers)$/.test(pathname)))data=paginator([]);if(!data)throw Error('Unexpected mock read '+url);if(mismatchReceipt&&pathname==='/api/purchasing-receipts/history/91')data={receipt:{id:91,purchase_order_id:42,number:'REC-MISMATCH'},documents_enabled:false};return {ok:true,json:async()=>structuredClone(data)};}; +const settle=()=>new Promise(resolve=>setTimeout(resolve,10));let sequence=0;async function mount(file,query){elements=new Map;calls.length=0;globalThis.location={search:query};await import('../public/'+file+'.mjs?case='+tag+'-'+sequence++);await settle();await settle();return {calls:[...calls],detail:document.querySelector(file==='order-workspace'?'#award-detail':file==='sourcing-workspace'?'#process-detail':'#detail'),status:document.querySelector(file==='receipt-workspace'?'#message':'#status')};} + +responses['/api/purchasing-invoices/orders/41'].order.requisition_id=3;const observed=[],links=d=>walk(d.detail).filter(v=>v.href).map(v=>v.href);let d=await mount('receipt-workspace','?order=41');observed.push(...d.calls);ok(links(d).includes('/purchasing/invoices?order=41'),'receipt carries actual order into invoice consultation');ok(d.calls.every(v=>v.url.startsWith('/api/purchasing-receipts')),'receipt continuation adds no hidden cross-stage request');d=await mount('supplier-invoice-workspace','?order=41&invoice=77');observed.push(...d.calls);ok(['/purchasing/receipts?order=41','/purchasing/dossiers?request=3','/purchasing/obligations?invoice=77'].every(v=>links(d).includes(v)),'invoice links retain exact receipt order dossier request and document responsibility');d=await mount('supplier-obligation-workspace','?invoice=77');observed.push(...d.calls);ok(['/purchasing/invoices?order=41&invoice=77','/purchasing/receipts?order=41'].every(v=>links(d).includes(v)),'obligation returns to exact original invoice and physical order');allowed=new Set(['receipts']);d=await mount('receipt-workspace','?order=41');observed.push(...d.calls);ok(!links(d).length,'physical-only menu does not advertise invoice destination');d=await mount('supplier-invoice-workspace','?order=41&invoice=77');observed.push(...d.calls);ok(links(d).length===1&&links(d)[0]==='/purchasing/receipts?order=41','missing obligation and dossier menu entries suppress only those contextual links');enabled=false;allowed=new Set(['receipts','invoices','obligations','dossiers']);d=await mount('supplier-invoice-workspace','?order=41&invoice=77');observed.push(...d.calls);ok(!links(d).length,'disabled continuity feature leaves previous focused screen without inline links');const node=new Element('div');appendProcessLinks(node,[{href:'/purchasing/orders?award=2',label:'original dossier hint'}]);ok(node.children.length===1,'default dossier link rendering remains independent of optional menu filter');ok(observed.every(v=>v.method==='GET'),'all inline-link startup probes perform reads only');fs.writeFileSync(out,JSON.stringify({passed:true,checks,dom_simulation:true,business_commands:0,visual_review:false},null,2));console.log(JSON.stringify({passed:true,checks:checks.length})); diff --git a/scripts/dossier-assets.mjs b/scripts/dossier-assets.mjs new file mode 100644 index 0000000..7c75ce0 --- /dev/null +++ b/scripts/dossier-assets.mjs @@ -0,0 +1,2 @@ +import fs from 'node:fs';import path from 'node:path';import assert from 'node:assert/strict';import crypto from 'node:crypto';import {spawnSync} from 'node:child_process'; +const tag=process.argv[2];assert(/^[a-f0-9]{12}$/.test(tag??''));const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),root=path.join(run.root,'private/receipt-composition-'+tag),s=JSON.parse(fs.readFileSync(path.join(root,'state.json'))),out=path.join(root,'dossier-assets.json');assert(s.dossiers&&!fs.existsSync(out));if(!fs.existsSync(path.join(root,'dossier-build.log'))){const result=spawnSync(process.execPath,['node_modules/vite/bin/vite.js','build','--outDir',path.join(s.app,'public/build')],{cwd:process.cwd(),encoding:'utf8',windowsHide:true,timeout:180000});fs.writeFileSync(path.join(root,'dossier-build.log'),result.stdout+'\n'+result.stderr);assert.equal(result.status,0,'private build');}else assert(fs.readFileSync(path.join(root,'dossier-build.log'),'utf8').includes('built in'),'prior build succeeded');const manifest=JSON.parse(fs.readFileSync(path.join(s.app,'public/build/manifest.json'))),files=Object.values(manifest).flatMap(v=>[v.file,...(v.css??[])]),checks=['private frontend build succeeds'];for(const file of files){const bytes=fs.readFileSync(path.join(s.app,'public/build',file)),r=await fetch('http://127.0.0.1:8074/build/'+file);assert.equal(r.status,200);assert.equal(crypto.createHash('sha256').update(Buffer.from(await r.arrayBuffer())).digest('hex'),crypto.createHash('sha256').update(bytes).digest('hex'));}checks.push('served built assets match private build');const r=await fetch('http://127.0.0.1:8074/purchasing-dossier.mjs');assert.equal(r.status,200);checks.push('dossier module is served through private static whitelist');fs.writeFileSync(out,JSON.stringify({passed:true,checks,assets:files,visual_review:false},null,2));console.log(JSON.stringify({passed:true,checks:checks.length})); diff --git a/scripts/dossier-demo-proof.php b/scripts/dossier-demo-proof.php new file mode 100644 index 0000000..87e9646 --- /dev/null +++ b/scripts/dossier-demo-proof.php @@ -0,0 +1,8 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true);$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.dossier_demo'=>$s['nativeConnection']]);$db=DB::connection('dossier_demo');$checks=[];$ok=function($v,$name)use(&$checks){if(!$v)throw new RuntimeException($name);$checks[]=$name;}; +$fingerprint=function()use($db){$rows=[];foreach(['requisitions','quotations','purchase_orders','goods_receipts','invoices','pa_obligations','audit_logs']as$table)$rows[$table]=$db->table($table)->orderBy('id')->get();$rows['grants']=DB::table('permission_grants')->orderBy('id')->get();$rows['locations']=DB::table('geo_locations')->get();return hash('sha256',json_encode($rows));};$before=$fingerprint();$ok($db->table('requisitions')->where('tenant_id',$n['tenant'])->count()===0&&$db->table('pa_obligations')->count()===0,'live dossier starts without invented process or responsibility');$client=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:8074','http_errors'=>false,'timeout'=>25]); +foreach(['requester','approver','actor','issuer','validator','reviewer']as$role){$jar=new GuzzleHttp\Cookie\CookieJar;$r=$client->get('/qa/enter/'.$role,['cookies'=>$jar]);$v=json_decode((string)$r->getBody(),true);$o=['cookies'=>$jar,'headers'=>['Accept'=>'application/json','X-SGF-Context'=>$v['context']]];$r=$client->get('/api/purchasing-dossiers',$o);$d=json_decode((string)$r->getBody(),true);$allowed=in_array($role,['requester','approver','actor','issuer'],true);$ok($allowed?($r->getStatusCode()===200&&$d['data']===[]):$r->getStatusCode()===403,'live dossier list respects '.$role); + if($role==='actor'){$r=$client->get('/purchasing/dossiers',$o);$ok($r->getStatusCode()===200&&str_contains((string)$r->getBody(),'purchasing-dossier.mjs'),'live dossier page served');$grant=DB::table('permission_grants')->where($f['scope'])->where('user_id',$f['actor'])->where('permission','purchasing_requests.view')->first();DB::table('permission_grants')->where('id',$grant->id)->delete();try{$r=$client->get('/api/purchasing-dossiers',$o);$ok($r->getStatusCode()===403,'revoked existing request right immediately removes dossier access');}finally{DB::table('permission_grants')->insert((array)$grant);}$r=$client->get('/api/purchasing-dossiers',$o);$ok($r->getStatusCode()===200,'restored fixture grant recovers consultation');} +} +$r=$client->get('/purchasing-dossier.mjs');$ok($r->getStatusCode()===200&&hash('sha256',(string)$r->getBody())===hash_file('sha256',$s['app'].'/public/purchasing-dossier.mjs'),'served dossier script matches delivery');$ok($fingerprint()===$before,'live checks preserve process grants and geographical evidence');file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'before'=>$before,'after'=>$fingerprint(),'visual_review'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." dossier demonstration checks passed.\n"; diff --git a/scripts/dossier-guard-proof.php b/scripts/dossier-guard-proof.php new file mode 100644 index 0000000..567d2ab --- /dev/null +++ b/scripts/dossier-guard-proof.php @@ -0,0 +1,7 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$queries=0;$checks=[];DB::listen(function()use(&$queries){$queries++;});$controller=new App\Modules\Purchasing\DossierController;$runtime=new App\Modules\Purchasing\ReceiptRuntime; +$check=function($fn,$status,$name)use(&$checks){try{$fn();throw new RuntimeException('Unexpected access');}catch(Symfony\Component\HttpKernel\Exception\HttpException $e){if($e->getStatusCode()!==$status)throw $e;}$checks[]=$name;}; +config(['receipt_qa.dossiers_enabled'=>false]);$check(fn()=>$controller->index(new Illuminate\Http\Request,$runtime),404,'disabled dossier list refuses before SQL');$check(fn()=>$controller->show(1,new Illuminate\Http\Request,$runtime),404,'disabled dossier detail refuses before SQL'); +config(['receipt_qa.dossiers_enabled'=>true]);$app->instance('env','production');$check(fn()=>$controller->index(new Illuminate\Http\Request,$runtime),403,'production refuses synthetic dossier before SQL'); +if($queries!==0||App\Shared\Context\ModuleNavigation::owner('api/purchasing-dossiers/1')!=='purchasing')throw new RuntimeException('Guard boundary');$checks[]='dossier route belongs to purchasing and guard probes issue zero SQL';file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'database_queries'=>0],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." dossier guard checks passed.\n"; diff --git a/scripts/dossier-read-body.php b/scripts/dossier-read-body.php new file mode 100644 index 0000000..18a37f7 --- /dev/null +++ b/scripts/dossier-read-body.php @@ -0,0 +1,29 @@ +select("SELECT tablename FROM pg_tables WHERE schemaname='public' ORDER BY tablename")as$table){if(!preg_match('/^[a-z0-9_]+$/D',$table->tablename))throw new LogicException('Unexpected fixture table');$name=$table->tablename;$row=$connection->selectOne('SELECT count(*) n,md5(coalesce(string_agg(row_to_json(t)::text,\'\' ORDER BY row_to_json(t)::text),\'\')) h FROM "'.$name.'" t');$result[$name]=[(int)$row->n,$row->h];}$result['sequences']=$connection->select("SELECT sequencename,last_value FROM pg_sequences WHERE schemaname='public' ORDER BY sequencename");return $result;}; +$before=['host'=>$fingerprint(DB::connection()),'native'=>$fingerprint($db)];$saved=json_decode(file_get_contents($s['original_root'].'/integrated-result.json'),true);$id=$saved['source_ids']['request'];$base='/api/purchasing-dossiers';$url=$base.'/'.$id; +$ok($db->table('pa_obligations')->count()===1&&(int)$db->table('pa_obligations')->sum('principal_minor')===10000,'read proof reuses already-proven canonical responsibility without replaying commands'); +$r=$call('issuer',$base.'?status=approved');$ok($r['status']===200&&$r['data']['total']===1&&$r['data']['per_page']===25&&$r['data']['data'][0]['id']===$id,'dossier list applies current origin and server status filter'); +$r=$call('issuer',$base.'?search='.rawurlencode($db->table('requisitions')->where('id',$id)->value('number')));$ok($r['status']===200&&$r['data']['total']===1,'literal process number search returns existing source'); +$r=$call('issuer',$base.'?page=2');$ok($r['status']===200&&$r['data']['data']===[],'second dossier list page contains no repeated source'); +$r=$call('issuer',$url);$full=$r['data'];$ok($r['status']===200&&$full['read_only']===true&&$full['request']['id']===$id&&strlen($full['view_revision'])===64,'finance dossier identifies exact source and visible-page revision'); +foreach(['quotes'=>3,'awards'=>1,'orders'=>1,'receipts'=>1,'invoices'=>1]as$stage=>$count)$ok($full['stages'][$stage]['accessible']===true&&$full['stages'][$stage]['pagination']['total']===$count&&count($full['stages'][$stage]['data'])===$count,'canonical '.$stage.' evidence is present with independent page'); +$ok($full['stages']['orders']['data'][0]['id']===$saved['source_ids']['order']&&$full['stages']['invoices']['data'][0]['id']===$saved['source_ids']['invoice'],'dossier correlations use actual original order and invoice ids'); +$position=$full['stages']['obligations']['data'][0];$ok($position['id']===$saved['source_ids']['obligation']&&$position['principal_minor']===10000&&$position['balance_minor']===10000&&$position['due_on']===null&&$position['source_conflict']===false,'canonical kernel supplies current balance with unknown due date'); +$ok($full['stages']['obligations']['source_window']===true&&$full['stages']['obligations']['pagination']['total_sources']===1,'financial pagination describes bounded source window rather than invented global total'); +$ok($full['events']['pagination']['per_page']===25&&count($full['events']['data'])===25,'authorised event timeline uses server pagination');$e2=$call('issuer',$url.'?events_page=2');$ok($e2['status']===200&&count($e2['data']['events']['data'])>0&&array_intersect(array_column($full['events']['data'],'id'),array_column($e2['data']['events']['data'],'id'))===[],'older event page preserves distinct existing history'); +$r=$call('issuer',$url.'?quotes_page=2&awards_page=2&orders_page=2&receipts_page=2&invoices_page=2&obligations_page=2');$ok($r['status']===200&&$r['data']['stages']['quotes']['data']===[]&&$r['data']['stages']['invoices']['data']===[]&&$r['data']['stages']['obligations']['data']===[],'independent later evidence pages do not reload earlier records'); +$r=$call('actor',$url);$ok($r['status']===200&&$r['data']['stages']['quotes']['accessible']===true&&$r['data']['stages']['invoices']===['accessible'=>false]&&$r['data']['stages']['obligations']===['accessible'=>false],'buyer sees procurement evidence without invoice or payable economics'); +$r=$call('requester',$url);$owner=$r['data'];$ok($r['status']===200&&$owner['request']['id']===$id&&count(array_filter($owner['stages'],fn($v)=>$v!==['accessible'=>false]))===0,'request-only profile sees no downstream rows counts or amounts'); +$ok(!array_filter($owner['events']['data'],fn($v)=>!str_starts_with($v['action'],'requisition.')&&$v['action']!=='sgf.request.command'),'request-only history excludes hidden-stage activity'); +$ok(!array_filter($full['events']['data'],fn($v)=>array_diff(array_keys($v),['id','user_id','action','created_at'])),'event projection never embeds unrestricted before-after payloads'); +$ok($call('validator',$url)['status']===403&&$call('reviewer',$url)['status']===403&&$call('auditor',$base)['status']===403,'physical-only and invoice-only profiles do not inherit request dossier rights'); +$ok($call('issuer',$base.'?unknown=1')['status']===422&&$call('issuer',$url.'?events_page=0')['status']===422&&$call('issuer',$url.'?page=1')['status']===422,'unsupported filters and evidence pages refused'); +$ok($call('issuer',$base.'/'.$n['foreign_requisition'])['status']===403&&$call('issuer',$base.'/999999')['status']===403,'foreign or unknown request exposes no dossier'); +$enter('issuer',1,['module'=>'commercial']);$ok($call('issuer',$url,null,1)['status']===409,'different available module cannot inspect dossier');$enter('issuer',1,['foreign'=>1]);$ok($call('issuer',$url,null,1)['status']===403,'unmapped unit cannot inspect known dossier'); +$ok($call('issuer',$url,null,0,['X-SGF-Context'=>'old'])['status']===409,'stale context generation cannot mix dossier reads'); +$ok($call('issuer','/purchasing/dossiers')['status']===200&&str_contains($call('issuer','/purchasing/workspace')['body'],'href="/purchasing/dossiers"'),'authorised dossier screen is connected to common navigation'); +$ok(!str_contains($call('validator','/purchasing/workspace')['body'],'href="/purchasing/dossiers"'),'physical-only navigation does not advertise request dossier'); +$ok($call('issuer',$url,[])['status']===405,'dossier has no mutation endpoint'); +$after=['host'=>$fingerprint(DB::connection()),'native'=>$fingerprint($db)];$ok(json_encode($before)===json_encode($after),'all original regression tables and sequences remain unchanged after read proof'); +file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'reused_proof'=>'purchasing-integrated-composition-20261103.json','financial_commands_repeated'=>0,'before_sha256'=>hash('sha256',json_encode($before)),'after_sha256'=>hash('sha256',json_encode($after)),'tables_checked'=>count($before['host'])+count($before['native'])-2,'new_right_names'=>[],'visual_review'=>false,'deployment_capacity_validated'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." dossier read checks passed.\n"; diff --git a/scripts/dossier-read-overlay.mjs b/scripts/dossier-read-overlay.mjs new file mode 100644 index 0000000..ebd5b60 --- /dev/null +++ b/scripts/dossier-read-overlay.mjs @@ -0,0 +1,8 @@ +import fs from 'node:fs';import path from 'node:path';import crypto from 'node:crypto';import {spawnSync} from 'node:child_process'; +const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),tag=crypto.randomBytes(6).toString('hex'),sourceRoot=path.join(run.root,'private/receipt-composition-b4093c6f6707'),source=JSON.parse(fs.readFileSync(path.join(sourceRoot,'state.json'))),root=path.join(run.root,'private/dossier-read-'+tag),app=path.join(root,'app'); +if(!JSON.parse(fs.readFileSync(path.join(sourceRoot,'integrated-result.json'))).passed||source.env.DB_DATABASE!=='budget_core_sgf_b4093c6f6707'||source.env.DB_PORT!=='55439'||source.env.SGF_ISOLATED_REGRESSION_RUN!==run.id)throw Error('Owned completed regression book required'); +fs.mkdirSync(root);for(const dir of ['app','bootstrap','config','routes','resources','database','public'])fs.cpSync(dir,path.join(app,dir),{recursive:true,filter:p=>!p.replaceAll('\\','/').includes('bootstrap/cache')});for(const pkg of ['budget-control','payables','general-ledger','module-updates','purchasing'])fs.cpSync(path.join('packages',pkg),path.join(app,'packages',pkg),{recursive:true});fs.symlinkSync(path.resolve('vendor'),path.join(app,'vendor'),'junction');fs.copyFileSync('composer.json',path.join(app,'composer.json'));for(const dir of ['bootstrap/cache','storage/logs','storage/framework/cache/data','storage/framework/views','storage/framework/sessions'])fs.mkdirSync(path.join(app,dir),{recursive:true}); +// Existing bindings, native manifests and business facts remain in place; only application/session files are new. +for(const file of ['fixture.json','native-fixture.json'])fs.copyFileSync(path.join(sourceRoot,file),path.join(root,file)); +const env={...source.env,APP_BASE_PATH:app,SGF_DOSSIERS_QA_ENABLED:'true',SESSION_COOKIE:'sgf_dossier_read_'+tag,RECEIPT_COMPOSITION_STATE:path.join(root,'state.json')};const state={...source,root,app,env,dossiers:true,read_overlay:true,original_root:sourceRoot};fs.writeFileSync(path.join(root,'state.json'),JSON.stringify(state,null,2)); +const result=spawnSync('C:/laragon/tools/sgf-tempo/php-8.4.27/php.exe',[path.resolve('scripts/dossier-read-proof.php')],{cwd:app,env,encoding:'utf8',windowsHide:true,timeout:180000});fs.writeFileSync(path.join(root,'read-proof.log'),result.stdout+'\n'+result.stderr);if(result.status!==0||!fs.existsSync(path.join(root,'dossier-read-result.json')))throw Error('Dossier read proof incomplete; private diagnostics retained '+tag);console.log(JSON.stringify({tag,root,result:result.stdout.trim()})); diff --git a/scripts/dossier-read-proof.php b/scripts/dossier-read-proof.php new file mode 100644 index 0000000..1643a98 --- /dev/null +++ b/scripts/dossier-read-proof.php @@ -0,0 +1,9 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true);$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.sourcing_verify'=>$s['nativeConnection']]);$db=DB::connection('sourcing_verify');$checks=[];$ok=function($v,$name)use(&$checks,$s){if(!$v)throw new RuntimeException($name);$checks[]=$name;file_put_contents($s['root'].'/dossier-read-progress.json',json_encode($checks,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));};$servers=[];$clients=[];$sessions=[]; +try{ + foreach([0,1]as$i){$socket=stream_socket_server('tcp://127.0.0.1:0');$port=(int)substr(strrchr(stream_socket_get_name($socket,false),':'),1);fclose($socket);$server=new Symfony\Component\Process\Process([PHP_BINARY,'-S','127.0.0.1:'.$port,'-t',$s['app'].'/public',dirname(__DIR__).'/scripts/receipt-composition-http.php'],$s['app'],null,null,180);$server->start();$servers[]=$server;for($j=0;$j<80;$j++){if($socket=@fsockopen('127.0.0.1',$port,$errno,$error,.1)){fclose($socket);break;}usleep(50000);}$clients[]=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:'.$port,'http_errors'=>false,'timeout'=>25]);} + $enter=function($role,$i=0,$query=[])use(&$sessions,$clients){$jar=new GuzzleHttp\Cookie\CookieJar;$r=$clients[$i]->get('/qa/enter/'.$role,['cookies'=>$jar,'query'=>$query]);$sessions[$role.$i]=['jar'=>$jar]+json_decode((string)$r->getBody(),true,32,JSON_THROW_ON_ERROR);};$options=function($role,$i=0,$data=null,$headers=[])use(&$sessions){$v=$sessions[$role.$i];$o=['cookies'=>$v['jar'],'headers'=>$headers+['Accept'=>'application/json','X-SGF-Context'=>$v['context'],'X-CSRF-TOKEN'=>$v['csrf']]];if($data!==null)$o['json']=$data;return $o;};$call=function($role,$path,$data=null,$i=0,$headers=[])use($clients,$options,$s){$r=$clients[$i]->request($data===null?'GET':'POST',$path,$options($role,$i,$data,$headers));$text=(string)$r->getBody();if($r->getStatusCode()>=500)file_put_contents($s['root'].'/dossier-last-500.txt',$text);return ['status'=>$r->getStatusCode(),'data'=>json_decode($text,true),'body'=>$text];};foreach(['actor','issuer','validator','reviewer','auditor','requester','approver']as$role)$enter($role);$enter('issuer',1);$enter('auditor',1);$base='/api/purchasing-invoices'; + require dirname(__DIR__).'/scripts/dossier-read-body.php'; +}finally{foreach($servers as$i=>$server){$server->stop(2);file_put_contents($s['root'].'/dossier-http-'.$i.'.log',$server->getOutput().$server->getErrorOutput());}} diff --git a/scripts/finance-bundle-boot-check.mjs b/scripts/finance-bundle-boot-check.mjs new file mode 100644 index 0000000..dd18d01 --- /dev/null +++ b/scripts/finance-bundle-boot-check.mjs @@ -0,0 +1,11 @@ +import fs from 'node:fs';import path from 'node:path';import crypto from 'node:crypto';import {spawnSync} from 'node:child_process'; +const read=p=>JSON.parse(fs.readFileSync(p,'utf8')),state=read('C:/laragon/data/sgf-tempo/run/modular-regression-current.json'),tag=process.argv[2];if(state.port!==55439||!/^[a-f0-9]{12}$/.test(tag??''))throw Error('Owned native fixture required'); +const root=path.join(state.root,'private/ledger-native-'+tag),settings=read(path.join(root,'settings.json')),artifact=read(path.join(settings.common_bundle,'manifest.json')),testRoot=path.join(root,'bundle-boot-'+crypto.randomBytes(6).toString('hex'));fs.mkdirSync(testRoot);let checks=0; +for(const [name,expected] of [['modified','FINANCE_BUNDLE_FILE_MISMATCH'],['extra','FINANCE_BUNDLE_EXTRA_OR_MISSING_FILE'],['pin','FINANCE_BUNDLE_MANIFEST_MISMATCH'],['loader','FINANCE_BUNDLE_LOADER_MISMATCH']]){ + const dir=path.join(testRoot,name);fs.mkdirSync(dir);for(const f of [...artifact.files.map(f=>f.file),'manifest.json']){const to=path.join(dir,f);fs.mkdirSync(path.dirname(to),{recursive:true});fs.copyFileSync(path.join(settings.common_bundle,f),to);} + if(name==='modified')fs.appendFileSync(path.join(dir,'payables/bootstrap.php'),'\n// QA altered content\n');if(name==='extra')fs.writeFileSync(path.join(dir,'unexpected.txt'),'QA'); + const marker=path.join(dir,'executed.txt');if(name==='loader')fs.writeFileSync(path.join(dir,'Bundle.php'),'crypto.createHash('sha256').update(fs.readFileSync(p)).digest('hex');fs.mkdirSync(root);const files=[]; +const copy=(source,file)=>{const destination=path.join(root,file);fs.mkdirSync(path.dirname(destination),{recursive:true});fs.copyFileSync(source,destination);files.push({file,sha256:sha(destination)});}; +copy('packages/finance-bundle/Bundle.php','Bundle.php'); +for(const name of ['payables','general-ledger']){for(const file of ['bootstrap.php','README.md'])if(fs.existsSync('packages/'+name+'/'+file))copy('packages/'+name+'/'+file,name+'/'+file);for(const dir of ['src','ui'])for(const file of fs.readdirSync('packages/'+name+'/'+dir).sort()){if(!/^[A-Za-z0-9_-]+\.php$/.test(file))throw Error('Unexpected runtime source');copy('packages/'+name+'/'+dir+'/'+file,name+'/'+dir+'/'+file);}} +files.sort((a,b)=>a.file.localeCompare(b.file));const manifest=path.join(root,'manifest.json');fs.writeFileSync(manifest,JSON.stringify({contract:'COMMON-FINANCE-BUNDLE-v1',synthetic_only:true,files},null,2)+'\n');const hash=sha(manifest); +const code='require $argv[1]."/Bundle.php"; echo json_encode(Tempo\\Finance\\Composition\\Bundle::verify($argv[1],$argv[2]));'; +const test=spawnSync('C:/laragon/tools/sgf-tempo/php-8.4.27/php.exe',['-r',code,root,hash],{encoding:'utf8',windowsHide:true});if(test.status!==0)throw Error('Fresh artifact verification failed'); +const record={tag,root,manifest_sha256:hash,files:files.length,tests_or_credentials_included:false,installed_or_activated:false};fs.writeFileSync(path.join(state.root,'finance-bundle-latest.json'),JSON.stringify(record,null,2)+'\n');console.log(JSON.stringify(record)); diff --git a/scripts/finance-bundle-check.mjs b/scripts/finance-bundle-check.mjs new file mode 100644 index 0000000..8665065 --- /dev/null +++ b/scripts/finance-bundle-check.mjs @@ -0,0 +1,10 @@ +import fs from 'node:fs';import path from 'node:path';import crypto from 'node:crypto';import {spawnSync} from 'node:child_process'; +const read=p=>JSON.parse(fs.readFileSync(p,'utf8')),state=read('C:/laragon/data/sgf-tempo/run/modular-regression-current.json'),artifact=read(path.join(state.root,'finance-bundle-latest.json')),root=path.join(state.root,'private/finance-bundle-check-'+crypto.randomBytes(6).toString('hex'));fs.mkdirSync(root);let checks=0; +const manifest=read(path.join(artifact.root,'manifest.json')),run=(dir,pin)=>spawnSync('C:/laragon/tools/sgf-tempo/php-8.4.27/php.exe',['-r','require $argv[1]; try { Tempo\\Finance\\Composition\\Bundle::verify($argv[2],$argv[3]); echo "accepted"; } catch(Throwable $e) { echo "refused"; exit(2); }',path.resolve('packages/finance-bundle/Bundle.php'),dir,pin],{encoding:'utf8',windowsHide:true}); +if(run(artifact.root,artifact.manifest_sha256).status!==0)throw Error('Valid artifact refused');checks++; +for(const kind of ['modified','missing','extra','traversal','pin']){ + const dir=path.join(root,kind);fs.mkdirSync(dir);for(const f of [...manifest.files.map(f=>f.file),'manifest.json']){if(kind==='missing'&&f==='payables/bootstrap.php')continue;const target=path.join(dir,f);fs.mkdirSync(path.dirname(target),{recursive:true});fs.copyFileSync(path.join(artifact.root,f),target);} + let pin=artifact.manifest_sha256;if(kind==='modified')fs.appendFileSync(path.join(dir,'payables/bootstrap.php'),'\n// QA altered file\n');if(kind==='extra')fs.writeFileSync(path.join(dir,'unexpected.txt'),'QA');if(kind==='traversal'){const m=read(path.join(dir,'manifest.json'));m.files[0].file='../outside.php';fs.writeFileSync(path.join(dir,'manifest.json'),JSON.stringify(m));pin=crypto.createHash('sha256').update(fs.readFileSync(path.join(dir,'manifest.json'))).digest('hex');}if(kind==='pin')pin='0'.repeat(64); + if(run(dir,pin).status!==2)throw Error('Invalid artifact not refused: '+kind);checks++; +} +const output={passed:true,checks,artifact_files:manifest.files.length,manifest_sha256:artifact.manifest_sha256,refused:['modified','missing','extra','traversal','wrong_pin'],private_diagnostics_preserved:true};fs.writeFileSync(path.join(root,'proof.json'),JSON.stringify(output,null,2)+'\n');fs.writeFileSync(path.join(state.root,'finance-bundle-check-latest.json'),JSON.stringify({root,...output},null,2)+'\n');console.log(JSON.stringify(output)); diff --git a/scripts/financial-receipt-core.php b/scripts/financial-receipt-core.php new file mode 100644 index 0000000..ad76715 --- /dev/null +++ b/scripts/financial-receipt-core.php @@ -0,0 +1,4 @@ +null)===null);}$caught=false;try{ReceiptReader::read(DB::connection(),'recognition',$scope,$g['actors']['prepare'],$f['key'],null);}catch(DomainException){$caught=true;}$ok($caught);$caught=false;try{ReceiptReader::read(DB::connection(),'pa_commands;DROP TABLE users',$scope,$g['actors']['prepare'],$f['key'],static fn()=>null);}catch(InvalidArgumentException){$caught=true;}$ok($caught);$ok(DB::table('ps_payments')->count()===0);}finally{DB::rollBack();}file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'foreign_tenant_company_unit_absent'=>true,'missing_read_authorizer_refused'=>true,'domain_whitelist'=>true,'read_only'=>true],JSON_PRETTY_PRINT));echo "Financial receipt core: $checks checks.\n"; diff --git a/scripts/financial-receipt-form.mjs b/scripts/financial-receipt-form.mjs new file mode 100644 index 0000000..f6b1aa5 --- /dev/null +++ b/scripts/financial-receipt-form.mjs @@ -0,0 +1,2 @@ +import fs from 'node:fs';import vm from 'node:vm';import assert from 'node:assert/strict'; +const root='C:/laragon/data/sgf-tempo/run/modular-regression-2576427d1939/private/ledger-6070063f42f2',out=root+'/financial-receipt-form.json';if(fs.existsSync(out))throw Error('Preserved proof');const scripts=[...fs.readFileSync(root+'/financial-receipt-page.html','utf8').matchAll(/')); + check(injection.status === 200 && !injection.text.includes('') && injection.text.includes('<script>evidence_xss</script>'), 'Focused search remains escaped'); + check(focused.headers.get('cache-control').includes('no-store'), 'Private focused response'); + const report = {increment: 'SGF-PAYABLE-EVIDENCE-FOCUS-SIM-v1', passed: true, checks, real_http_kernel: true, read_only_actor: true, visual_review: false, browser_interactions_tested: false}; + fs.writeFileSync(path.join(root, 'evidence-http.json'), JSON.stringify(report, null, 2) + '\n'); + console.log(JSON.stringify(report)); +} finally { + if (server.exitCode === null) { server.kill(); await new Promise(resolve => server.once('exit', resolve)); } + fs.closeSync(log); +} diff --git a/scripts/payable-evidence-post.php b/scripts/payable-evidence-post.php new file mode 100644 index 0000000..941513a --- /dev/null +++ b/scripts/payable-evidence-post.php @@ -0,0 +1,19 @@ +where($f['scope'])->orderBy('id')->cursor() as $row) hash_update($hash, Payables::canonical((array) $row)."\n"); + } + $current = hash_final($hash); + if ($current !== $prior['scoped_business_fingerprint'] || DB::getSchemaBuilder()->hasTable('ps_payments') || config('supplier_payable_history.synthetic_enabled') !== false) throw new LogicException('Previous financial proof or default guard changed'); + $report = ['passed' => true, 'read_only' => true, 'previous_scoped_business_fingerprint_equal' => true, 'scoped_business_fingerprint' => $current, 'temporary_settlement_schema_absent' => true, 'history_default_disabled' => true, 'previous_post_proof_sha256' => hash_file('sha256', $s['root'].'/page-post.json')]; + file_put_contents($s['root'].'/evidence-post.json', json_encode($report, JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR)); + echo json_encode($report)."\n"; +} finally { DB::rollBack(); } diff --git a/scripts/payable-evidence-settlements.php b/scripts/payable-evidence-settlements.php new file mode 100644 index 0000000..020e081 --- /dev/null +++ b/scripts/payable-evidence-settlements.php @@ -0,0 +1,83 @@ + true]); +$reader = User::findOrFail($f['actors']['read']); $service = app(SupplierPayables::class); +$enter = function (User $user) use ($scope): void { auth()->setUser($user); app(CompanyContext::class)->selectFor($user->id, $scope['tenant_id'], $scope['company_id'], $scope['unit_id']); }; +$checks = 0; $assert = function (bool $ok, string $message) use (&$checks): void { $checks++; if (! $ok) throw new RuntimeException($message); }; +$request = function (array $query) use ($reader): Request { + $r = Request::create('/api/supplier-payments?'.http_build_query($query), 'GET'); + $r->headers->set('Accept', 'application/json'); $r->setUserResolver(fn () => $reader); + $r->setLaravelSession(app('session')->driver()); + return $r; +}; +if (DB::getSchemaBuilder()->hasTable('ps_payments')) throw new LogicException('Retained fixture must have no settlement schema'); +DB::beginTransaction(); +try { + SettlementSchema::install(); + foreach (['payments_view', 'payment_prepare'] as $action) DB::table('pa_access')->insert($scope + ['user_id' => $reader->id, 'action' => $action, 'person' => 'sgf-history-person-'.$reader->id]); + $enter($reader); + $base = $service->document($reader, $f['source_id']); unset($base['local_id']); + $ids = []; + foreach (['A', 'B'] as $n => $label) { + $doc = array_replace($base, ['document' => 900001 + $n, 'number' => 'SIM-FOCUSED-ELIGIBLE-'.$label, 'payment_count' => 0]); + $payload = Payables::canonical($doc); + $id = DB::table('pa_imported_sources')->insertGetId($scope + ['payload' => $payload, 'receipt_hash' => hash('sha256', $payload)]); + $enter(User::findOrFail($f['actors']['prepare'])); + $proposal = $service->engine(auth()->user())->command('prepare', $id, 'Explicit nonhistorical synthetic source.', (string) Str::uuid()); + $enter(User::findOrFail($f['actors']['validate'])); + $result = $service->engine(auth()->user())->command('validate', $proposal['proposal_id'], 'Independent synthetic recognition.', (string) Str::uuid()); + $assert($result['state'] === 'recognised', 'Normal synthetic obligation recognised through common engine'); + $ids[] = $id; + } + $enter($reader); + $controller = app(SupplierPaymentsController::class); + $a = $controller->index($request([]))->getData(true); + $b = $controller->index($request(['page' => 2]))->getData(true); + $assert(count($a['obligations']) === 25 && count($b['obligations']) === 25, 'Payment obligation windows bounded'); + $assert(! array_intersect(array_column($a['obligations'], 'id'), array_column($b['obligations'], 'id')), 'Second obligation page accessible and disjoint'); + $assert($a['obligation_pagination']['total'] === 10002, 'Count reflects server document filters'); + $focused = $controller->index($request(['source' => $ids[0]]))->getData(true); + $assert(count($focused['obligations']) === 1 && $focused['obligations'][0]['balance_minor'] === 6000 && ! $focused['obligations'][0]['history_imported'], 'Focused eligible debt retains common balance'); + $assert($focused['obligations'][0]['evidence_url'] === '/supplier-payables?source='.$ids[0], 'Exact source evidence link'); + $origin = $focused['obligations'][0]['origin_snapshot']; + $assert($origin['number'] === 'SIM-FOCUSED-ELIGIBLE-A', 'Exact recognition proposal snapshot'); + $source = $focused['obligations'][0]['source_id']; + $proposal = (array) DB::table('pa_proposals')->where($scope)->where('source_id', $source)->first(); unset($proposal['id']); + for ($n = 1; $n <= 40; $n++) { + $new = json_decode($proposal['snapshot'], true, 64, JSON_THROW_ON_ERROR); $new['supplier_name'] = 'LATER PROPOSAL MUST NOT REPLACE RECOGNITION'; + DB::table('pa_proposals')->insert(array_replace($proposal, ['capture_version' => $proposal['capture_version'] + $n, 'snapshot' => Payables::canonical($new)])); + } + $latest = $controller->index($request(['source' => $ids[0], 'proposal_page' => 2]))->getData(true); + $assert($latest['obligations'][0]['origin_snapshot'] === $origin, 'Recognition evidence does not depend on paginated proposal window'); + $html = $controller->page($request(['source' => $ids[0]]))->getContent(); + $assert(str_contains($html, 'name="source" value="'.$ids[0].'"') && str_contains($html, 'href="/supplier-payables?source='.$ids[0].'"'), 'Rendered selection and return retain focus'); + $assert(str_contains($html, 'Conferir origem, propostas e histórico') && str_contains($html, 'SIM-FOCUSED-ELIGIBLE-A'), 'Evidence link and selected source visible'); + $page = $controller->page($request([]))->getContent(); + $assert(str_contains($page, 'Paginação de origens para pagamentos') && str_contains($page, 'page=2'), 'Rendered next-page navigation'); + $payable = $service->listing($reader, ['source' => $ids[0]]); + $html = Workspace::render($payable, ['host' => 'QA', 'actor' => 'QA', 'organisation' => 'QA', 'api' => '/api/supplier-payables', 'document_filter' => 'source', 'csrf' => '']); + $assert(str_contains($html, 'href="/supplier-payments?source='.$ids[0].'"'), 'Obligation workspace carries focus into payment workspace'); + $invalid = false; + try { $controller->index($request(['company_id' => 999])); } catch (Symfony\Component\HttpKernel\Exception\HttpExceptionInterface $e) { $invalid = $e->getStatusCode() === 422; } + $assert($invalid, 'Payment workspace refuses injected scope'); + $foreign = false; + try { $controller->index($request(['source' => PHP_INT_MAX])); } catch (Symfony\Component\HttpKernel\Exception\HttpExceptionInterface $e) { $foreign = $e->getStatusCode() === 403; } + $assert($foreign, 'Payment workspace cannot bypass source isolation'); + $assert(DB::table('ps_payments')->count() === 0 && DB::table('ps_allocations')->count() === 0, 'Navigation creates no payment or allocation'); + DB::table('pa_access')->where($scope)->where(['user_id' => $reader->id, 'action' => 'payments_view'])->delete(); + $revoked = false; + try { $controller->index($request(['source' => $ids[0]])); } catch (Symfony\Component\HttpKernel\Exception\HttpExceptionInterface $e) { $revoked = $e->getStatusCode() === 403; } + $assert($revoked, 'Payment read right independently enforced'); +} finally { while (DB::transactionLevel() > 0) DB::rollBack(); } +$assert(! DB::getSchemaBuilder()->hasTable('ps_payments'), 'Temporary settlement schema rolled back'); +$report = ['passed' => true, 'assertions' => $checks, 'bounded_obligation_selection' => true, 'exact_recognition_proposal' => true, 'source_focus_bidirectional' => true, 'no_payment_or_allocation' => true, 'schema_and_test_rows_rolled_back' => true, 'payment_history_pagination_implemented' => false]; +file_put_contents($s['root'].'/evidence-settlements.json', json_encode($report, JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR)); +echo json_encode($report)."\n"; diff --git a/scripts/payable-history-sgf-proof.php b/scripts/payable-history-sgf-proof.php index 84e6325..ab02579 100644 --- a/scripts/payable-history-sgf-proof.php +++ b/scripts/payable-history-sgf-proof.php @@ -3,11 +3,31 @@ $file=realpath($argv[1]??'');$state=json_decode(file_get_contents('C:/laragon/data/sgf-tempo/run/modular-regression-current.json'),true,512,JSON_THROW_ON_ERROR); $private=realpath($state['root'].'/private'); if(!$file||!$private||!str_starts_with($file,$private.DIRECTORY_SEPARATOR)||$state['port']!==55439)throw new LogicException('QA settings refused'); -$s=json_decode(file_get_contents($file),true,512,JSON_THROW_ON_ERROR);$phase=$argv[2]??'';$native=in_array($phase,['native','native-post'],true);$mode=$native?'native':'sgf';$c=$s[$mode]; +$s=json_decode(file_get_contents($file),true,512,JSON_THROW_ON_ERROR);$phase=$argv[2]??'';$native=in_array($phase,['native','native-post'],true)||str_starts_with($phase,'native-page-')||str_starts_with($phase,'native-cycle-');$mode=$native?'native':'sgf';$c=$s[$mode]; if(!preg_match('/^[a-f0-9]{12}$/D',$s['tag'])||$c['database']!==($native?'compras_receipts_test_':'payable_sgf_').$s['tag']||$c['role']!=='payable_history_'.$mode.'_'.$s['tag'])throw new LogicException('QA identity refused'); $env=['APP_ENV'=>$native?'testing':'payable-testing','APP_DEBUG'=>'false','APP_KEY'=>'base64:'.base64_encode(str_repeat('s',32)),'DB_CONNECTION'=>'pgsql','DB_URL'=>'','DB_HOST'=>'127.0.0.1','DB_PORT'=>'55439','DB_DATABASE'=>$c['database'],'DB_USERNAME'=>$c['role'],'DB_PASSWORD'=>$c['password'],'SESSION_DRIVER'=>'array','CACHE_STORE'=>'array','QUEUE_CONNECTION'=>'sync','MAIL_MAILER'=>'array','BCRYPT_ROUNDS'=>'4','LARAVEL_STORAGE_PATH'=>$c['storage'],'APP_CONFIG_CACHE'=>$c['storage'].'/cache/config.php','APP_ROUTES_CACHE'=>$c['storage'].'/cache/routes.php','APP_SERVICES_CACHE'=>$c['storage'].'/cache/services.php','APP_PACKAGES_CACHE'=>$c['storage'].'/cache/packages.php','VIEW_COMPILED_PATH'=>$c['storage'].'/framework/views','COMMON_PAYABLES_PATH'=>dirname(__DIR__).'/packages/payables','COMMON_PAYABLES_ENABLED'=>'true','COMMON_PAYABLES_HISTORY_ENABLED'=>'true','PAYABLE_SOURCE_INSTANCE'=>$s['source_instance']]; +if(isset($s['common_bundle'])){ + $bundleRoot=realpath($s['common_bundle']);if(!$native||!$bundleRoot||!str_starts_with($bundleRoot,$private.DIRECTORY_SEPARATOR))throw new LogicException('Owned standalone artifact required'); + $bundle=['payables'=>$bundleRoot.'/payables','ledger'=>$bundleRoot.'/general-ledger'];$env['COMMON_FINANCE_BUNDLE_ROOT']=$bundleRoot;$env['COMMON_FINANCE_BUNDLE_SHA256']=$s['common_bundle_sha256']??''; +} foreach($env as $k=>$v){putenv($k.'='.$v);$_ENV[$k]=$_SERVER[$k]=$v;} -if($phase==='http'){putenv('SESSION_DRIVER=file');$_ENV['SESSION_DRIVER']=$_SERVER['SESSION_DRIVER']='file';} +if(str_starts_with($phase,'ledger-sales-')){foreach(['APP_ENV'=>'testing','SGF_SALES_LEDGER_QA'=>'true'] as $k=>$v){putenv($k.'='.$v);$_ENV[$k]=$_SERVER[$k]=$v;}} +if(str_starts_with($phase,'ledger-cost-')){foreach(['APP_ENV'=>'testing','SGF_COST_LEDGER_QA'=>'true'] as $k=>$v){putenv($k.'='.$v);$_ENV[$k]=$_SERVER[$k]=$v;}} +if(str_starts_with($phase,'ledger-cost-correction-')||($s['cost_correction']??false)===true){putenv('SGF_COST_CORRECTION_QA=true');$_ENV['SGF_COST_CORRECTION_QA']=$_SERVER['SGF_COST_CORRECTION_QA']='true';} +if(str_starts_with($phase,'ledger-cost-composition-')||($s['ledger_composition']??false)===true){foreach(['SGF_COST_CORRECTION_QA'=>'true','SGF_SALES_LEDGER_QA'=>'true','SGF_LEDGER_COMPOSITION_QA'=>'true'] as $k=>$v){putenv($k.'='.$v);$_ENV[$k]=$_SERVER[$k]=$v;}} +if(str_starts_with($phase,'ledger-cost-industrial-')||($s['industrial_ledger']??false)===true){putenv('SGF_INDUSTRIAL_LEDGER_QA=true');$_ENV['SGF_INDUSTRIAL_LEDGER_QA']=$_SERVER['SGF_INDUSTRIAL_LEDGER_QA']='true';} +if(str_starts_with($phase,'ledger-cost-industrial-correction-')||($s['industrial_correction']??false)===true){putenv('SGF_INDUSTRIAL_CORRECTION_QA=true');$_ENV['SGF_INDUSTRIAL_CORRECTION_QA']=$_SERVER['SGF_INDUSTRIAL_CORRECTION_QA']='true';} +if($phase==='ledger-cost-http'){foreach(['APP_ENV'=>'browser-testing','SESSION_DRIVER'=>'file','SESSION_COOKIE'=>'sgf_cost_'.$s['tag'],'SESSION_SECURE_COOKIE'=>'false'] as $k=>$v){putenv($k.'='.$v);$_ENV[$k]=$_SERVER[$k]=$v;}} +if($phase==='ledger-sales-http'){foreach(['APP_ENV'=>'browser-testing','SESSION_DRIVER'=>'file','SESSION_COOKIE'=>'sgf_sales_'.$s['tag'],'SESSION_SECURE_COOKIE'=>'false'] as $k=>$v){putenv($k.'='.$v);$_ENV[$k]=$_SERVER[$k]=$v;}} +if(isset($s['app_key'])){putenv('APP_KEY='.$s['app_key']);$_ENV['APP_KEY']=$_SERVER['APP_KEY']=$s['app_key'];} +if(in_array($phase,['http','settlement-page-http','settlement-read-http','payable-report-http','ledger-http'],true)){putenv('SESSION_DRIVER=file');$_ENV['SESSION_DRIVER']=$_SERVER['SESSION_DRIVER']='file';} +if($phase==='ledger-http'){foreach(['SESSION_COOKIE'=>'sgf_ledger_'.$s['tag'],'SESSION_SECURE_COOKIE'=>'false'] as $k=>$v){putenv($k.'='.$v);$_ENV[$k]=$_SERVER[$k]=$v;}} +if($phase==='native-page-http'){ + foreach(['APP_ENV'=>'payable-testing','SESSION_DRIVER'=>'file','SESSION_COOKIE'=>'qa_native_page_'.$s['tag'],'SESSION_SECURE_COOKIE'=>'false','COMMON_PAYABLES_HISTORY_DECISIONS_ENABLED'=>'false'] as $k=>$v){putenv($k.'='.$v);$_ENV[$k]=$_SERVER[$k]=$v;} +} +if($phase==='native-cycle-http'){ + foreach(['APP_ENV'=>'payable-testing','SESSION_DRIVER'=>'file','SESSION_COOKIE'=>'sgc_ledger_'.$s['tag'],'SESSION_SECURE_COOKIE'=>'false'] as $k=>$v){putenv($k.'='.$v);$_ENV[$k]=$_SERVER[$k]=$v;} +} require $c['root'].'/vendor/autoload.php';$app=require $c['root'].'/bootstrap/app.php';$app->useStoragePath($c['storage']);$app->addAbsoluteCachePathPrefix('C:');$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; @@ -16,6 +36,9 @@ $i=DB::selectOne("SELECT current_database() AS db,current_user AS role,inet_serv if($i->db!==$c['database']||$i->role!==$c['role']||(int)$i->port!==55439||$i->cluster!==$s['cluster'])throw new LogicException('Effective QA host refused'); $role=DB::selectOne('SELECT rolsuper OR rolcreatedb OR rolcreaterole OR rolreplication OR rolbypassrls AS elevated FROM pg_roles WHERE rolname=current_user');if($role->elevated)throw new LogicException('Elevated role refused'); function fingerprint():string {$rows=[];foreach(['invoices','invoice_items','external_payments','budget_entries','budget_consumptions','stock_movements'] as $t)$rows[$t]=DB::table($t)->orderBy('id')->get()->map(fn($r)=>(array)$r)->all();return hash('sha256',Payables::canonical($rows));} +if(str_starts_with($phase,'ledger-sales-')){require __DIR__.'/ledger-sales-proof.php';exit;} +if(str_starts_with($phase,'ledger-cost-')){require __DIR__.'/ledger-cost-proof.php';exit;} +if(str_starts_with($phase,'native-cycle-')){require __DIR__.'/ledger-cycle-native-proof.php';exit;} if($phase==='native'){ if(DB::getSchemaBuilder()->hasTable('users'))throw new LogicException('Fresh native database required'); Illuminate\Support\Facades\Artisan::call('migrate',['--force'=>true]);require $c['root'].'/tests/Support/PaymentFixture.php';$f=paymentFixture(); @@ -56,6 +79,9 @@ if($phase==='worker'){ try{$r=app(App\Modules\Purchasing\SupplierPayables::class)->engine($u)->command('validate_history',$w['proposal'],'Synthetic exact history conference.',$w['key']);$out=['status'=>200,'result'=>$r];}catch(DomainException $e){$out=['status'=>409];} file_put_contents($input.'.result',json_encode($out,JSON_THROW_ON_ERROR));exit; } +if($phase==='page-read-worker'){ + $input=realpath($argv[3]??'');if(!$input||!str_starts_with($input,realpath($s['root']).DIRECTORY_SEPARATOR))throw new LogicException('Read worker input refused');$w=json_decode(file_get_contents($input),true,64,JSON_THROW_ON_ERROR);$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true,64,JSON_THROW_ON_ERROR);config(['supplier_payable_history.synthetic_enabled'=>true]);$u=App\Models\User::findOrFail($f['actors']['read']);auth()->setUser($u);app(App\Shared\Context\CompanyContext::class)->selectFor($u->id,$f['scope']['tenant_id'],$f['scope']['company_id'],$f['scope']['unit_id']);$start=hrtime(true);$d=app(App\Modules\Purchasing\SupplierPayables::class)->listing($u);file_put_contents($input.'.result',json_encode(['documents'=>count($d['documents']),'balances'=>array_column($d['obligations'],'balance_minor'),'time_ms'=>(hrtime(true)-$start)/1e6],JSON_THROW_ON_ERROR));exit; +} if($phase==='http'){ config(['supplier_payable_history.synthetic_enabled'=>true]);$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true,64,JSON_THROW_ON_ERROR); Illuminate\Support\Facades\Route::middleware('web')->get('/qa/enter/{role}',function(Illuminate\Http\Request $r,string $role)use($f){abort_unless(in_array($role,['prepare','validate','read'],true),404);$u=App\Models\User::findOrFail($f['actors'][$role]);auth()->login($u);$r->session()->regenerate();$token=bin2hex(random_bytes(24));$r->session()->put('auth_version',$u->auth_version);$r->session()->put('company_context',$f['scope']+['token'=>$token,'module_id'=>'purchasing']);return response()->json(['csrf'=>csrf_token(),'context'=>$token,'source_id'=>$f['source_id']])->header('Cache-Control','no-store');}); @@ -66,8 +92,17 @@ if($phase==='post'){ if(!$row||!$ob||!$import||Payables::canonical($source)!==Payables::canonical(json_decode($row->payload,true))||DB::table('pa_obligations')->count()!==1||DB::table('pa_history_imports')->count()!==1||DB::table('pa_imported_payments')->count()!==3||(int)$ob->principal_minor!==6000||(int)$import->confirmed_minor!==3000||(int)$import->pending_minor!==1000||(int)$import->rejected_minor!==500||DB::table('pa_source_histories')->count()!==1||config('supplier_payable_history.synthetic_enabled')!==false)throw new LogicException('SGF final preservation check failed'); file_put_contents($s['root'].'/sgf-post.json',json_encode(['read_only'=>true,'one_obligation'=>true,'one_history_import'=>true,'original_source_unchanged'=>true,'source_receipt_sha256'=>$row->receipt_hash,'imported_payments'=>3,'states'=>DB::table('pa_imported_payments')->orderBy('legacy_payment_id')->pluck('status')->all(),'recognition_events'=>DB::table('pa_events')->where('kind','payable.recognised')->count(),'history_events'=>DB::table('pa_events')->where('kind','payable.legacy_history_imported')->count(),'principal_minor'=>6000,'confirmed_minor'=>3000,'pending_minor'=>1000,'rejected_minor'=>500,'pending_decision_schema_installed'=>DB::getSchemaBuilder()->hasTable('pa_payment_decisions'),'default_feature_enabled'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));DB::rollBack();echo "SGF final source, single import and default-disabled configuration verified read-only.\n";exit; } +if(str_starts_with($phase,'native-page-')){require __DIR__.'/native-payable-page-proof.php';exit;} +if($phase==='page-evidence'){require __DIR__.'/payable-evidence-cases.php';exit;} +if($phase==='page-evidence-settlements'){require __DIR__.'/payable-evidence-settlements.php';exit;} +if($phase==='page-evidence-post'){require __DIR__.'/payable-evidence-post.php';exit;} +if(str_starts_with($phase,'settlement-page-')||str_starts_with($phase,'settlement-read-')){require __DIR__.'/settlement-page-proof.php';exit;} +if(str_starts_with($phase,'payable-report-profile-')){require __DIR__.'/payable-report-profile.php';exit;} +if(str_starts_with($phase,'payable-report-')){require __DIR__.'/payable-report-proof.php';exit;} +if(str_starts_with($phase,'ledger-')){require __DIR__.'/ledger-proof.php';exit;} if($phase==='page-seed'){require __DIR__.'/payable-page-fixture.php';exit;} if($phase==='page-cases'){require __DIR__.'/payable-page-cases.php';exit;} if($phase==='page-bench'){require __DIR__.'/payable-page-bench.php';exit;} +if(in_array($phase,['page-fresh-command','page-post','page-concurrent-read','page-filter-positive'],true)){require __DIR__.'/payable-page-final.php';exit;} if($phase!=='regression')throw new LogicException('Unknown phase'); require __DIR__.'/payable-history-sgf-cases.php'; diff --git a/scripts/payable-page-final.php b/scripts/payable-page-final.php new file mode 100644 index 0000000..8cc4d52 --- /dev/null +++ b/scripts/payable-page-final.php @@ -0,0 +1,39 @@ +true]);$u=App\Models\User::findOrFail($f['actors']['read']);auth()->setUser($u);app(CompanyContext::class)->selectFor($u->id,$scope['tenant_id'],$scope['company_id'],$scope['unit_id']);$service=app(SupplierPayables::class); +if($phase==='page-filter-positive'){ + DB::beginTransaction();try{ + $base=$service->document($u,$f['source_id']);unset($base['local_id']);$base['document']=999999;$base['number']='PENDING-RECOGNITION-FIXTURE';$payload=Payables::canonical($base);$id=DB::table('pa_imported_sources')->insertGetId($scope+['payload'=>$payload,'receipt_hash'=>hash('sha256',$payload)]);$visible=$service->listing($u,['q'=>'PENDING-RECOGNITION-FIXTURE','recognition'=>'unrecognised']);if($visible['pagination']['documents']['total']!==1||$visible['documents'][0]['local_id']!==$id||$visible['obligations']||!$visible['events']->isEmpty()||!$visible['proposals']->isEmpty())throw new RuntimeException('Unrecognised filter is not scoped before pagination');$absent=$service->listing($u,['q'=>'PENDING-RECOGNITION-FIXTURE','recognition'=>'recognised']);if($absent['pagination']['documents']['total']!==0)throw new RuntimeException('Recognised predicate mismatch'); + $base['number']='INVISIBLE-SAME-COMPANY';$payload=Payables::canonical($base);$foreign=DB::table('pa_imported_sources')->insertGetId([...$scope,'unit_id'=>$scope['unit_id']+100,'payload'=>$payload,'receipt_hash'=>hash('sha256',$payload)]);if($service->listing($u,['q'=>'INVISIBLE-SAME-COMPANY'])['pagination']['documents']['total']!==0)throw new RuntimeException('Unit leak');try{$service->document($u,$foreign);throw new RuntimeException('Other-unit document accepted');}catch(Symfony\Component\HttpKernel\Exception\HttpExceptionInterface $e){if($e->getStatusCode()!==403)throw $e;} + file_put_contents($s['root'].'/page-filter-positive.json',json_encode(['passed'=>true,'positive_unrecognised_document_visible'=>true,'recognised_filter_excludes_it'=>true,'other_unit_same_company_excluded'=>true,'no_other_evidence_returned'=>true,'test_rows_rolled_back'=>true],JSON_PRETTY_PRINT)); + }finally{while(DB::transactionLevel()>0)DB::rollBack();}echo "Positive recognition filters and same-company other-unit isolation verified.\n";exit; +} +if($phase==='page-concurrent-read'){ + $id=$service->listing($u)['documents'][0]['local_id'];if($id===$f['source_id'])throw new LogicException('Use a clone');$input=$s['root'].'/page-read-worker.json';file_put_contents($input,'{}');$process=null;DB::beginTransaction(); + try{ + DB::table('companies')->where('id',$scope['company_id'])->where('tenant_id',$scope['tenant_id'])->lockForUpdate()->firstOrFail();$row=DB::table('pa_source_histories')->where($scope)->where('local_source_id',$id)->first();$payload=json_decode($row->payload,true);$payload['receipt_version']=2;DB::table('pa_source_histories')->insert($scope+['local_source_id'=>$id,'version'=>2,'payload'=>Payables::canonical($payload),'receipt_hash'=>str_repeat('0',64),'created_at'=>now()]); + $pipes=[];$process=proc_open([PHP_BINARY,__DIR__.'/payable-history-sgf-proof.php',$file,'page-read-worker',$input],[0=>['pipe','r'],1=>['file',$s['root'].'/page-read-worker-stdout.txt','w'],2=>['file',$s['root'].'/page-read-worker-stderr.txt','w']],$pipes,dirname(__DIR__));if(!is_resource($process))throw new RuntimeException('Worker failed');fclose($pipes[0]);$deadline=microtime(true)+8;do{$status=proc_get_status($process);if(!$status['running'])break;usleep(25000);}while(microtime(true)<$deadline);if($status['running'])throw new RuntimeException('Read waited for writer company lock');$exit=proc_close($process);$process=null;if($exit===-1)$exit=$status['exitcode'];if($exit!==0)throw new RuntimeException('Read worker failed');$result=json_decode(file_get_contents($input.'.result'),true);if($result['documents']!==25||count(array_unique($result['balances']))!==1||$result['balances'][0]!==3000||DB::transactionLevel()!==1)throw new RuntimeException('Read did not preserve committed snapshot'); + file_put_contents($s['root'].'/page-concurrent-read.json',json_encode(['passed'=>true,'reader_completed_before_writer_release'=>true,'uncommitted_receipt_not_observed'=>true,'documents'=>25,'balance_minor'=>3000,'reader_time_ms'=>$result['time_ms'],'not_throughput_capacity'=>true],JSON_PRETTY_PRINT)); + }finally{if(is_resource($process)){proc_terminate($process);proc_close($process);}while(DB::transactionLevel()>0)DB::rollBack();}echo "Page completed while writer held company lock; only committed receipt observed.\n";exit; +} +if($phase==='page-fresh-command'){ + DB::beginTransaction();try{ + $data=$service->listing($u);$id=$data['documents'][0]['local_id'];if($id===$f['source_id'])throw new LogicException('Use a benchmark clone, never the original workflow source');$row=DB::table('pa_imported_sources')->where($scope)->where('id',$id)->first();$doc=json_decode($row->payload,true,64,JSON_THROW_ON_ERROR);$doc['number']='CHANGED-AFTER-PAGE';DB::table('pa_imported_sources')->where('id',$id)->update(['payload'=>Payables::canonical($doc),'receipt_hash'=>hash('sha256',Payables::canonical($doc))]);DB::table('pa_access')->insert($scope+['user_id'=>$u->id,'action'=>'prepare','person'=>'sgf-history-person-'.$u->id]); + try{$service->engine($u)->command('prepare_history',$id,'Synthetic conference after a read snapshot.',(string)Str::uuid());throw new RuntimeException('A read snapshot leaked into a command');}catch(DomainException $e){if(!str_contains($e->getMessage(),'Recibo histórico antigo'))throw $e;} + file_put_contents($s['root'].'/page-fresh-command.json',json_encode(['passed'=>true,'read_cache_not_used_by_command'=>true,'current_document_and_history_anchor_revalidated'=>true,'test_changes_rolled_back'=>true],JSON_PRETTY_PRINT)); + }finally{while(DB::transactionLevel()>0)DB::rollBack();}echo "Current source revalidated by command after a read page; no snapshot reuse.\n";exit; +} +DB::beginTransaction();DB::statement('SET TRANSACTION READ ONLY'); +try{ + $native=json_decode(file_get_contents($s['root'].'/source.json'),true,64,JSON_THROW_ON_ERROR)['source'];unset($native['local_id']);$original=DB::table('pa_imported_sources')->where($scope)->where('id',$f['source_id'])->first();if(Payables::canonical($native)!==Payables::canonical(json_decode($original->payload,true)))throw new LogicException('Original native receipt changed'); + $counts=[];foreach(['pa_imported_sources','pa_sources','pa_proposals','pa_obligations','pa_history_imports'] as $table)$counts[$table]=DB::table($table)->where($scope)->count();$n=$counts['pa_imported_sources'];if(!in_array($n,[1000,5000,10000],true)||count(array_unique($counts))!==1||DB::table('pa_imported_payments')->where($scope)->count()!==3*$n||DB::getSchemaBuilder()->hasTable('pa_payment_decisions')||DB::getSchemaBuilder()->hasTable('ps_allocations'))throw new LogicException('Unexpected final synthetic ledger state'); + if(DB::table('pa_access')->where($scope)->count()!==5)throw new LogicException('Temporary QA action was not restored'); + $hash=hash_init('sha256');foreach(['pa_imported_sources','pa_source_histories','pa_sources','pa_proposals','pa_obligations','pa_history_imports','pa_imported_payments','pa_events','pa_commands','pa_access'] as $table){hash_update($hash,$table."\n");foreach(DB::table($table)->where($scope)->orderBy('id')->cursor() as $row)hash_update($hash,Payables::canonical((array)$row)."\n");} + $report=['read_only'=>true,'original_workflow_receipt_unchanged'=>true,'counts'=>$counts,'imported_payments'=>3*$n,'temporary_decision_and_allocation_tables_absent'=>true,'scoped_business_fingerprint'=>hash_final($hash),'benchmark_clones'=>$n-1,'native_workflow_sources'=>1,'no_operational_installation'=>true]; + $output=$s['root'].'/page-post.json';if(is_file($output))copy($output,$output.'.'.hash_file('sha256',$output).'.archive');file_put_contents($output,json_encode($report,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo json_encode($report)."\n"; +}finally{DB::rollBack();} diff --git a/scripts/payable-page-http.mjs b/scripts/payable-page-http.mjs index 6e06059..8c3c607 100644 --- a/scripts/payable-page-http.mjs +++ b/scripts/payable-page-http.mjs @@ -3,6 +3,7 @@ import path from 'node:path'; import net from 'node:net'; import {spawn} from 'node:child_process'; import assert from 'node:assert/strict'; +import crypto from 'node:crypto'; const state=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json','utf8')),tag=process.argv[2]; if(state.port!==55439||!/^[a-f0-9]{12}$/.test(tag||''))throw Error('Owned QA tag required'); const root=path.join(state.root,'private/payable-history-'+tag),settings=path.join(root,'settings.json'),config=JSON.parse(fs.readFileSync(settings,'utf8')); @@ -22,7 +23,7 @@ try { for(const query of ['page=0','per_page=1000','event_page=0','recognition=paid','company_id=999','q%5Ba%5D=x'])check((await reader.request('/api/supplier-payables?'+query)).status===422,'Unsupported/invalid filters refused'); check((await reader.request('/api/supplier-payables',{headers:{'X-SGF-Context':'obsolete'}})).status===409,'Stale context refused on reads'); check((await reader.request('/api/supplier-payables/prepare_history',{body:{id:a.documents[0].local_id,reason:'Reader must not acquire write rights from a page.'}})).status===403,'Read page grants no write access'); - const html=await reader.request('/supplier-payables?q=BENCH&recognition=recognised&per_page=25');check(html.status===200&&html.text.includes('Filtrar documentos')&&html.text.includes('Paginação documents')&&html.text.includes('Paginação events'),'Existing HTML has server filters and pagers');check(html.text.includes('q=BENCH&recognition=recognised'),'Pager preserves search/recognition'); + const html=await reader.request('/supplier-payables?q=BENCH&recognition=recognised&per_page=25');check(html.status===200&&html.text.includes('Filtrar documentos')&&html.text.includes('Paginação documentos')&&html.text.includes('Paginação histórico'),'Existing HTML has server filters and pagers');check(html.text.includes('q=BENCH&recognition=recognised'),'Pager preserves search/recognition'); const injection=await reader.request('/supplier-payables?q='+encodeURIComponent(''));check(injection.status===200&&!injection.text.includes('')&&injection.text.includes('<script>page_injection</script>'),'Search text escaped in HTML'); check(first.headers.get('cache-control').includes('no-store'),'Private response'); const report={kind:'financial_pagination_actual_http',checks,passed:true,volume,default_page:25,larger_page:100,filter_before_count:true,source_and_evidence_pages_disjoint:true,context_and_rights_enforced:true,unknown_parameters_refused:true,html_escaping:true,visual_review:false,browser_interactions_tested:false};fs.writeFileSync(path.join(root,'page-http.json'),JSON.stringify(report,null,2)+'\n');console.log(JSON.stringify(report)); diff --git a/scripts/payable-report-capture-cases.php b/scripts/payable-report-capture-cases.php new file mode 100644 index 0000000..476e02e --- /dev/null +++ b/scripts/payable-report-capture-cases.php @@ -0,0 +1,13 @@ +document($u,$f['source_id']);$payments=$provider->payments($u,$f['source_id']);$capture=HistoricalCapture::fromPayments($scope,$source,$payments);$raw=HistoricalPayments::capture($source,$payments);$checks=0;$cases=[];$ok=function($v,$m)use(&$checks){$checks++;if(!$v)throw new LogicException($m);};$refuse=function($fn)use($ok){$caught=false;try{$fn();}catch(DomainException|Symfony\Component\HttpKernel\Exception\HttpException $e){$caught=true;}$ok($caught,'Expected capture/scope/permission refusal');}; +$case=function($name,$fn)use(&$checks,&$cases){$at=$checks;DB::beginTransaction();DB::statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ');try{$fn();$cases[]=['name'=>$name,'checks'=>$checks-$at,'passed'=>true];}finally{while(DB::transactionLevel())DB::rollBack();}}; +$case('capture-bound-to-entire-source-and-context',function()use($scope,$source,$capture,$raw,$ok,$refuse){$ok($capture->forSource($scope,$source)===$raw,'Same validated capture');$decorated=$source+['revision'=>Payables::revision($source),'missing'=>Payables::missing($source)];$ok($capture->forSource($scope,$decorated)===$raw,'Only exact calculated presentation fields accepted');foreach(['tenant_id','company_id','unit_id'] as $key){$other=$scope;$other[$key]++;$refuse(fn()=>$capture->forSource($other,$source));}foreach(['local_id','payment_count','total_minor','number'] as $key){$other=$source;$other[$key]=is_int($other[$key])?$other[$key]+1:$other[$key].'-changed';$refuse(fn()=>$capture->forSource($scope,$other));}$decorated['revision']='bad';$refuse(fn()=>$capture->forSource($scope,$decorated));$v=$capture->forSource($scope,$source);$v['confirmed_minor']=0;$ok($capture->forSource($scope,$source)===$raw,'Changing returned array never mutates validated value');}); +$case('genuine-source-metadata-never-ignored',function()use($scope,$source,$payments,$refuse){$original=$source+['revision'=>'ORIGINAL-EXTERNAL-METADATA','missing'=>['original documentary note']];$value=HistoricalCapture::fromPayments($scope,$original,$payments);$changed=$original;$changed['revision']='CHANGED-EXTERNAL-METADATA';$refuse(fn()=>$value->forSource($scope,$changed));$changed=$original;$changed['missing']=[];$refuse(fn()=>$value->forSource($scope,$changed));}); +$case('read-only-capability-never-feeds-commands',function()use($scope,$source,$capture,$raw,$u,$refuse,$ok){$engine=new Payables(DB::connection(),$u->id,'qa-profile',$scope,static fn()=>null,fn()=>$source,fn()=>$capture,static fn()=>null);$method=new ReflectionMethod($engine,'history');$refuse(fn()=>$method->invoke($engine,$source,false));$ok($method->invoke($engine,$source,true)===$raw,'Bound capture accepted only for batched read path');}); +$case('raw-and-captured-report-results-identical',function()use($service,$provider,$u,$source,$f,$ok,$s){require $s['root'].'/baseline.php';$baseline=app(App\Modules\Purchasing\ProfileBaselineSupplierPayables::class);$old=$baseline->report($u,['source'=>$f['source_id']]);$new=$service->report($u,['source'=>$f['source_id']]);foreach(['totals','known_positions','positions_sha256','windows'] as $key)$ok($old[$key]===$new[$key],'Report equality: '.$key);$a=$provider->page($u,[$source['local_id']=>$source]);$b=$provider->page($u,[$source['local_id']=>$source],true);$ok(is_array($a[$source['local_id']])&&$b[$source['local_id']] instanceof HistoricalCapture,'Old array contract preserved; new capability explicit');}); +$case('bad-receipt-never-becomes-known-zero',function()use($scope,$service,$u,$f,$ok){$row=(array)DB::table('pa_source_histories')->where($scope)->where('local_source_id',$f['source_id'])->orderByDesc('version')->first();unset($row['id']);$row['version']++;$row['receipt_hash']=str_repeat('0',64);DB::table('pa_source_histories')->insert($row);$r=$service->report($u,['source'=>$f['source_id']]);$ok($r['totals']['unknown_balance_count']===1&&$r['totals']['balance_minor']===null&&$r['known_positions']['count']===0,'Invalid checksum remains indeterminate');}); +$case('revoked-permission-and-foreign-source-denied',function()use($service,$scope,$f,$u,$refuse){DB::table('permission_grants')->where($scope)->where('user_id',$u->id)->where('permission','supplier_payables.view')->delete();$refuse(fn()=>$service->report($u,['source'=>$f['source_id']]));}); +file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'cases'=>$cases,'rollback_only'=>true,'commands_use_live_history'=>true,'raw_array_contract_preserved'=>true,'source_binding_includes_genuine_metadata'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo 'Historical capture regression: '.count($cases)." cases/$checks checks.\n"; diff --git a/scripts/payable-report-capture-http.mjs b/scripts/payable-report-capture-http.mjs new file mode 100644 index 0000000..4a9d520 --- /dev/null +++ b/scripts/payable-report-capture-http.mjs @@ -0,0 +1,33 @@ +import fs from 'node:fs';import path from 'node:path';import net from 'node:net';import {spawn} from 'node:child_process';import assert from 'node:assert/strict'; +const read=p=>JSON.parse(fs.readFileSync(p,'utf8')); +const state=read('C:/laragon/data/sgf-tempo/run/modular-regression-current.json'),tag=process.argv[2]; +if(state.port!==55439||!/^[a-f0-9]{12}$/.test(tag??''))throw Error('Owned QA tag required'); +const root=path.join(state.root,'private/report-profile-'+tag),settings=path.join(root,'settings.json'),owned=read(settings),g=read(path.join(root,'fixture.json')); +if(owned.tag!==tag||owned.cluster!=='sgf_modular_regression_'+state.id)throw Error('Owned cluster mismatch'); +const output=path.join(root,'profile-http.json');if(fs.existsSync(output))throw Error('Completed report HTTP proof preserved'); +await new Promise((resolve,reject)=>{const p=net.createServer();p.once('error',()=>reject(Error('Proof port unavailable')));p.listen(8047,'127.0.0.1',()=>p.close(resolve));}); +const log=fs.openSync(path.join(root,'report-http-server.log'),'a'),server=spawn('C:/laragon/tools/sgf-tempo/php-8.4.27/php.exe',['-S','127.0.0.1:8047',path.resolve('scripts/payable-report-http-router.php')],{cwd:process.cwd(),env:{...process.env,SETTLEMENT_PAGE_QA_SETTINGS:settings},windowsHide:true,stdio:['ignore',log,log]}); +let checks=0,auth;const jar=new Map(),check=(ok,why)=>{checks++;assert(ok,why);}; +async function request(url,extra={}){ + const r=await fetch('http://127.0.0.1:8047'+url,{headers:{Accept:'application/json',Cookie:[...jar].map(([k,v])=>k+'='+v).join('; '),'X-SGF-Context':auth?.context??'',...extra},redirect:'manual',signal:AbortSignal.timeout(30000)}); + for(const c of r.headers.getSetCookie()){const p=c.split(';')[0],at=p.indexOf('=');jar.set(p.slice(0,at),p.slice(at+1));}const text=await r.text();let data;try{data=JSON.parse(text);}catch{}return{status:r.status,data,text,headers:r.headers}; +} +try{ + let ready=false;for(let n=0;n<50&&!ready;n++){try{if((await request('/api/supplier-payables/report')).status===401)ready=true;}catch{}if(!ready)await new Promise(r=>setTimeout(r,100));} + check(ready,'Unauthenticated report refused');const entry=await request('/qa/report-enter');check(entry.status===200,'Owned QA entry');auth=entry.data; + const all=await request('/api/supplier-payables/report',{'X-QA-Report-Proof':'capture'}); + check(all.status===200&&all.data.totals.count===10000&&all.data.totals.balance_minor===30000000,'Complete report reconciles obligation and allocation books'); + const mode=read(path.join(root,'report-http-mode.json'));check(mode.transaction.isolation==='repeatable read'&&mode.transaction.read_only==='on'&&mode.writer_locks===0,'Whole report uses read-only snapshot'); + const source=g.source_id,one=await request('/api/supplier-payables/report?source='+source); + check(one.status===200&&one.data.totals.count===1&&one.data.totals.balance_minor===3000,'Source focus retains net allocations and reversal'); + const html=await request('/supplier-payables/report?source='+source); + check(html.status===200&&html.text.includes('Obrigações reconhecidas — posição actual')&&html.text.includes('30,00 MZN'),'Report view displays financial position'); + check(html.text.includes('/supplier-payables?')&&html.text.includes('source='+source),'Report links back to evidence'); + const list=await request('/supplier-payables?source='+source);check(list.status===200&&list.text.includes('/supplier-payables/report?'),'Existing workspace links to report'); + for(const query of ['page=2','company_id=999','cutoff=2026-01-01','source=0','source%5Bx%5D=1'])check((await request('/api/supplier-payables/report?'+query)).status===422,'Unsupported or injected report criteria refused'); + check((await request('/api/supplier-payables/report?source=9223372036854775807')).status===403,'Unavailable source refused'); + check((await request('/api/supplier-payables/report',{'X-SGF-Context':'obsolete'})).status===409,'Current context required'); + const xss=await request('/supplier-payables/report?q='+encodeURIComponent(''));check(xss.status===200&&!xss.text.includes('')&&xss.text.includes('<script>report_xss</script>'),'Criteria escaped in HTML'); + check(all.headers.get('cache-control').includes('no-store'),'Private report'); + const result={passed:true,checks,real_http_kernel:true,transaction:mode,visual_review:false,no_browser:true};fs.writeFileSync(output,JSON.stringify(result,null,2)+'\n');console.log(JSON.stringify(result)); +}finally{if(server.exitCode===null){server.kill();await new Promise(resolve=>server.once('exit',resolve));}fs.closeSync(log);} diff --git a/scripts/payable-report-http-router.php b/scripts/payable-report-http-router.php new file mode 100644 index 0000000..36a8dbe --- /dev/null +++ b/scripts/payable-report-http-router.php @@ -0,0 +1,3 @@ +JSON.parse(fs.readFileSync(p,'utf8')); +const state=read('C:/laragon/data/sgf-tempo/run/modular-regression-current.json'),tag=process.argv[2]; +if(state.port!==55439||!/^[a-f0-9]{12}$/.test(tag??''))throw Error('Owned QA tag required'); +const root=path.join(state.root,'private/settlement-page-'+tag),settings=path.join(root,'settings.json'),owned=read(settings),g=read(path.join(root,'settlement-fixture.json')); +if(owned.tag!==tag||owned.cluster!=='sgf_modular_regression_'+state.id)throw Error('Owned cluster mismatch'); +const output=path.join(root,'report-http.json');if(fs.existsSync(output))throw Error('Completed report HTTP proof preserved'); +await new Promise((resolve,reject)=>{const p=net.createServer();p.once('error',()=>reject(Error('Proof port unavailable')));p.listen(8047,'127.0.0.1',()=>p.close(resolve));}); +const log=fs.openSync(path.join(root,'report-http-server.log'),'a'),server=spawn('C:/laragon/tools/sgf-tempo/php-8.4.27/php.exe',['-S','127.0.0.1:8047',path.resolve('scripts/payable-report-http-router.php')],{cwd:process.cwd(),env:{...process.env,SETTLEMENT_PAGE_QA_SETTINGS:settings},windowsHide:true,stdio:['ignore',log,log]}); +let checks=0,auth;const jar=new Map(),check=(ok,why)=>{checks++;assert(ok,why);}; +async function request(url,extra={}){ + const r=await fetch('http://127.0.0.1:8047'+url,{headers:{Accept:'application/json',Cookie:[...jar].map(([k,v])=>k+'='+v).join('; '),'X-SGF-Context':auth?.context??'',...extra},redirect:'manual',signal:AbortSignal.timeout(10000)}); + for(const c of r.headers.getSetCookie()){const p=c.split(';')[0],at=p.indexOf('=');jar.set(p.slice(0,at),p.slice(at+1));}const text=await r.text();let data;try{data=JSON.parse(text);}catch{}return{status:r.status,data,text,headers:r.headers}; +} +try{ + let ready=false;for(let n=0;n<50&&!ready;n++){try{if((await request('/api/supplier-payables/report')).status===401)ready=true;}catch{}if(!ready)await new Promise(r=>setTimeout(r,100));} + check(ready,'Unauthenticated report refused');const entry=await request('/qa/report-enter');check(entry.status===200,'Owned QA entry');auth=entry.data; + const all=await request('/api/supplier-payables/report',{'X-QA-Report-Proof':'capture'}); + check(all.status===200&&all.data.totals.count===61&&all.data.totals.balance_minor===365608,'Complete report reconciles obligation and allocation books'); + const mode=read(path.join(root,'report-http-mode.json'));check(mode.transaction.isolation==='repeatable read'&&mode.transaction.read_only==='on'&&mode.writer_locks===0,'Whole report uses read-only snapshot'); + const source=g.source_ids[0],one=await request('/api/supplier-payables/report?source='+source); + check(one.status===200&&one.data.totals.count===1&&one.data.totals.balance_minor===5667,'Source focus retains net allocations and reversal'); + const html=await request('/supplier-payables/report?source='+source); + check(html.status===200&&html.text.includes('Obrigações reconhecidas — posição actual')&&html.text.includes('56,67 MZN'),'Report view displays financial position'); + check(html.text.includes('/supplier-payables?')&&html.text.includes('source='+source),'Report links back to evidence'); + const list=await request('/supplier-payables?source='+source);check(list.status===200&&list.text.includes('/supplier-payables/report?'),'Existing workspace links to report'); + for(const query of ['page=2','company_id=999','cutoff=2026-01-01','source=0','source%5Bx%5D=1'])check((await request('/api/supplier-payables/report?'+query)).status===422,'Unsupported or injected report criteria refused'); + check((await request('/api/supplier-payables/report?source=9223372036854775807')).status===403,'Unavailable source refused'); + check((await request('/api/supplier-payables/report',{'X-SGF-Context':'obsolete'})).status===409,'Current context required'); + const xss=await request('/supplier-payables/report?q='+encodeURIComponent(''));check(xss.status===200&&!xss.text.includes('')&&xss.text.includes('<script>report_xss</script>'),'Criteria escaped in HTML'); + check(all.headers.get('cache-control').includes('no-store'),'Private report'); + const result={passed:true,checks,real_http_kernel:true,transaction:mode,visual_review:false,no_browser:true};fs.writeFileSync(output,JSON.stringify(result,null,2)+'\n');console.log(JSON.stringify(result)); +}finally{if(server.exitCode===null){server.kill();await new Promise(resolve=>server.once('exit',resolve));}fs.closeSync(log);} diff --git a/scripts/payable-report-profile-clone.mjs b/scripts/payable-report-profile-clone.mjs new file mode 100644 index 0000000..b6993b0 --- /dev/null +++ b/scripts/payable-report-profile-clone.mjs @@ -0,0 +1,8 @@ +import fs from 'node:fs';import path from 'node:path';import crypto from 'node:crypto';import {spawnSync} from 'node:child_process'; +const read=p=>JSON.parse(fs.readFileSync(p,'utf8')),state=read('C:/laragon/data/sgf-tempo/run/modular-regression-current.json');if(state.port!==55439)throw Error('Owned QA cluster required');const oldRoot=path.join(state.root,'private/payable-history-03e16d9fb37d'),old=read(path.join(oldRoot,'settings.json'));if(old.cluster!=='sgf_modular_regression_'+state.id)throw Error('Source cluster mismatch');const tag=crypto.randomBytes(6).toString('hex'),root=path.join(state.root,'private/report-profile-'+tag),role='payable_history_sgf_'+tag,database='payable_sgf_'+tag,password=crypto.randomBytes(32).toString('hex');fs.mkdirSync(root);const bin='C:/Program Files/PostgreSQL/17/bin/',admin=fs.readFileSync(path.join(state.root,'private/admin-password.txt'),'utf8').trim(); +const run=(exe,args,pass,input)=>{const r=spawnSync(bin+exe,args,{input,encoding:'utf8',windowsHide:true,env:{...process.env,PGPASSWORD:pass},maxBuffer:1024*1024});if(r.status!==0){fs.appendFileSync(path.join(root,'private-diagnostics.log'),r.stderr??'');throw Error('Isolated clone operation failed; diagnostics remain private');}return r.stdout.trim();};const base=['-h','127.0.0.1','-p','55439'];if(run('psql.exe',[...base,'-U','sgf_regression_owner','-d','postgres','-Atq'],admin,"SELECT current_setting('cluster_name')")!==old.cluster)throw Error('Effective QA cluster mismatch'); +run('pg_dump.exe',[...base,'-U',old.sgf.role,'-d',old.sgf.database,'--no-owner','--no-acl','-Fc','-f',path.join(root,'qa.dump')],old.sgf.password); +run('psql.exe',[...base,'-U','sgf_regression_owner','-d','postgres','-v','ON_ERROR_STOP=1','-q'],admin,`CREATE ROLE ${role} LOGIN PASSWORD '${password}' NOSUPERUSER NOCREATEDB NOCREATEROLE NOREPLICATION NOBYPASSRLS; CREATE DATABASE ${database} OWNER ${role}; REVOKE ALL ON DATABASE ${database} FROM PUBLIC;`); +run('pg_restore.exe',[...base,'-U',role,'-d',database,'--no-owner','--no-acl','--exit-on-error',path.join(root,'qa.dump')],password); +const storage=path.join(root,'storage');for(const d of ['framework/cache/data','framework/views','framework/sessions','logs','cache'])fs.mkdirSync(path.join(storage,d),{recursive:true});const settings={...old,tag,root,sgf:{...old.sgf,database,role,password,storage},profile_clone_of:'03e16d9fb37d'};fs.writeFileSync(path.join(root,'settings.json'),JSON.stringify(settings,null,2));for(const f of ['fixture.json','source.json'])fs.copyFileSync(path.join(oldRoot,f),path.join(root,f)); +let source=fs.readFileSync('app/Modules/Purchasing/SupplierPayables.php','utf8').replace('final class SupplierPayables','final class ProfileBaselineSupplierPayables');fs.writeFileSync(path.join(root,'baseline.php'),source);const archived=crypto.createHash('sha256').update(source).digest('hex');fs.writeFileSync(path.join(root,'clone.json'),JSON.stringify({passed:true,tag,source_tag:'03e16d9fb37d',original_database_not_modified:true,baseline_sha256:archived,new_owned_database:true,synthetic_only:true},null,2));console.log(JSON.stringify({tag,root,synthetic_clone_only:true})); diff --git a/scripts/payable-report-profile.php b/scripts/payable-report-profile.php new file mode 100644 index 0000000..bd13f3d --- /dev/null +++ b/scripts/payable-report-profile.php @@ -0,0 +1,34 @@ +true]);$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true,64,JSON_THROW_ON_ERROR);$u=App\Models\User::findOrFail($f['actors']['read']);auth()->setUser($u);app(CompanyContext::class)->selectFor($u->id,$f['scope']['tenant_id'],$f['scope']['company_id'],$f['scope']['unit_id']); +$mode=substr($phase,strlen('payable-report-profile-'));if(!in_array($mode,['before','after','plan','analyze','analyzed','final','cases','preservation','command-probe'],true))throw new LogicException('Unknown profile phase');$out=$s['root'].'/profile-'.$mode.'.json';if(file_exists($out))throw new LogicException('Completed measurement preserved'); +if($mode==='command-probe'){ + DB::beginTransaction();try{$actor=App\Models\User::findOrFail($f['actors']['prepare']);auth()->setUser($actor);app(CompanyContext::class)->selectFor($actor->id,$f['scope']['tenant_id'],$f['scope']['company_id'],$f['scope']['unit_id']);$engine=app(SupplierPayables::class)->engine($actor);$key=(string)Illuminate\Support\Str::uuid();$first=$engine->command('prepare_history',$f['source_id'],'Rollback-only live historical command compatibility after read optimisation.',$key);$second=$engine->command('prepare_history',$f['source_id'],'Rollback-only live historical command compatibility after read optimisation.',$key);if($first['state']!=='recognised'||!$second['replayed']||DB::table('pa_obligations')->count()!==10000)throw new LogicException('Live command compatibility changed');file_put_contents($out,json_encode(['passed'=>true,'live_history_command'=>true,'existing_recognition_preserved'=>true,'same_key_replayed'=>true,'rollback_only'=>true,'obligations'=>10000],JSON_PRETTY_PRINT));echo "Live history command and replay still recover the original recognition; probe rolled back.\n";}finally{while(DB::transactionLevel())DB::rollBack();}exit; +} +if($mode==='cases'){require __DIR__.'/payable-report-capture-cases.php';exit;} +if($mode==='preservation'){ + $prior=json_decode(file_get_contents('C:/laragon/data/sgf-tempo/run/modular-regression-2576427d1939/private/payable-history-03e16d9fb37d/page-post.json'),true);$hash=hash_init('sha256');foreach(['pa_imported_sources','pa_source_histories','pa_sources','pa_proposals','pa_obligations','pa_history_imports','pa_imported_payments','pa_events','pa_commands','pa_access'] as $table){hash_update($hash,$table."\n");foreach(DB::table($table)->where($f['scope'])->orderBy('id')->cursor() as $r)hash_update($hash,Tempo\Finance\Payables\Payables::canonical((array)$r)."\n");}$actual=hash_final($hash);if($actual!==$prior['scoped_business_fingerprint'])throw new LogicException('Original synthetic financial fingerprint changed');file_put_contents($out,json_encode(['passed'=>true,'clone_matches_valid_original_business_fingerprint'=>true,'fingerprint'=>$actual,'data_writes'=>0,'new_indexes'=>0],JSON_PRETTY_PRINT));echo "Synthetic clone still matches the original valid business fingerprint.\n";exit; +} +if($mode==='analyze'){if(($s['profile_clone_of']??null)!=='03e16d9fb37d')throw new LogicException('Only newly cloned synthetic database may receive statistics maintenance');DB::statement('ANALYZE');file_put_contents($out,json_encode(['passed'=>true,'only_new_synthetic_clone'=>true,'new_indexes'=>false,'source_data_modified'=>false],JSON_PRETTY_PRINT));echo "Statistics updated only in new synthetic clone; no indexes or destination changes.\n";exit;} +if($mode==='plan'){ + $sql="SELECT r.* FROM pa_imported_sources r WHERE r.tenant_id=? AND r.company_id=? AND r.unit_id=? AND EXISTS(SELECT 1 FROM pa_sources s JOIN pa_obligations o ON o.source_id=s.id WHERE s.local_source_id=r.id AND s.tenant_id=r.tenant_id AND s.company_id=r.company_id AND s.unit_id=r.unit_id AND o.tenant_id=r.tenant_id AND o.company_id=r.company_id AND o.unit_id=r.unit_id) ORDER BY r.id DESC LIMIT 100"; + DB::beginTransaction();try{DB::statement('SET TRANSACTION READ ONLY');$plan=DB::select('EXPLAIN (ANALYZE,BUFFERS,FORMAT JSON) '.$sql,array_values($f['scope']));file_put_contents($out,json_encode(['passed'=>true,'plan'=>$plan,'read_only'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));}finally{DB::rollBack();}exit; +} +$source=$mode==='before'?file_get_contents($s['root'].'/baseline.php'):str_replace('final class SupplierPayables','final class ProfileBaselineSupplierPayables',file_get_contents(__DIR__.'/../app/Modules/Purchasing/SupplierPayables.php')); +$source=str_replace("\r\n","\n",$source);$source=str_replace('final class ProfileBaselineSupplierPayables'."\n".'{','final class ProfileBaselineSupplierPayables'."\n".'{ public static array $profile=[];',$source); +// Instrument an archived private class only; never expose a profiling switch in HTTP. +foreach([ + 'selection'=>[' $window = clone $query;',' $documents = [];'], + 'decode'=>[' $documents = [];',' $histories = $historical'], + 'history'=>[' $histories = $historical',' $engine = new Payables'], + 'positions'=>[' $engine = new Payables',' foreach ($data[\'documents\'] as $doc)'], + 'hash_totals'=>[' foreach ($data[\'documents\'] as $doc)',' $windows++;'] +] as $name=>[$start,$end]){ + $a=strpos($source,$start,strpos($source,'public function report('));$b=strpos($source,$end,$a+strlen($start));if($a===false||$b===false)throw new LogicException('Profiler anchor missing '.$name); + $source=substr($source,0,$b).'self::$profile['.var_export($name,true).']=(self::$profile['.var_export($name,true).']??0)+(hrtime(true)-$profileTimer)/1e6;'."\n".substr($source,$b);$source=substr($source,0,$a).'$profileTimer=hrtime(true);'."\n".substr($source,$a); +} +$classFile=$s['root'].'/profiled-'.$mode.'.php';file_put_contents($classFile,$source);require $classFile;$queries=[];$locks=0;DB::listen(function($event)use(&$queries,&$locks){$key=$event->sql;$queries[$key]??=['queries'=>0,'sql_ms'=>0,'sql'=>$key];$queries[$key]['queries']++;$queries[$key]['sql_ms']+=$event->time;if(str_contains(strtolower($key),'for update'))$locks++;});gc_collect_cycles();memory_reset_peak_usage();$at=hrtime(true);$r=app(App\Modules\Purchasing\ProfileBaselineSupplierPayables::class)->report($u);$ms=(hrtime(true)-$at)/1e6;$peak=memory_get_peak_usage(true);$groups=array_values($queries);usort($groups,fn($a,$b)=>$b['sql_ms']<=>$a['sql_ms']);if($r['totals']['count']!==10000||$r['totals']['balance_minor']!==30000000||$locks)throw new LogicException('Profile universe/balance/locks differs'); +if(in_array($mode,['after','final'],true)){$before=json_decode(file_get_contents($s['root'].'/profile-before.json'),true);foreach(['totals','known_positions','positions_sha256','windows'] as $key)if($before['report'][$key]!==$r[$key])throw new LogicException('Report changed after optimisation');} +file_put_contents($out,json_encode(['passed'=>true,'mode'=>$mode,'time_ms'=>$ms,'queries'=>array_sum(array_column($groups,'queries')),'sql_ms'=>array_sum(array_column($groups,'sql_ms')),'heap_peak_bytes'=>$peak,'stages_ms'=>App\Modules\Purchasing\ProfileBaselineSupplierPayables::$profile,'query_groups'=>$groups,'report'=>$r,'writer_locks'=>$locks,'private_synthetic_clone_only'=>true,'not_deployment_capacity'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo json_encode(['mode'=>$mode,'time_ms'=>$ms,'queries'=>array_sum(array_column($groups,'queries')),'stages_ms'=>App\Modules\Purchasing\ProfileBaselineSupplierPayables::$profile])."\n"; diff --git a/scripts/payable-report-proof.php b/scripts/payable-report-proof.php new file mode 100644 index 0000000..154984b --- /dev/null +++ b/scripts/payable-report-proof.php @@ -0,0 +1,88 @@ +true]); +$u=User::findOrFail($f['actors']['read']);auth()->setUser($u);app(CompanyContext::class)->selectFor($u->id,$scope['tenant_id'],$scope['company_id'],$scope['unit_id']); +$service=app(SupplierPayables::class); +if($phase==='payable-report-http'){ + auth()->forgetGuards();app(CompanyContext::class)->clear(); + Illuminate\Support\Facades\Route::middleware('web')->get('/qa/report-enter',function(Illuminate\Http\Request $r)use($f){ + $u=User::findOrFail($f['actors']['read']);auth()->login($u);$r->session()->regenerate();$token=bin2hex(random_bytes(24)); + $r->session()->put('auth_version',$u->auth_version);$r->session()->put('company_context',$f['scope']+['token'=>$token,'module_id'=>'purchasing']);return response()->json(['context'=>$token])->header('Cache-Control','no-store'); + }); + $state=[];$locks=0;DB::listen(function($event)use(&$state,&$locks){if(str_contains(strtolower($event->sql),'for update'))$locks++;if(!$state&&str_contains($event->sql,'"pa_imported_sources"')){$pdo=$event->connection->getPdo();$state=['isolation'=>$pdo->query('SHOW transaction_isolation')->fetchColumn(),'read_only'=>$pdo->query('SHOW transaction_read_only')->fetchColumn()];}}); + $app->handleRequest(Illuminate\Http\Request::capture()); + if(($_SERVER['HTTP_X_QA_REPORT_PROOF']??'')==='capture')file_put_contents($s['root'].'/report-http-mode.json',json_encode(['transaction'=>$state,'writer_locks'=>$locks],JSON_PRETTY_PRINT));exit; +} +$fingerprint=function()use($scope):string{ + $tables=['pa_imported_sources','pa_source_histories','pa_sources','pa_proposals','pa_obligations','pa_history_imports','pa_imported_payments','pa_events','pa_commands','pa_access']; + $settlements=DB::getSchemaBuilder()->hasTable('ps_payments');if($settlements)$tables=[...$tables,...Tempo\Finance\Payables\SettlementSchema::TABLES,...Tempo\Finance\Payables\ReversalSchema::TABLES]; + $hash=hash_init('sha256');foreach($tables as $table){hash_update($hash,$table."\n");$q=DB::table($table);if(!$settlements)$q->where($scope);foreach($q->orderBy($table==='ps_outbox'?'event_id':'id')->cursor() as $r)hash_update($hash,Payables::canonical((array)$r)."\n");}return hash_final($hash); +}; +if($phase==='payable-report-settlements'){ + if(is_file($s['root'].'/report-settlements.json'))throw new LogicException('Completed settlement report proof preserved'); + $before=$fingerprint();$r=$service->report($u);$baseline=json_decode(file_get_contents($s['root'].'/settlement-volume.json'),true,64,JSON_THROW_ON_ERROR); + if($r['totals']['count']!==61||$r['totals']['principal_minor']!==366000||$r['known_positions']['net_allocated_minor']!==392||$r['known_positions']['historical_confirmed_minor']!==0||$r['totals']['balance_minor']!==365608||$fingerprint()!==$before||$before!==$baseline['baseline_fingerprint'])throw new LogicException('Settlement report is not reconciled with its original book'); + file_put_contents($s['root'].'/report-settlements.json',json_encode(['passed'=>true,'report'=>$r,'baseline_fingerprint_equal'=>true,'net_allocations_include_reversal'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo "Settlement report reconciles 61 obligations and 392 minor units of net allocations; all original financial rows preserved.\n";exit; +} +if($phase==='payable-report-post'){ + if(is_file($s['root'].'/report-post.json'))throw new LogicException('Completed report post proof preserved'); + DB::beginTransaction();DB::statement('SET TRANSACTION READ ONLY');try{ + $baseline=is_file($s['root'].'/settlement-volume.json')?json_decode(file_get_contents($s['root'].'/settlement-volume.json'),true)['baseline_fingerprint']:json_decode(file_get_contents($s['root'].'/page-post.json'),true)['scoped_business_fingerprint']; + if($fingerprint()!==$baseline)throw new LogicException('Report changed preserved financial rows'); + file_put_contents($s['root'].'/report-post.json',json_encode(['passed'=>true,'read_only'=>true,'business_fingerprint_equal'=>true,'business_fingerprint'=>$baseline],JSON_PRETTY_PRINT)); + }finally{DB::rollBack();}echo "Report post-check: original financial fingerprint unchanged.\n";exit; +} +if(in_array($phase,['payable-report-volume','payable-report-volume-batch'],true)){ + $output=$s['root'].($phase==='payable-report-volume'?'/report-volume.json':'/report-volume-batch.json'); + if(is_file($output))throw new LogicException('Completed report volume proof preserved'); + $queries=0;$locks=0;$mode=[];$capture=true;DB::listen(function($event)use(&$queries,&$locks,&$mode,&$capture){if(!$capture)return;$queries++;if(str_contains(strtolower($event->sql),'for update'))$locks++;if(!$mode&&str_contains($event->sql,'"pa_imported_sources"')){$pdo=$event->connection->getPdo();$mode=['isolation'=>$pdo->query('SHOW transaction_isolation')->fetchColumn(),'read_only'=>$pdo->query('SHOW transaction_read_only')->fetchColumn()];}}); + gc_collect_cycles();memory_reset_peak_usage();$memory=memory_get_usage(true);$start=hrtime(true);$report=$service->report($u);$ms=(hrtime(true)-$start)/1e6;$peak=memory_get_peak_usage(true);$capture=false; + $prior=json_decode(file_get_contents($s['root'].'/page-post.json'),true,64,JSON_THROW_ON_ERROR);$count=$prior['counts']['pa_obligations']; + if($count!==10000||$report['totals']['count']!==$count||$report['totals']['principal_minor']!==6000*$count||$report['totals']['balance_minor']!==3000*$count||$report['known_positions']['historical_confirmed_minor']!==3000*$count||$report['windows']!==100||$report['window_size']!==100||$locks!==0||$mode!==['isolation'=>'repeatable read','read_only'=>'on']||$fingerprint()!==$prior['scoped_business_fingerprint'])throw new LogicException('Report volume or original history differs'); + if($phase==='payable-report-volume-batch'){$old=json_decode(file_get_contents($s['root'].'/report-volume.json'),true,128,JSON_THROW_ON_ERROR);foreach(['totals','known_positions','positions_sha256','windows'] as $key)if($old['report'][$key]!==$report[$key])throw new LogicException('Optimised report differs from original complete report');} + file_put_contents($output,json_encode(['passed'=>true,'report'=>$report,'time_ms'=>round($ms,3),'queries'=>$queries,'heap_baseline_bytes'=>$memory,'heap_peak_bytes'=>$peak,'writer_lock_queries'=>$locks,'transaction'=>$mode,'prior_business_fingerprint_equal'=>true,'not_deployment_capacity'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); + echo json_encode(['passed'=>true,'positions'=>$count,'windows'=>100,'time_ms'=>round($ms,3),'queries'=>$queries,'heap_peak_bytes'=>$peak])."\n";exit; +} +if(in_array($phase,['payable-report-cases','payable-report-cases-batch'],true)){ + $output=$s['root'].($phase==='payable-report-cases'?'/report-cases.json':'/report-cases-batch.json'); + if(is_file($output))throw new LogicException('Completed report cases preserved'); + $before=$fingerprint();$checks=0;$cases=[]; + $assert=function(bool $ok,string $why)use(&$checks):void{$checks++;if(!$ok)throw new RuntimeException($why);}; + $case=function(string $name,callable $test)use(&$checks,&$cases):void{$n=$checks;DB::beginTransaction();DB::statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ');try{$test();$cases[]=['name'=>$name,'assertions'=>$checks-$n,'passed'=>true];}finally{while(DB::transactionLevel()>0)DB::rollBack();}echo 'Passed report case: '.$name."\n";}; + $case('filters-reproducible-positions-and-unknown-due-date',function()use($service,$u,$f,$assert):void{ + $a=$service->report($u,['source'=>$f['source_id']]);$b=$service->report($u,['source'=>(string)$f['source_id']]); + $assert($a['totals']['count']===1&&$a['totals']['balance_minor']===3000,'Original recognised position'); + $assert($a['positions_sha256']===$b['positions_sha256'],'Equivalent ID types produce same content fingerprint'); + $assert($a['totals']['unknown_due_count']===1,'Unknown due date preserved'); + foreach(['%','_','NO-SUCH-NUMBER'] as $q){$r=$service->report($u,['q'=>$q]);$assert($r['totals']['count']===0&&$r['totals']['principal_minor']===0&&$r['totals']['balance_minor']===0,'Empty supported filter is an explicit empty universe');} + }); + $case('mixed-divergent-history-never-becomes-a-global-zero',function()use($service,$u,$scope,$assert):void{ + $query=DB::table('pa_imported_sources')->where($scope)->whereRaw("payload->>'number' LIKE 'BENCH-0000%'"); + $count=(clone $query)->count();if($count<2||$count>20)throw new LogicException('Use a small retained benchmark subset'); + $row=$query->orderBy('id')->first();$doc=json_decode($row->payload,true,64,JSON_THROW_ON_ERROR);$doc['supplier_name']='QA_CHANGED_AFTER_HISTORY';$payload=Payables::canonical($doc); + DB::table('pa_imported_sources')->where('id',$row->id)->update(['payload'=>$payload,'receipt_hash'=>hash('sha256',$payload)]); + $r=$service->report($u,['q'=>'BENCH-0000']); + $assert($r['totals']['count']===$count&&$r['totals']['principal_minor']===6000*$count,'Original principal stays recognised'); + $assert($r['totals']['unknown_balance_count']===1&&$r['totals']['balance_minor']===null,'Global balance indeterminate'); + $assert($r['known_positions']['count']===$count-1&&$r['known_positions']['balance_minor']===3000*($count-1),'Known component is explicitly partial'); + $html=view('purchasing.payable-report',['report'=>$r])->render();$assert(str_contains($html,'saldo global permanece indeterminado')&&str_contains($html,'Saldo conhecido — parcial'),'Partial warning rendered'); + DB::table('pa_imported_sources')->where('id',$row->id)->update(['receipt_hash'=>str_repeat('0',64)]); + $blocked=false;try{$service->report($u,['source'=>(int)$row->id]);}catch(Symfony\Component\HttpKernel\Exception\HttpExceptionInterface $e){$blocked=$e->getStatusCode()===409;}$assert($blocked,'Invalid raw receipt integrity stops the report'); + }); + $case('isolation-and-fresh-authority',function()use($service,$u,$scope,$f,$assert):void{ + $row=(array)DB::table('pa_imported_sources')->where('id',$f['source_id'])->first();unset($row['id']); + foreach(['tenant_id','company_id','unit_id'] as $key){$id=DB::table('pa_imported_sources')->insertGetId(array_replace($row,[$key=>$scope[$key]+10000]));$status=null;try{$service->report($u,['source'=>$id]);}catch(Symfony\Component\HttpKernel\Exception\HttpExceptionInterface $e){$status=$e->getStatusCode();}$assert($status===403,'Foreign source scope refused: '.$key);} + DB::table('pa_access')->where($scope)->where(['user_id'=>$u->id,'action'=>'view'])->delete(); + $denied=false;try{$service->report($u,['source'=>$f['source_id']]);}catch(Symfony\Component\HttpKernel\Exception\HttpExceptionInterface $e){$denied=$e->getStatusCode()===403;}$assert($denied,'Report retains explicit financial view authority'); + }); + DB::beginTransaction();try{$blocked=false;try{$service->report($u);}catch(Symfony\Component\HttpKernel\Exception\HttpExceptionInterface $e){$blocked=$e->getStatusCode()===409;}$assert($blocked,'Incoherent nested transaction refused');}finally{DB::rollBack();} + $assert($before===$fingerprint(),'Test frames changed original financial rows'); + file_put_contents($output,json_encode(['passed'=>true,'cases'=>$cases,'assertions'=>$checks,'business_fingerprint_equal'=>true,'test_writes_rolled_back'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo json_encode(['cases'=>count($cases),'assertions'=>$checks,'passed'=>true])."\n";exit; +} +throw new LogicException('Unknown report QA phase'); diff --git a/scripts/purchasing-complete-flow.mjs b/scripts/purchasing-complete-flow.mjs new file mode 100644 index 0000000..63793b6 --- /dev/null +++ b/scripts/purchasing-complete-flow.mjs @@ -0,0 +1,53 @@ +import fs from 'node:fs';import path from 'node:path';import assert from 'node:assert/strict';import {spawnSync} from 'node:child_process'; +import {Element,walk,parsePage,installDom,byName,setLabel} from './purchasing-workspace-dom.mjs'; +const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),root=path.join(run.root,'private/receipt-composition-cc50a276c10c'),s=JSON.parse(fs.readFileSync(path.join(root,'state.json'))),native=JSON.parse(fs.readFileSync(path.join(root,'native-fixture.json'))),base='http://127.0.0.1:8085'; +assert(s.singleInstallation&&s.tag==='cc50a276c10c'&&s.env.DB_PORT==='55439');const progress=path.join(root,'completion-flow-progress.json'),out=path.join(root,'completion-flow-result.json');assert(!fs.existsSync(out)); +const state=fs.existsSync(progress)?JSON.parse(fs.readFileSync(progress)):{steps:{},checks:[]},save=()=>fs.writeFileSync(progress,JSON.stringify(state,null,2));const ok=(v,name)=>{assert(v,name);if(!state.checks.includes(name))state.checks.push(name);save();}; +const backup=path.join(root,'completion-backup');if(!fs.existsSync(backup)){fs.mkdirSync(backup);for(const [name,c]of [['host',{...s.env,database:s.env.DB_DATABASE,username:s.env.DB_USERNAME,password:s.env.DB_PASSWORD}],['native',s.nativeConnection]]){const r=spawnSync('C:/Program Files/PostgreSQL/17/bin/pg_dump.exe',['-h','127.0.0.1','-p','55439','-U',c.username,'-d',c.database,'-Fc','--no-owner','--no-acl','-f',path.join(backup,name+'.dump')],{env:{...process.env,PGPASSWORD:c.password},windowsHide:true,encoding:'utf8'});if(r.status!==0)throw Error('Private pre-flow backup failed');}} +const originalFetch=globalThis.fetch,cookies=new Map,calls=[];let pending=0,document,epoch=0,loseReceipt=false; +async function raw(url,options={}){const headers=new Headers(options.headers);headers.set('Cookie',[...cookies].map(([k,v])=>k+'='+v).join('; '));const r=await originalFetch(base+url,{...options,headers,redirect:'manual'});for(const cookie of r.headers.getSetCookie()){const pair=cookie.split(';')[0],at=pair.indexOf('=');cookies.set(pair.slice(0,at),pair.slice(at+1));}return r;} +globalThis.fetch=async(url,options={})=>{assert(typeof url==='string'&&url.startsWith('/api/'),'Only existing local API calls');pending++;try{const r=await raw(url,options),data=await r.clone().json().catch(()=>({message:'Non-JSON response'})),call={url,method:options.method??'GET',status:r.status,data,input:options.body?JSON.parse(options.body):null};calls.push(call);if(loseReceipt&&r.status===201&&url.includes('/purchasing-receipts/')&&url.endsWith('/confirm')){loseReceipt=false;state.steps.receipt_committed=data;save();throw Error('Resposta interrompida após a confirmação.');}return r;}finally{pending--;}}; +const delay=ms=>new Promise(resolve=>setTimeout(resolve,ms));async function until(test,label){const stop=Date.now()+45000;while(Date.now()pending===0,'previous requests');if(document)for(const e of walk(document.root))e.isConnected=false; + const entry=await raw('/compras'),entryHtml=await entry.text();assert.equal(entry.status,200);const token=/name="_token" value="([^"]+)"/.exec(entryHtml)?.[1];assert(token,'Entry form CSRF token'); + const target='/purchasing/'+stage+query;const r=await raw('/compras/entrar',{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded'},body:new URLSearchParams({_token:token,role,stage,...(query?{return_to:target}:{})})});assert.equal(r.status,302,'Explicit role selection failed');assert.equal(r.headers.get('location'),base+target); + const screen=await raw(target),html=await screen.text();assert.equal(screen.status,200);document=parsePage(html);installDom(document);globalThis.location={search:query};const [file,id]=files[stage];assert(document.querySelector('#'+id));assert(html.includes('Entrada de Compras / trocar função')); + const before=calls.length;await import('../public/'+file+'.mjs?completion='+Date.now()+'-'+epoch++);await until(()=>pending===0&&calls.length>before,'workspace initial read');await delay(30); + if(calls.slice(before).some(c=>c.status>=400))throw Error('Workspace initial read refused: '+JSON.stringify(calls.slice(before).map(c=>({url:c.url,status:c.status,error:c.data.message})))); + return document; +} +const detail=()=>document.querySelector('#detail')??document.querySelector('#process-detail')??document.querySelector('#award-detail'); +const form=title=>walk(detail()).find(e=>e.tag==='form'&&e.textContent.includes(title));const button=(root,text)=>walk(root).find(e=>e.tag==='button'&&e._text.includes(text)); +async function submit(f,key){assert(f,'Expected usable form '+key);f.dispatchEvent(new Event('input',{bubbles:true}));const before=calls.length;await f.onsubmit({preventDefault(){},currentTarget:f});const preview=calls.slice(before).find(c=>c.method==='POST'&&c.url.endsWith('/preview'));assert.equal(preview?.status,200,'Preview '+key+': '+JSON.stringify(preview?.data));const confirm=button(f,'Confirmar');assert(confirm&&!confirm.disabled,'Explicit confirmation enabled '+key);await confirm.onclick();const result=calls.slice(before).find(c=>c.method==='POST'&&c.url.endsWith('/confirm'));assert([200,201].includes(result?.status),'Confirmation '+key+': '+JSON.stringify(result?.data));await until(()=>pending===0,'refresh '+key);await delay(30);state.steps[key]=result.data;save();return result.data;} +try{ + if(!state.steps.supplier){await page('actor','suppliers');document.querySelector('#create').onclick();const f=form('Preparar fornecedor');for(const [name,value]of Object.entries({name:'Fornecedor Percurso Completo QA',nuit:'900110401',contact:'Contacto sintético',email:'percurso-completo@example.test',phone:'+258840000401',address:'Endereço sintético para conferência',category:'Material',beneficiaries:'Participação sintética declarada',document_references:'DOCUMENTO-QA-COMPRAS-20261104',diligence_notes:'Conferência individual do fornecedor para o percurso completo.',next_review:'2027-11-04'})){const input=byName(f,name);assert(input,name);input.value=value;}await submit(f,'supplier');ok(true,'C02 fornecedor novo criado pelo formulário real');} + const supplier=state.steps.supplier.supplier_id; + if(!state.steps.supplier_review){await page('issuer','suppliers','?supplier='+supplier);await until(()=>form('Decisão independente'),'supplier review');const f=form('Decisão independente');walk(f).find(e=>e.tag==='select').value='active';setLabel(f,'Fundamento','Fornecedor sintético conferido por identidade distinta para esta compra.');await submit(f,'supplier_review');ok(true,'C02 revisão distinta activa o fornecedor na mesma instalação');} + if(!state.steps.request){await page('requester','requests');document.querySelector('#create').onclick();const f=form('Preparar requisição');setLabel(f,'Centro de custo',native.centre);setLabel(f,'Prioridade','normal');setLabel(f,'Necessário em','2026-12-04');setLabel(f,'Fundamento da necessidade','Material sintético para comprovar o percurso completo de Compras.');for(const [label,value]of [['Descrição','Material do percurso completo'],['Categoria','Material'],['Unidade','UN'],['Quantidade','1.000'],['Preço estimado','100.00'],['Taxa documental','0'],['Tipo de aquisição','consumable']])setLabel(f,label,value);await submit(f,'request');ok(true,'C03 necessidade criada pelo formulário sem preparar outra demonstração');} + const request=state.steps.request.request_id; + if(!state.steps.request_submit){await page('requester','requests','?request='+request);await until(()=>form('Submeter para aprovação'),'request submission');await submit(form('Submeter para aprovação'),'request_submit');} + if(!state.steps.request_approval){await page('approver','requests','?request='+request);await until(()=>form('Decisão independente'),'request approval');const f=form('Decisão independente');setLabel(f,'Decisão','approved');setLabel(f,'Fundamento','Necessidade conferida e aprovada pela chefia sintética distinta.');await submit(f,'request_approval');ok(true,'C03 submissão e aprovação pela chefia usam a mesma necessidade');} + for(let index=0;index<3;index++)if(!state.steps['quote'+index]){ + await page('actor','sourcing','?request='+request);await until(()=>form('Registar proposta de fornecedor'),'quotation form');const f=form('Registar proposta de fornecedor');await until(()=>byName(f,'supplier_id')?.children.length>1&&pending===0,'supplier catalogue');const select=byName(f,'supplier_id'),supplierId=[supplier,...native.supplier_ids][index];assert(select.children.some(o=>String(o.value)===String(supplierId)),'Eligible reviewed supplier in actual picker');select.value=supplierId;select.onchange();for(const [name,value]of Object.entries({reference:'COMPRA-COMPLETA-P'+(index+1),delivery_days:'5',valid_until:'2026-12-04',payment_terms:'Condições sintéticas de pagamento após conferência',unit_price:String(100+index*20),discount_type:'none',discount_value:'0'})){const input=byName(f,name);assert(input,name);input.value=value;}byName(f,'no_conflict').checked=true;await submit(f,'quote'+index); + }ok(true,'C04 três propostas incluem o fornecedor criado e revisto nesta instalação'); + for(const role of ['actor','issuer'])for(let index=0;index<3;index++)if(!state.steps['evaluation-'+role+index]){ + await page(role,'sourcing','?request='+request);await until(()=>form('Avaliar '),'evaluation forms');const id=state.steps['quote'+index].quotation_id,last=calls.filter(c=>c.url==='/api/purchasing-sourcing/requests/'+request&&c.status===200).at(-1),quote=last.data.quotes.find(q=>q.id===id);assert(quote);const f=form('Avaliar '+quote.supplier.name);assert(f,'Distinct evaluation available');for(const name of ['quality','history','payment'])byName(f,name).value=name==='history'?'5':'8';byName(f,'comment').value='Avaliação individual fundamentada da proposta para o percurso completo.';byName(f,'no_conflict').checked=true;await submit(f,'evaluation-'+role+index); + }ok(true,'C04 seis avaliações individuais por duas identidades no mesmo processo'); + if(!state.steps.award){await page('actor','sourcing','?request='+request);await until(()=>form('Propor adjudicação'),'selection available');const f=form('Propor adjudicação');for(const [name,value]of Object.entries({quotation_id:state.steps.quote0.quotation_id,justification:'Escolha expressa após comparação completa e avaliações distintas.',delivery_date:'2026-11-20',delivery_location:'Armazém sintético da unidade'}))byName(f,name).value=value;await submit(f,'award');} + const award=state.steps.award.award_id; + if(!state.steps.award_approval){await page('approver','sourcing','?request='+request);await until(()=>form('Decisão independente da adjudicação'),'award approval');const f=form('Decisão independente da adjudicação');byName(f,'decision').value='approved';byName(f,'comment').value='Adjudicação conferida distintamente pela chefia no processo completo.';await submit(f,'award_approval');ok(true,'C05 adjudicação fundamentada recebe aprovação distinta');} + if(!state.steps.order){await page('actor','orders','?award='+award);await until(()=>button(detail(),'Conferir impacto da emissão'),'order issue');await button(detail(),'Conferir impacto da emissão').onclick();assert(!button(detail(),'Emitir esta ordem').disabled);const before=calls.length;await button(detail(),'Emitir esta ordem').onclick();const issued=calls.slice(before).find(c=>c.url.endsWith('/issue'));assert.equal(issued?.status,201,JSON.stringify(issued?.data));state.steps.order=issued.data;save();ok(true,'C05 ordem emitida pelo botão real a partir da adjudicação aprovada');} + const order=state.steps.order.order.id; + if(!state.steps.receipt){await page('validator','receipts','?order='+order);await until(()=>byName(detail(),'chosen'),'receipt form');const f=walk(detail()).find(e=>e.tag==='form'),chosen=byName(f,'chosen');chosen.checked=true;chosen.onchange();await until(()=>byName(f,'stock_item_id')?.children.some(o=>String(o.value)===String(native.stock))&&pending===0,'article catalogue');const select=byName(f,'stock_item_id');select.value=native.stock;select.onchange();for(const [name,value]of Object.entries({delivery_note:'GUIA-COMPRA-COMPLETA-20261104',received_on:'2026-11-04',warehouse_id:native.warehouse,received_quantity:'1.000',accepted_quantity:'1.000',quality_status:'compliant'}))byName(f,name).value=value; + f.dispatchEvent(new Event('input',{bubbles:true}));await f.onsubmit({preventDefault(){}});const confirm=button(f,'Confirmar esta recepção');assert(!confirm.disabled);loseReceipt=true;await confirm.onclick();assert(state.steps.receipt_committed&&!confirm.disabled,'Uncertain result remains recoverable');await confirm.onclick();const results=calls.filter(c=>c.url==='/api/purchasing-receipts/orders/'+order+'/confirm');assert.deepEqual(results.map(c=>c.status),[201,200]);state.steps.receipt=results.at(-1).data;save();ok(true,'C06 recepção pelo formulário cria um movimento e recupera resposta perdida sem duplicar');} + if(!state.steps.invoice){await page('issuer','invoices','?order='+order);await until(()=>form('Registar documento recebido'),'invoice registration');const f=form('Registar documento recebido');for(const [label,value]of [['Número da factura','FACT-COMPRA-COMPLETA-20261104'],['Data de emissão','2026-11-04'],['Base documental','100.00'],['Imposto documental','0.00'],['Total documental','100.00']])setLabel(f,label,value);const chosen=walk(f).find(e=>e.type==='checkbox');chosen.checked=true;chosen.onchange();setLabel(f,'Quantidade facturada','1.000');setLabel(f,'Fundamento desta conferência','Factura recebida confrontada com a ordem e a recepção do processo completo.');await submit(f,'invoice');} + const invoice=state.steps.invoice.invoice_id; + if(!state.steps.invoice_validation){await page('reviewer','invoices','?order='+order+'&invoice='+invoice);await until(()=>form('Validar conferência de'),'invoice validation');const f=form('Validar conferência de');setLabel(f,'Fundamento desta conferência','Conferência documental independente das quantidades e valores desta factura.');await submit(f,'invoice_validation');ok(true,'C07 documento recebido registado e validado por outra identidade');} + if(!state.steps.obligation_prepare){await page('issuer','obligations','?invoice='+invoice);await until(()=>form('Conferir preparação'),'obligation preparation');const f=form('Conferir preparação');setLabel(f,'Fundamento individual','Fotografia da obrigação conferida com a factura validada deste processo.');await submit(f,'obligation_prepare');} + if(!state.steps.obligation){await page('reviewer','obligations','?invoice='+invoice);const proposal=state.steps.obligation_prepare.proposal_id;await until(()=>button(detail(),'Conferir proposta #'+proposal),'proposal selection');button(detail(),'Conferir proposta #'+proposal).onclick();const f=form('Conferir reconhecimento');assert(f);setLabel(f,'Fundamento individual','Reconhecimento independente da obrigação da factura e da evidência de origem.');await submit(f,'obligation');ok(true,'C08 obrigação reconhecida por revisão distinta na mesma instalação');} + await page('issuer','obligations','?invoice='+invoice);await until(()=>detail().textContent.includes('Responsabilidade única reconhecida'),'final recognised state');ok(!form('Conferir preparação'),'C08 documento reconhecido deixa de oferecer nova preparação');ok(detail().textContent.includes('Vencimento desconhecido'),'C08 vencimento ausente fica explícito sem data inventada'); + state.phase='complete';state.source_ids={supplier,request,award,order,receipt:state.steps.receipt.receipt.id,movement:state.steps.receipt.movements[0].id,invoice,proposal:state.steps.obligation_prepare.proposal_id,obligation:state.steps.obligation.obligation_id};save(); + fs.writeFileSync(out,JSON.stringify({passed:true,installation:'cc50a276c10c',port:8085,checks:state.checks,source_ids:state.source_ids,actual_workspace_modules:true,real_http:true,dom_simulation:true,new_database:false,new_server:false,new_demonstration:false,payments_created:0,visual_review:false},null,2));console.log(JSON.stringify({phase:state.phase,checks:state.checks.length,source_ids:state.source_ids})); +}catch(error){fs.writeFileSync(path.join(root,'completion-flow-diagnostic.json'),JSON.stringify({error:error.message,phase:state.phase,steps:Object.keys(state.steps),status:document?.querySelector('#status')?.textContent,message:document?.querySelector('#message')?.textContent,calls:calls.slice(-12)},null,2));throw error;}finally{globalThis.fetch=originalFetch;} diff --git a/scripts/purchasing-completion-client-check.mjs b/scripts/purchasing-completion-client-check.mjs new file mode 100644 index 0000000..a621be2 --- /dev/null +++ b/scripts/purchasing-completion-client-check.mjs @@ -0,0 +1,10 @@ +import fs from 'node:fs';import path from 'node:path';import assert from 'node:assert/strict';import {Element,walk} from './purchasing-workspace-dom.mjs';import {evidence} from '../public/purchasing-presenter.mjs';import {installPurchasingExit} from '../public/purchasing-exit.mjs'; +const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),root=path.join(run.root,'private/receipt-composition-cc50a276c10c'),out=path.join(root,'completion-client-result.json');assert(!fs.existsSync(out));const checks=[],ok=(v,name)=>{assert(v,name);checks.push(name);}; +globalThis.document={createElement:tag=>new Element(tag)};const rendered=evidence({total_minor:10000,accepted_milli:1000,status:'active',due_on:null,name:''});ok(rendered.textContent.includes('100,00 MZN')&&rendered.textContent.includes('1,000')&&rendered.textContent.includes('Activo')&&rendered.textContent.includes('Por indicar'),'C09 prévia legível conserva montantes quantidades estado e pendências');ok(walk(rendered).every(e=>e.tag!=='script')&&rendered.textContent.includes(''),'C09 dados recebidos são texto e não instruções HTML');ok(evidence('constructor').textContent==='constructor','C09 designações não são confundidas com propriedades de objectos'); +const listeners={},windowListeners={},main=new Element('main'),form=new Element('form'),input=new Element('input'),confirm=new Element('button','Confirmar'),link=new Element('a','Trocar função'),message=new Element('p');link.href='/compras';form.append(input,confirm);main.append(form,link);let allow=false,resolver,mode='success'; +const doc={addEventListener:(name,fn)=>listeners[name]=fn,querySelector:()=>message},win={addEventListener:(name,fn)=>windowListeners[name]=fn,confirm:()=>allow,fetch:async()=>{if(mode==='wait')return new Promise(resolve=>resolver=resolve);return {ok:true,clone:()=>({json:async()=>{if(mode==='uncertain')throw Error('body lost');return {};}})};}}; +const guard=installPurchasingExit(doc,win),event=(target,trusted=true)=>({target,isTrusted:trusted,prevented:false,preventDefault(){this.prevented=true;}}); +listeners.input(event(input,false));ok(guard.dirty.size===0,'C09 carregamento automático de selectores não marca formulários vazios como alterados');listeners.input(event(input));let click=event(link);listeners.click(click);ok(click.prevented&&guard.dirty.size===1,'C09 cancelar a saída conserva campos por confirmar');allow=true;click=event(link);listeners.click(click);ok(!click.prevented&&guard.dirty.size===0,'C09 descarte só ocorre após escolha explícita'); +listeners.input(event(input));listeners.click(event(confirm));mode='wait';const pending=win.fetch('/api/purchasing-requests/1/confirm',{method:'POST'});click=event(link);listeners.click(click);ok(click.prevented&&guard.pending()===1&&input.disabled,'C09 operação em curso impede mudar função e editar a confirmação');resolver({ok:true,clone:()=>({json:async()=>({})})});await pending;ok(!input.disabled&&guard.pending()===0&&guard.dirty.size===0,'C09 confirmação íntegra liberta navegação e restaura controlos'); +listeners.input(event(input));listeners.click(event(confirm));mode='uncertain';await win.fetch('/api/purchasing-requests/1/confirm',{method:'POST'});ok(guard.dirty.size===1&&!input.disabled,'C09 resposta incerta mantém campos para recuperação manual');const unload=event(input);windowListeners.beforeunload(unload);ok(unload.prevented,'C09 fechar a página avisa de campos ainda por confirmar'); +fs.writeFileSync(out,JSON.stringify({passed:true,checks,dom_simulation:true,business_commands:0,visual_review:false},null,2));console.log(JSON.stringify({passed:true,checks:checks.length})); diff --git a/scripts/purchasing-completion-handoffs.mjs b/scripts/purchasing-completion-handoffs.mjs new file mode 100644 index 0000000..b538adf --- /dev/null +++ b/scripts/purchasing-completion-handoffs.mjs @@ -0,0 +1,14 @@ +import fs from 'node:fs';import path from 'node:path';import crypto from 'node:crypto';import assert from 'node:assert/strict';import {Element,walk,parsePage,installDom} from './purchasing-workspace-dom.mjs';import {continuationHref,appendStageLinks} from '../public/purchasing-focus.mjs'; +const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),root=path.join(run.root,'private/receipt-composition-cc50a276c10c'),flow=JSON.parse(fs.readFileSync(path.join(root,'completion-flow-result.json'))),out=path.join(root,'completion-handoffs-result.json'),ids=flow.source_ids,base='http://127.0.0.1:8085';assert(flow.passed&&!fs.existsSync(out));const checks=[],ok=(v,name)=>{assert(v,name);checks.push(name);},cookies=new Map,original=globalThis.fetch;let pending=0; +async function raw(url,options={}){const h=new Headers(options.headers);h.set('Cookie',[...cookies].map(([k,v])=>k+'='+v).join('; '));const r=await original(base+url,{...options,headers:h});for(const cookie of r.headers.getSetCookie()){const p=cookie.split(';')[0],i=p.indexOf('=');cookies.set(p.slice(0,i),p.slice(i+1));}return r;} +globalThis.fetch=async(url,options={})=>{assert((options.method??'GET')==='GET');pending++;try{return await raw(url,options);}finally{pending--;}}; +const settle=async()=>{for(let i=0;i<1200;i++){await new Promise(r=>setTimeout(r,25));if(!pending){await new Promise(r=>setTimeout(r,30));if(!pending)return;}}throw Error('Handoff read did not settle');}; +try{ + for(const [role,stage,file,query,destination]of [['requester','requests','request-workspace','?request='+ids.request,'/purchasing/sourcing?request='+ids.request],['validator','receipts','receipt-workspace','?order='+ids.order+'&receipt='+ids.receipt,'/purchasing/invoices?order='+ids.order]]){ + const entry=await raw('/qa/enter/'+role),v=await entry.json();assert.equal(entry.status,200);const response=await raw('/purchasing/'+stage+query,{headers:{Accept:'text/html','X-SGF-Context':v.context}}),html=await response.text();assert.equal(response.status,200);const doc=parsePage(html);installDom(doc);globalThis.location={search:query};await import('../public/'+file+'.mjs?handoff='+stage);await settle(); + const link=walk(doc.root).find(e=>e.tag==='a'&&e.href?.startsWith('/compras?')&&new URL('http://qa'+e.href).searchParams.get('return_to')===destination);ok(Boolean(link),'C09 '+role+' continua para a próxima etapa por escolha explícita da função, sem403 nem copiar IDs'); + } + // Preserve the original presentation contract outside this one installation. + globalThis.document={createElement:tag=>new Element(tag),querySelector:()=>null};const box=new Element('section');appendStageLinks({dataset:{continuityEnabled:'true'}},box,[{href:'/purchasing/invoices?order=1',label:'Facturas'}]);ok(continuationHref('sourcing',{request:1})===null&&box.children.length===0,'C09 instalações anteriores sem a entrada única conservam os links restritos pelo menu'); + const sources=['public/purchasing-focus.mjs','public/request-workspace.mjs'].map(file=>({file,sha256:crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex')}));fs.writeFileSync(out,JSON.stringify({passed:true,checks,sources,business_commands:0,same_installation:true,dom_simulation:true,visual_review:false},null,2));console.log(JSON.stringify({passed:true,checks:checks.length})); +}finally{globalThis.fetch=original;} diff --git a/scripts/purchasing-completion-preservation.mjs b/scripts/purchasing-completion-preservation.mjs new file mode 100644 index 0000000..28b90ef --- /dev/null +++ b/scripts/purchasing-completion-preservation.mjs @@ -0,0 +1,8 @@ +import fs from 'node:fs';import path from 'node:path';import crypto from 'node:crypto';import assert from 'node:assert/strict';import {spawnSync} from 'node:child_process'; +const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),root=path.join(run.root,'private/receipt-composition-cc50a276c10c'),s=JSON.parse(fs.readFileSync(path.join(root,'state.json'))),out=path.join(root,'completion-preservation-result.json');assert(!fs.existsSync(out)&&s.tag==='cc50a276c10c'&&s.env.DB_PORT==='55439'&&s.env.DB_DATABASE==='budget_core_sgf_cc50a276c10c'); +const checks=[],tables={},digest=s=>crypto.createHash('sha256').update(s).digest('hex'); +for(const table of ['permission_grants','cb_budget_entries']){ + const dump=spawnSync('C:/Program Files/PostgreSQL/17/bin/pg_restore.exe',['-a','-t',table,'-f','-',path.join(root,'completion-backup/host.dump')],{encoding:'utf8',windowsHide:true,maxBuffer:2*1024*1024});assert.equal(dump.status,0,'Private baseline extraction');const lines=dump.stdout.replaceAll('\r\n','\n').split('\n'),start=lines.findIndex(line=>line.startsWith('COPY public.'+table+' ('));assert(start>=0);const columns=/\((.+)\) FROM stdin;/.exec(lines[start])[1],end=lines.indexOf('\\.',start),before=lines.slice(start+1,end).sort();assert(end>start); + const current=spawnSync('C:/Program Files/PostgreSQL/17/bin/psql.exe',['-h','127.0.0.1','-p','55439','-U',s.env.DB_USERNAME,'-d',s.env.DB_DATABASE,'-Atq','-v','ON_ERROR_STOP=1','-c',`COPY public.${table} (${columns}) TO STDOUT`],{env:{...process.env,PGPASSWORD:s.env.DB_PASSWORD},encoding:'utf8',windowsHide:true});assert.equal(current.status,0,'Selected installation read');const after=current.stdout.replaceAll('\r\n','\n').split('\n');if(after.at(-1)==='')after.pop();after.sort();assert.deepEqual(after,before,table+' must remain unchanged');tables[table]={rows:before.length,before_sha256:digest(before.join('\n')),after_sha256:digest(after.join('\n'))};checks.push(table==='permission_grants'?'C10 nenhuma concessão alterada durante a conclusão':'C10 orçamento do host intacto sem autoridade concorrente'); +} +fs.writeFileSync(out,JSON.stringify({passed:true,checks,tables,baseline:'private pre-flow backup',database_writes:false,restored_database:false,new_database:false},null,2));console.log(JSON.stringify({passed:true,checks:checks.length})); diff --git a/scripts/purchasing-completion-read.mjs b/scripts/purchasing-completion-read.mjs new file mode 100644 index 0000000..d79df3d --- /dev/null +++ b/scripts/purchasing-completion-read.mjs @@ -0,0 +1,24 @@ +import fs from 'node:fs';import path from 'node:path';import assert from 'node:assert/strict'; +import {parsePage,installDom,walk} from './purchasing-workspace-dom.mjs'; +const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),root=path.join(run.root,'private/receipt-composition-cc50a276c10c'),source=JSON.parse(fs.readFileSync(path.join(root,'completion-flow-result.json'))),ids=source.source_ids,base='http://127.0.0.1:8085',out=path.join(root,'completion-read-result.json');assert(source.passed&&!fs.existsSync(out)); +const originalFetch=globalThis.fetch,cookies=new Map,checks=[],calls=[];let pending=0,document;const ok=(v,name)=>{assert(v,name);checks.push(name);}; +async function raw(url,options={}){const h=new Headers(options.headers);h.set('Cookie',[...cookies].map(([k,v])=>k+'='+v).join('; '));const r=await originalFetch(base+url,{...options,headers:h,redirect:'manual'});for(const cookie of r.headers.getSetCookie()){const p=cookie.split(';')[0],i=p.indexOf('=');cookies.set(p.slice(0,i),p.slice(i+1));}return r;} +globalThis.fetch=async(url,options={})=>{assert((options.method??'GET')==='GET','This verification never repeats a business command');pending++;try{const r=await raw(url,options);calls.push({url,status:r.status,data:await r.clone().json()});return r;}finally{pending--;}}; +const delay=ms=>new Promise(resolve=>setTimeout(resolve,ms));async function settle(){for(let i=0;i<2000;i++){if(pending===0){await delay(30);if(!pending)return;}await delay(20);}throw Error('Read did not settle');} +async function login(role,stage,query=''){ + const entry=await raw('/compras'),html=await entry.text(),token=/name="_token" value="([^"]+)"/.exec(html)?.[1];assert(token);const r=await raw('/compras/entrar',{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded'},body:new URLSearchParams({_token:token,role,stage,...(query?{return_to:'/purchasing/'+stage+query}:{})})});assert.equal(r.status,302);return {location:r.headers.get('location'),token}; +} +try{ + const cases=[['actor','suppliers','supplier-workspace','suppliers','?supplier='+ids.supplier],['requester','requests','request-workspace','requests','?request='+ids.request],['actor','sourcing','sourcing-workspace','sourcing','?request='+ids.request],['actor','orders','order-workspace','orders-workspace','?award='+ids.award],['validator','receipts','receipt-workspace','receipts','?order='+ids.order+'&receipt='+ids.receipt],['issuer','invoices','supplier-invoice-workspace','supplier-invoices','?order='+ids.order+'&invoice='+ids.invoice],['reviewer','obligations','supplier-obligation-workspace','supplier-obligations','?invoice='+ids.invoice]]; + for(const [role,stage,file,id,query]of cases){await settle();if(document)for(const e of walk(document.root))e.isConnected=false;await login(role,stage,query);const r=await raw('/purchasing/'+stage+query),html=await r.text();assert.equal(r.status,200);document=parsePage(html);installDom(document);globalThis.location={search:query};globalThis.history={replaceState:(_,__,href)=>{globalThis.location.search=href.slice(href.indexOf('?'));}};const before=calls.length;await import('../public/'+file+'.mjs?completed-read='+stage);await settle();const entry=document.querySelector('[data-purchasing-entry]');ok(entry&&new URL('http://qa'+entry.href).searchParams.get('return_to')==='/purchasing/'+stage+query,'C09 '+stage+' conserva o documento exacto para trocar de função');ok(calls.slice(before).every(c=>c.status===200),'C09 '+stage+' abre o documento real da mesma compra');} + const final=calls.filter(c=>c.url.startsWith('/api/purchasing-obligations/'+ids.invoice+'?')).at(-1).data,position=final.obligations[0];ok(position.principal_minor===10000&&position.balance_minor===10000&&position.due_on===null&&!position.source_conflict,'C08 principal e saldo100MZN com origem coerente e vencimento desconhecido'); + const entry=await raw('/compras'),html=await entry.text(),token=/name="_token" value="([^"]+)"/.exec(html)[1]; + for(const [body,status,name]of [ + [{role:'missing',stage:'requests'},403,'função inexistente'],[{role:'validator',stage:'obligations'},403,'etapa sem direito'],[{role:'actor',stage:'orders',return_to:'https://example.com/purchasing/orders?award=1'},422,'destino externo'],[{role:'actor',stage:'orders',return_to:'/purchasing/orders?award=1&award=2'},422,'origem ambígua'],[{role:'issuer',stage:'receipts',return_to:'/purchasing/receipts?order=1&movement=1'},422,'origens misturadas']]){ + const response=await raw('/compras/entrar',{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded',Accept:'application/json'},body:new URLSearchParams({_token:token,...body})});ok(response.status===status,'C01 entrada recusa '+name); + } + const csrf=await raw('/compras/entrar',{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded',Accept:'application/json'},body:new URLSearchParams({role:'actor',stage:'suppliers'})});ok(csrf.status===419,'C01 escolha de função exige CSRF'); + // One read-only board navigation through the real module used by the installation. + await login('issuer','obligations');const hub=await raw('/purchasing/workspace'),hubHtml=await hub.text();document=parsePage(hubHtml);installDom(document);await import('../public/purchasing-board.mjs?complete=1');await settle();ok(document.querySelector('#board-records').textContent.length>0,'C09 painel único consulta documentos autorizados existentes'); + fs.writeFileSync(out,JSON.stringify({passed:true,checks,principal_minor:position.principal_minor,balance_minor:position.balance_minor,source_conflict:position.source_conflict,new_business_commands:0,role_selection_posts:true,real_http:true,dom_simulation:true,visual_review:false},null,2));console.log(JSON.stringify({passed:true,checks:checks.length})); +}finally{globalThis.fetch=originalFetch;} diff --git a/scripts/purchasing-completion-stock-read.mjs b/scripts/purchasing-completion-stock-read.mjs new file mode 100644 index 0000000..f95a9dd --- /dev/null +++ b/scripts/purchasing-completion-stock-read.mjs @@ -0,0 +1,5 @@ +import fs from 'node:fs';import path from 'node:path';import assert from 'node:assert/strict'; +const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),root=path.join(run.root,'private/receipt-composition-cc50a276c10c'),flow=JSON.parse(fs.readFileSync(path.join(root,'completion-flow-result.json'))),out=path.join(root,'completion-stock-result.json');assert(flow.passed&&!fs.existsSync(out)); +const base='http://127.0.0.1:8085',cookies=new Map;async function request(url,options={}){const headers=new Headers(options.headers);headers.set('Cookie',[...cookies].map(([k,v])=>k+'='+v).join('; '));const r=await fetch(base+url,{...options,headers});for(const cookie of r.headers.getSetCookie()){const value=cookie.split(';')[0],i=value.indexOf('=');cookies.set(value.slice(0,i),value.slice(i+1));}return r;} +const enter=await request('/qa/enter/validator?module=stock'),session=await enter.json();assert.equal(enter.status,200);const response=await request('/api/stock-read?view=movements',{headers:{Accept:'application/json','X-SGF-Context':session.context}}),data=await response.json();assert.equal(response.status,200);assert.equal(data.rows.length,1);assert.equal(data.rows[0].id,flow.source_ids.movement);assert.equal(data.rows[0].quantity_milli,'1000'); +fs.writeFileSync(out,JSON.stringify({passed:true,checks:['C06 Stock consulta na mesma instalação o movimento1UN criado pela recepção do percurso completo'],movement_id:data.rows[0].id,physical_milli:data.rows[0].quantity_milli,new_business_commands:0,same_installation:true,visual_review:false},null,2));console.log('Stock confirmado no mesmo livro: 1UN, sem copiar o movimento.'); diff --git a/scripts/purchasing-completion-verify.php b/scripts/purchasing-completion-verify.php new file mode 100644 index 0000000..c68ab78 --- /dev/null +++ b/scripts/purchasing-completion-verify.php @@ -0,0 +1,17 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();App\Modules\Purchasing\BudgetAdapter::guard();$flow=json_decode(file_get_contents($s['root'].'/completion-flow-result.json'),true);$ids=$flow['source_ids'];$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.completion_native'=>$s['nativeConnection']]);$db=DB::connection('completion_native');$checks=[];$ok=function($v,$name)use(&$checks){if(!$v)throw new RuntimeException($name);$checks[]=$name;}; +$facts=$db->transaction(function()use($db,$ids,$n,$ok){$db->statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ ONLY');$request=$db->table('requisitions')->where('id',$ids['request'])->first();$order=$db->table('purchase_orders')->where('id',$ids['order'])->first();$receipt=$db->table('goods_receipts')->where('id',$ids['receipt'])->first();$invoice=$db->table('invoices')->where('id',$ids['invoice'])->first();$proposal=$db->table('pa_proposals')->where('id',$ids['proposal'])->first();$obligation=$db->table('pa_obligations')->where('id',$ids['obligation'])->first(); + $ok($request->tenant_id===$n['tenant']&&$request->status==='approved'&&$order->requisition_id===$request->id&&$order->purchase_award_id===$ids['award'],'C10 requisição adjudicação e ordem pertencem ao mesmo processo nativo'); + $quotes=$db->table('quotations')->where('requisition_id',$ids['request'])->pluck('id');$ok($quotes->count()===3&&$db->table('proposal_evaluations')->whereIn('quotation_id',$quotes)->count()===6,'C10 três propostas e seis avaliações permanecem gravadas'); + foreach($quotes as$id)$ok($db->table('proposal_evaluations')->where('quotation_id',$id)->distinct()->count('evaluator_id')===2,'C10 proposta '.$id.' tem dois avaliadores distintos'); + $ok($db->table('budget_entries')->where('requisition_id',$ids['request'])->where('kind','reserve')->count()===1&&$db->table('budget_entries')->where('requisition_id',$ids['request'])->where('kind','commit')->count()===1&&$db->table('budget_consumptions')->where('invoice_id',$ids['invoice'])->count()===1&&(int)$db->table('budget_consumptions')->where('invoice_id',$ids['invoice'])->sum('amount_minor')===10000,'C10 reserva compromisso e consumo100MZN únicos no orçamento nativo'); + $ok($db->table('goods_receipts')->where('purchase_order_id',$ids['order'])->count()===1&&$receipt->received_by!==$order->issued_by,'C10 uma recepção por identidade distinta do emissor'); + $movements=$db->table('stock_movements')->whereIn('goods_receipt_item_id',$db->table('goods_receipt_items')->where('goods_receipt_id',$ids['receipt'])->select('id'))->get();$ok($movements->count()===1&&$movements[0]->id===$ids['movement']&&(int)$movements[0]->quantity_milli===1000&&$movements[0]->stock_item_id===$n['stock'],'C10 um único movimento físico1UN depois da recuperação da resposta'); + $ok($invoice->status==='validated'&&$invoice->created_by!==$invoice->validated_by&&$db->table('invoices')->where('purchase_order_id',$ids['order'])->count()===1,'C10 uma factura validada por identidade distinta'); + $ok($proposal->prepared_by!==$obligation->recognised_by&&$obligation->principal_minor===10000&&$obligation->due_on===null&&$db->table('pa_obligations')->where('source_id',$obligation->source_id)->count()===1,'C10 principal100MZN único e reconhecimento por identidade distinta'); + $ok($db->table('external_payments')->where('tenant_id',$n['tenant'])->count()===0,'C10 nenhum pagamento criado no percurso'); + $ok($db->table('audit_logs')->where('requisition_id',$ids['request'])->where('action','sgf.request.command')->count()===3&&$db->table('audit_logs')->where('requisition_id',$ids['request'])->where('action','sgf.sourcing.command')->count()===11,'C10 decisões e avaliações mantêm auditoria dos comandos originais'); + return ['request_number'=>$request->number,'order_number'=>$order->number,'invoice_number'=>$invoice->number,'principal_minor'=>$obligation->principal_minor,'physical_milli'=>1000]; +}); +file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'facts'=>$facts,'source_ids'=>$ids,'read_only_verification'=>true,'new_database'=>false,'new_rights'=>false,'visual_review'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." canonical purchasing checks passed.\n"; diff --git a/scripts/purchasing-continuity-demo.php b/scripts/purchasing-continuity-demo.php new file mode 100644 index 0000000..19bcf1c --- /dev/null +++ b/scripts/purchasing-continuity-demo.php @@ -0,0 +1,4 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.continuity_demo'=>$s['nativeConnection']]);$db=DB::connection('continuity_demo');$checks=[];$ok=function($v,$name)use(&$checks){if(!$v)throw new RuntimeException($name);$checks[]=$name;};$fingerprint=fn()=>hash('sha256',json_encode([array_map(fn($t)=>$db->table($t)->orderBy('id')->get(),['suppliers','requisitions','purchase_orders','goods_receipts','receipt_documents','invoices','pa_obligations','audit_logs']),DB::table('permission_grants')->orderBy('id')->get()]));$before=$fingerprint();$ok($db->table('requisitions')->where('tenant_id',$n['tenant'])->count()===0&&$db->table('purchase_orders')->count()===0&&$db->table('goods_receipts')->count()===0&&$db->table('invoices')->count()===0&&$db->table('pa_obligations')->count()===0,'new continuity demonstration begins without main business operations');$client=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:8079','http_errors'=>false,'timeout'=>25]);$jar=new GuzzleHttp\Cookie\CookieJar;$r=$client->get('/qa/enter/issuer',['cookies'=>$jar]);$v=json_decode((string)$r->getBody(),true);$options=['cookies'=>$jar,'headers'=>['Accept'=>'application/json','X-SGF-Context'=>$v['context']]]; +foreach(['receipts','invoices','obligations']as$path){$r=$client->get('/purchasing/'.$path,$options);$ok($r->getStatusCode()===200&&str_contains((string)$r->getBody(),'data-continuity-enabled="true"'),'inline continuity is enabled in new '.$path.' screen');}foreach(['purchasing-focus.mjs','receipt-workspace.mjs','supplier-invoice-workspace.mjs','supplier-obligation-workspace.mjs']as$file){$r=$client->get('/'.$file);$ok($r->getStatusCode()===200&&hash('sha256',(string)$r->getBody())===hash_file('sha256',$s['app'].'/public/'.$file),'served affected static module matches '.$file);}$ok($fingerprint()===$before,'live probes preserve selected business tables permission grants and audit');file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'before'=>$before,'after'=>$fingerprint(),'visual_review'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." purchasing continuity demonstration checks passed.\n"; diff --git a/scripts/purchasing-continuity-read-body.php b/scripts/purchasing-continuity-read-body.php new file mode 100644 index 0000000..7536c5d --- /dev/null +++ b/scripts/purchasing-continuity-read-body.php @@ -0,0 +1,10 @@ +select("SELECT tablename FROM pg_tables WHERE schemaname='public' ORDER BY tablename")as$table){if(!preg_match('/^[a-z0-9_]+$/D',$table->tablename))throw new LogicException('Unexpected fixture table');$name=$table->tablename;$row=$connection->selectOne('SELECT count(*) n,md5(coalesce(string_agg(row_to_json(t)::text,\'\' ORDER BY row_to_json(t)::text),\'\')) h FROM "'.$name.'" t');$result[$name]=[(int)$row->n,$row->h];}$result['sequences']=$connection->select("SELECT sequencename,last_value FROM pg_sequences WHERE schemaname='public' ORDER BY sequencename");return $result;}; +$before=['host'=>$fingerprint(DB::connection()),'native'=>$fingerprint($db)];$saved=json_decode(file_get_contents($s['original_root'].'/integrated-result.json'),true);$id=$saved['source_ids']['request'];$order=$saved['source_ids']['order'];$unfiltered=$db->table('audit_logs')->where('requisition_id',$id)->orderByDesc('id')->limit(25)->get();$ok($unfiltered->contains(fn($v)=>str_starts_with($v->action,'invoice.')||$v->action==='sgf.invoice.command'||$v->action==='sgf.obligation.command'),'completed read fixture contains downstream payloads that old unfiltered histories would disclose'); +$isRequest=fn($action)=>str_starts_with($action,'requisition.')||$action==='sgf.request.command';$isSourcing=fn($action)=>$isRequest($action)||str_starts_with($action,'quotation.')||str_starts_with($action,'award.')||$action==='sgf.sourcing.command'; +$expectedRequest=$db->table('audit_logs')->where('requisition_id',$id)->get()->filter(fn($v)=>$isRequest($v->action))->sortByDesc('id')->take(25)->pluck('id')->values()->all(); +foreach(['requester','actor','issuer']as$role){$r=$call($role,'/api/purchasing-requests/'.$id);$ok($r['status']===200&&array_column($r['data']['history'],'id')===$expectedRequest&&!array_filter($r['data']['history'],fn($v)=>!$isRequest($v['action'])),'request history is scoped before limit and retains exact own-stage evidence for '.$role);} +$r=$call('actor','/api/purchasing-sourcing/requests/'.$id);$ok($r['status']===200&&!array_filter($r['data']['history'],fn($v)=>!$isSourcing($v['action'])),'sourcing summary contains only upstream and sourcing-stage events');$total=$db->table('audit_logs')->where('requisition_id',$id)->get()->filter(fn($v)=>$isSourcing($v->action))->count();$pages=[];$r=$call('actor','/api/purchasing-sourcing/requests/'.$id.'/history?page=1');$ok($r['status']===200&&$r['data']['total']===$total&&$r['data']['per_page']===25,'sourcing pagination total counts only authorised stage history');$last=$r['data']['last_page'];$pages=$r['data']['data'];for($page=2;$page<=$last;$page++){$r=$call('actor','/api/purchasing-sourcing/requests/'.$id.'/history?page='.$page);if($r['status']!==200)throw new RuntimeException('Sourcing history page refused');array_push($pages,...$r['data']['data']);}$ok(count($pages)===$total&&count(array_unique(array_column($pages,'id')))===$total&&!array_filter($pages,fn($v)=>!$isSourcing($v['action'])),'all sourcing pages preserve unique own-stage evidence without financial payload events'); +$r=$call('issuer','/api/purchasing-invoices/orders/'.$order.'/history');$ok($r['status']===200&&array_filter($r['data']['data'],fn($v)=>str_starts_with($v['action'],'invoice.')||$v['action']==='sgf.invoice.command'),'finance retains authorised invoice history in its own endpoint');$ok($call('actor','/api/purchasing-invoices/orders/'.$order.'/history')['status']===403&&$call('requester','/api/purchasing-sourcing/requests/'.$id.'/history')['status']===403,'stage history filtering does not grant access to another stage'); +$r=$call('requester','/api/purchasing-dossiers/'.$id);$ok($r['status']===200&&!array_filter($r['data']['events']['data'],fn($v)=>!$isRequest($v['action'])),'request-only dossier remains scoped independently of inline histories');$ok($call('actor','/api/purchasing-sourcing/requests/'.$n['foreign_requisition'].'/history')['status']===403,'foreign request cannot expose sourcing history'); +$after=['host'=>$fingerprint(DB::connection()),'native'=>$fingerprint($db)];$ok(json_encode($before)===json_encode($after),'142 original regression tables and all sequences remain unchanged by stage-history verification');file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'reused_proof'=>'purchasing-integrated-composition-20261103.json','financial_commands_repeated'=>0,'before_sha256'=>hash('sha256',json_encode($before)),'after_sha256'=>hash('sha256',json_encode($after)),'tables_checked'=>count($before['host'])+count($before['native'])-2,'new_right_names'=>[],'visual_review'=>false,'deployment_capacity_validated'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." purchasing continuity read checks passed.\n"; diff --git a/scripts/purchasing-continuity-read-overlay.mjs b/scripts/purchasing-continuity-read-overlay.mjs new file mode 100644 index 0000000..a326ad3 --- /dev/null +++ b/scripts/purchasing-continuity-read-overlay.mjs @@ -0,0 +1,8 @@ +import fs from 'node:fs';import path from 'node:path';import crypto from 'node:crypto';import {spawnSync} from 'node:child_process'; +const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),tag=crypto.randomBytes(6).toString('hex'),sourceRoot=path.join(run.root,'private/receipt-composition-b4093c6f6707'),source=JSON.parse(fs.readFileSync(path.join(sourceRoot,'state.json'))),root=path.join(run.root,'private/purchasing-continuity-read-'+tag),app=path.join(root,'app'); +if(!JSON.parse(fs.readFileSync(path.join(sourceRoot,'integrated-result.json'))).passed||source.env.DB_DATABASE!=='budget_core_sgf_b4093c6f6707'||source.env.DB_PORT!=='55439'||source.env.SGF_ISOLATED_REGRESSION_RUN!==run.id)throw Error('Owned completed regression book required'); +fs.mkdirSync(root);for(const dir of ['app','bootstrap','config','routes','resources','database','public'])fs.cpSync(dir,path.join(app,dir),{recursive:true,filter:p=>!p.replaceAll('\\','/').includes('bootstrap/cache')});for(const pkg of ['budget-control','payables','general-ledger','module-updates','purchasing'])fs.cpSync(path.join('packages',pkg),path.join(app,'packages',pkg),{recursive:true});fs.symlinkSync(path.resolve('vendor'),path.join(app,'vendor'),'junction');fs.copyFileSync('composer.json',path.join(app,'composer.json'));for(const dir of ['bootstrap/cache','storage/logs','storage/framework/cache/data','storage/framework/views','storage/framework/sessions'])fs.mkdirSync(path.join(app,dir),{recursive:true}); +// Existing bindings, native manifests and business facts remain in place; only application/session files are new. +for(const file of ['fixture.json','native-fixture.json'])fs.copyFileSync(path.join(sourceRoot,file),path.join(root,file)); +const env={...source.env,APP_BASE_PATH:app,SGF_DOSSIERS_QA_ENABLED:'true',SGF_PURCHASING_FOCUS_QA_ENABLED:'true',SGF_PURCHASING_CONTINUITY_QA_ENABLED:'true',SESSION_COOKIE:'sgf_dossier_read_'+tag,RECEIPT_COMPOSITION_STATE:path.join(root,'state.json')};const state={...source,root,app,env,focus:true,dossiers:true,read_overlay:true,original_root:sourceRoot};fs.writeFileSync(path.join(root,'state.json'),JSON.stringify(state,null,2)); +const result=spawnSync('C:/laragon/tools/sgf-tempo/php-8.4.27/php.exe',[path.resolve('scripts/purchasing-continuity-read-proof.php')],{cwd:app,env,encoding:'utf8',windowsHide:true,timeout:180000});fs.writeFileSync(path.join(root,'read-proof.log'),result.stdout+'\n'+result.stderr);if(result.status!==0||!fs.existsSync(path.join(root,'purchasing-continuity-read-result.json')))throw Error('Dossier read proof incomplete; private diagnostics retained '+tag);console.log(JSON.stringify({tag,root,result:result.stdout.trim()})); diff --git a/scripts/purchasing-continuity-read-proof.php b/scripts/purchasing-continuity-read-proof.php new file mode 100644 index 0000000..e7038ac --- /dev/null +++ b/scripts/purchasing-continuity-read-proof.php @@ -0,0 +1,9 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true);$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.sourcing_verify'=>$s['nativeConnection']]);$db=DB::connection('sourcing_verify');$checks=[];$ok=function($v,$name)use(&$checks,$s){if(!$v)throw new RuntimeException($name);$checks[]=$name;file_put_contents($s['root'].'/purchasing-continuity-read-progress.json',json_encode($checks,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));};$servers=[];$clients=[];$sessions=[]; +try{ + foreach([0,1]as$i){$socket=stream_socket_server('tcp://127.0.0.1:0');$port=(int)substr(strrchr(stream_socket_get_name($socket,false),':'),1);fclose($socket);$server=new Symfony\Component\Process\Process([PHP_BINARY,'-S','127.0.0.1:'.$port,'-t',$s['app'].'/public',dirname(__DIR__).'/scripts/receipt-composition-http.php'],$s['app'],null,null,180);$server->start();$servers[]=$server;for($j=0;$j<80;$j++){if($socket=@fsockopen('127.0.0.1',$port,$errno,$error,.1)){fclose($socket);break;}usleep(50000);}$clients[]=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:'.$port,'http_errors'=>false,'timeout'=>25]);} + $enter=function($role,$i=0,$query=[])use(&$sessions,$clients){$jar=new GuzzleHttp\Cookie\CookieJar;$r=$clients[$i]->get('/qa/enter/'.$role,['cookies'=>$jar,'query'=>$query]);$sessions[$role.$i]=['jar'=>$jar]+json_decode((string)$r->getBody(),true,32,JSON_THROW_ON_ERROR);};$options=function($role,$i=0,$data=null,$headers=[])use(&$sessions){$v=$sessions[$role.$i];$o=['cookies'=>$v['jar'],'headers'=>$headers+['Accept'=>'application/json','X-SGF-Context'=>$v['context'],'X-CSRF-TOKEN'=>$v['csrf']]];if($data!==null)$o['json']=$data;return $o;};$call=function($role,$path,$data=null,$i=0,$headers=[])use($clients,$options,$s){$r=$clients[$i]->request($data===null?'GET':'POST',$path,$options($role,$i,$data,$headers));$text=(string)$r->getBody();if($r->getStatusCode()>=500)file_put_contents($s['root'].'/purchasing-continuity-last-500.txt',$text);return ['status'=>$r->getStatusCode(),'data'=>json_decode($text,true),'body'=>$text];};foreach(['actor','issuer','validator','reviewer','auditor','requester','approver']as$role)$enter($role);$enter('issuer',1);$enter('auditor',1);$base='/api/purchasing-invoices'; + require dirname(__DIR__).'/scripts/purchasing-continuity-read-body.php'; +}finally{foreach($servers as$i=>$server){$server->stop(2);file_put_contents($s['root'].'/purchasing-continuity-http-'.$i.'.log',$server->getOutput().$server->getErrorOutput());}} diff --git a/scripts/purchasing-focus-assets.mjs b/scripts/purchasing-focus-assets.mjs new file mode 100644 index 0000000..b758a44 --- /dev/null +++ b/scripts/purchasing-focus-assets.mjs @@ -0,0 +1,2 @@ +import fs from 'node:fs';import path from 'node:path';import assert from 'node:assert/strict';import crypto from 'node:crypto';import {spawnSync} from 'node:child_process'; +const tag=process.argv[2];assert(/^[a-f0-9]{12}$/.test(tag??''));const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),root=path.join(run.root,'private/receipt-composition-'+tag),s=JSON.parse(fs.readFileSync(path.join(root,'state.json'))),out=path.join(root,'purchasing-focus-assets.json');assert(s.focus&&!fs.existsSync(out));if(!fs.existsSync(path.join(root,'purchasing-focus-build.log'))){const result=spawnSync(process.execPath,['node_modules/vite/bin/vite.js','build','--outDir',path.join(s.app,'public/build')],{cwd:process.cwd(),encoding:'utf8',windowsHide:true,timeout:180000});fs.writeFileSync(path.join(root,'purchasing-focus-build.log'),result.stdout+'\n'+result.stderr);assert.equal(result.status,0,'private build');}else assert(fs.readFileSync(path.join(root,'purchasing-focus-build.log'),'utf8').includes('built in'),'prior build succeeded');const manifest=JSON.parse(fs.readFileSync(path.join(s.app,'public/build/manifest.json'))),files=Object.values(manifest).flatMap(v=>[v.file,...(v.css??[])]),checks=['private frontend build succeeds'];for(const file of files){const bytes=fs.readFileSync(path.join(s.app,'public/build',file)),r=await fetch('http://127.0.0.1:8078/build/'+file);assert.equal(r.status,200);assert.equal(crypto.createHash('sha256').update(Buffer.from(await r.arrayBuffer())).digest('hex'),crypto.createHash('sha256').update(bytes).digest('hex'));}checks.push('served built assets match private build');const r=await fetch('http://127.0.0.1:8078/purchasing-focus.mjs');assert.equal(r.status,200);checks.push('purchasing focus module is served through private static whitelist');fs.writeFileSync(out,JSON.stringify({passed:true,checks,assets:files,visual_review:false},null,2));console.log(JSON.stringify({passed:true,checks:checks.length})); diff --git a/scripts/purchasing-focus-demo.php b/scripts/purchasing-focus-demo.php new file mode 100644 index 0000000..b20a1a5 --- /dev/null +++ b/scripts/purchasing-focus-demo.php @@ -0,0 +1,5 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.focus_demo'=>$s['nativeConnection']]);$db=DB::connection('focus_demo');$checks=[];$ok=function($v,$name)use(&$checks){if(!$v)throw new RuntimeException($name);$checks[]=$name;};$fingerprint=fn()=>hash('sha256',json_encode([array_map(fn($t)=>$db->table($t)->orderBy('id')->get(),['suppliers','requisitions','purchase_orders','goods_receipts','receipt_documents','invoices','pa_obligations','audit_logs']),DB::table('permission_grants')->orderBy('id')->get(),DB::table('geo_locations')->orderBy('tenant_id')->orderBy('company_id')->orderBy('unit_key')->orderBy('module_key')->orderBy('kind')->orderBy('entity_id')->orderBy('provider')->get()]));$before=$fingerprint();$ok($db->table('requisitions')->where('tenant_id',$n['tenant'])->count()===0&&$db->table('purchase_orders')->count()===0&&$db->table('goods_receipts')->count()===0&&$db->table('invoices')->count()===0&&$db->table('pa_obligations')->count()===0,'fresh integrated focus demo starts without main business operations');$client=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:8078','http_errors'=>false,'timeout'=>25]);$jar=new GuzzleHttp\Cookie\CookieJar;$r=$client->get('/qa/enter/issuer',['cookies'=>$jar]);$v=json_decode((string)$r->getBody(),true);$options=['cookies'=>$jar,'headers'=>['Accept'=>'application/json','X-SGF-Context'=>$v['context']]]; +foreach(['requests?request=1','sourcing?request=1','orders?award=1','receipts?order=1&receipt=1','invoices?order=1&invoice=1','obligations?invoice=1','dossiers?request=1']as$path){$r=$client->get('/purchasing/'.$path,$options);$ok($r->getStatusCode()===200&&str_contains((string)$r->getBody(),'data-focus-enabled="true"'),'fresh workspace mounts focused reading: '.$path);} +foreach(['/api/purchasing-dossiers/999999','/api/purchasing-obligations/999999']as$path){$r=$client->get($path,$options);$ok($r->getStatusCode()===403,'unknown focus source never grants or creates authority: '.$path);}$r=$client->get('/purchasing-focus.mjs');$ok($r->getStatusCode()===200&&hash('sha256',(string)$r->getBody())===hash_file('sha256',$s['app'].'/public/purchasing-focus.mjs'),'shared focus module is served with exact private source bytes');$ok($fingerprint()===$before,'demonstration probes preserve selected business tables grants geography and native audit');file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'before'=>$before,'after'=>$fingerprint(),'visual_review'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." purchasing focus demonstration checks passed.\n"; diff --git a/scripts/purchasing-focus-read-body.php b/scripts/purchasing-focus-read-body.php new file mode 100644 index 0000000..9cef46a --- /dev/null +++ b/scripts/purchasing-focus-read-body.php @@ -0,0 +1,23 @@ +select("SELECT tablename FROM pg_tables WHERE schemaname='public' ORDER BY tablename")as$table){if(!preg_match('/^[a-z0-9_]+$/D',$table->tablename))throw new LogicException('Unexpected fixture table');$name=$table->tablename;$row=$connection->selectOne('SELECT count(*) n,md5(coalesce(string_agg(row_to_json(t)::text,\'\' ORDER BY row_to_json(t)::text),\'\')) h FROM "'.$name.'" t');$result[$name]=[(int)$row->n,$row->h];}$result['sequences']=$connection->select("SELECT sequencename,last_value FROM pg_sequences WHERE schemaname='public' ORDER BY sequencename");return $result;}; +$before=['host'=>$fingerprint(DB::connection()),'native'=>$fingerprint($db)];$saved=json_decode(file_get_contents($s['original_root'].'/integrated-result.json'),true);$ids=$saved['source_ids'];$request=$ids['request'];$url='/api/purchasing-dossiers/'.$request;$receipt=(int)$db->table('goods_receipts')->where('purchase_order_id',$ids['order'])->value('id'); +$r=$call('issuer',$url);$full=$r['data'];$ok($r['status']===200&&$full['read_only']&&$full['_links'][0]['href']==='/purchasing/requests?request='.$request,'dossier identifies exact existing request without issuing a command'); +$links=$full['_links'];foreach($full['stages']as$stage)foreach($stage['data']??[]as$row)foreach($row['_links']??[]as$link)$links[]=$link;$hrefs=array_values(array_unique(array_column($links,'href'))); +$expected=['/purchasing/requests?request='.$request,'/purchasing/sourcing?request='.$request,'/purchasing/orders?award='.$ids['award'],'/purchasing/receipts?order='.$ids['order'],'/purchasing/invoices?order='.$ids['order'],'/purchasing/receipts?order='.$ids['order'].'&receipt='.$receipt,'/purchasing/invoices?order='.$ids['order'].'&invoice='.$ids['invoice'],'/purchasing/obligations?invoice='.$ids['invoice']];$ok(array_diff($expected,$hrefs)===[]&&array_diff($hrefs,$expected)===[],'all eight contextual links correlate real canonical ids and authorised destination stages'); +foreach($hrefs as$href){$r=$call('issuer',$href);$ok($r['status']===200&&str_contains($r['body'],'data-focus-enabled="true"'),'contextual destination is mounted: '.$href);} +foreach([ + ['/api/purchasing-requests/'.$request,'request','id',$request], + ['/api/purchasing-sourcing/requests/'.$request,'request','id',$request], + ['/api/purchasing-orders/awards/'.$ids['award'],'basis','award',null], + ['/api/purchasing-receipts/orders/'.$ids['order'],'order','id',$ids['order']], + ['/api/purchasing-receipts/history/'.$receipt,'receipt','purchase_order_id',$ids['order']], + ['/api/purchasing-invoices/orders/'.$ids['order'],'order','id',$ids['order']], +]as[$path,$key,$field,$value]){$r=$call('issuer',$path);$ok($r['status']===200&&($value===null?$r['data'][$key][$field]['id']===$ids['award']:$r['data'][$key][$field]===$value),'destination API independently admits expected source: '.$path);} +$r=$call('issuer','/api/purchasing-obligations/'.$ids['invoice']);$ok($r['status']===200&&$r['data']['documents'][0]['local_id']===$ids['invoice']&&$r['data']['obligations'][0]['principal_minor']===10000,'obligation focus resolves the actual invoice and existing canonical100MZN responsibility'); +$r=$call('requester',$url);$owner=$r['data'];$ownerLinks=$owner['_links'];foreach($owner['stages']as$stage)foreach($stage['data']??[]as$row)foreach($row['_links']??[]as$link)$ownerLinks[]=$link;$ok($r['status']===200&&count($ownerLinks)===1&&$ownerLinks[0]['href']==='/purchasing/requests?request='.$request,'request-only dossier reveals no hidden-stage links or record ids');$ok($call('requester','/api/purchasing-invoices/orders/'.$ids['order'])['status']===403&&$call('requester','/api/purchasing-obligations/'.$ids['invoice'])['status']===403,'copied finance links confer no authority on request-only profile'); +$r=$call('actor',$url);$buyerLinks=[];foreach($r['data']['stages']as$stage)foreach($stage['data']??[]as$row)foreach($row['_links']??[]as$link)$buyerLinks[]=$link['href'];$ok($r['status']===200&&!array_filter($buyerLinks,fn($v)=>str_contains($v,'/invoices')||str_contains($v,'/obligations')),'buyer links do not advertise restricted economic stages'); +$ok($call('issuer','/api/purchasing-invoices/orders/'.($db->table('purchase_orders')->where('tenant_id','<>',$n['tenant'])->value('id')??999999))['status']===403&&$call('issuer','/api/purchasing-dossiers/'.$n['foreign_requisition'])['status']===403,'foreign request and foreign or unknown order remain inaccessible at destination and dossier'); +$enter('issuer',1,['module'=>'commercial']);$ok($call('issuer','/api/purchasing-obligations/'.$ids['invoice'],null,1)['status']===409,'link does not switch or bypass active module');$enter('issuer',1,['foreign'=>1]);$ok($call('issuer','/api/purchasing-receipts/history/'.$receipt,null,1)['status']===403,'link does not switch or bypass unit context');$ok($call('issuer','/api/purchasing-orders/awards/'.$ids['award'],null,0,['X-SGF-Context'=>'old'])['status']===409,'stale context token is rechecked in destination API'); +config(['receipt_qa.focus_enabled'=>false]);$sample=['stages'=>['orders'=>['accessible'=>true,'data'=>[['id'=>7]]]]];$ok(app(App\Modules\Purchasing\ProcessNavigation::class)->decorate($sample,['sourcing'=>true],3)===$sample,'disabled navigation leaves existing dossier payload unchanged'); +$after=['host'=>$fingerprint(DB::connection()),'native'=>$fingerprint($db)];$ok(json_encode($before)===json_encode($after),'all reused canonical host/native tables and sequences unchanged by navigation proof');file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'contextual_links'=>count($hrefs),'reused_proof'=>'purchasing-integrated-composition-20261103.json','financial_commands_repeated'=>0,'before_sha256'=>hash('sha256',json_encode($before)),'after_sha256'=>hash('sha256',json_encode($after)),'tables_checked'=>count($before['host'])+count($before['native'])-2,'new_right_names'=>[],'visual_review'=>false,'deployment_capacity_validated'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." purchasing focus read checks passed.\n"; diff --git a/scripts/purchasing-focus-read-overlay.mjs b/scripts/purchasing-focus-read-overlay.mjs new file mode 100644 index 0000000..9684f25 --- /dev/null +++ b/scripts/purchasing-focus-read-overlay.mjs @@ -0,0 +1,8 @@ +import fs from 'node:fs';import path from 'node:path';import crypto from 'node:crypto';import {spawnSync} from 'node:child_process'; +const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),tag=crypto.randomBytes(6).toString('hex'),sourceRoot=path.join(run.root,'private/receipt-composition-b4093c6f6707'),source=JSON.parse(fs.readFileSync(path.join(sourceRoot,'state.json'))),root=path.join(run.root,'private/purchasing-focus-read-'+tag),app=path.join(root,'app'); +if(!JSON.parse(fs.readFileSync(path.join(sourceRoot,'integrated-result.json'))).passed||source.env.DB_DATABASE!=='budget_core_sgf_b4093c6f6707'||source.env.DB_PORT!=='55439'||source.env.SGF_ISOLATED_REGRESSION_RUN!==run.id)throw Error('Owned completed regression book required'); +fs.mkdirSync(root);for(const dir of ['app','bootstrap','config','routes','resources','database','public'])fs.cpSync(dir,path.join(app,dir),{recursive:true,filter:p=>!p.replaceAll('\\','/').includes('bootstrap/cache')});for(const pkg of ['budget-control','payables','general-ledger','module-updates','purchasing'])fs.cpSync(path.join('packages',pkg),path.join(app,'packages',pkg),{recursive:true});fs.symlinkSync(path.resolve('vendor'),path.join(app,'vendor'),'junction');fs.copyFileSync('composer.json',path.join(app,'composer.json'));for(const dir of ['bootstrap/cache','storage/logs','storage/framework/cache/data','storage/framework/views','storage/framework/sessions'])fs.mkdirSync(path.join(app,dir),{recursive:true}); +// Existing bindings, native manifests and business facts remain in place; only application/session files are new. +for(const file of ['fixture.json','native-fixture.json'])fs.copyFileSync(path.join(sourceRoot,file),path.join(root,file)); +const env={...source.env,APP_BASE_PATH:app,SGF_DOSSIERS_QA_ENABLED:'true',SGF_PURCHASING_FOCUS_QA_ENABLED:'true',SESSION_COOKIE:'sgf_dossier_read_'+tag,RECEIPT_COMPOSITION_STATE:path.join(root,'state.json')};const state={...source,root,app,env,focus:true,dossiers:true,read_overlay:true,original_root:sourceRoot};fs.writeFileSync(path.join(root,'state.json'),JSON.stringify(state,null,2)); +const result=spawnSync('C:/laragon/tools/sgf-tempo/php-8.4.27/php.exe',[path.resolve('scripts/purchasing-focus-read-proof.php')],{cwd:app,env,encoding:'utf8',windowsHide:true,timeout:180000});fs.writeFileSync(path.join(root,'read-proof.log'),result.stdout+'\n'+result.stderr);if(result.status!==0||!fs.existsSync(path.join(root,'purchasing-focus-read-result.json')))throw Error('Dossier read proof incomplete; private diagnostics retained '+tag);console.log(JSON.stringify({tag,root,result:result.stdout.trim()})); diff --git a/scripts/purchasing-focus-read-proof.php b/scripts/purchasing-focus-read-proof.php new file mode 100644 index 0000000..75166e3 --- /dev/null +++ b/scripts/purchasing-focus-read-proof.php @@ -0,0 +1,9 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true);$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.sourcing_verify'=>$s['nativeConnection']]);$db=DB::connection('sourcing_verify');$checks=[];$ok=function($v,$name)use(&$checks,$s){if(!$v)throw new RuntimeException($name);$checks[]=$name;file_put_contents($s['root'].'/purchasing-focus-read-progress.json',json_encode($checks,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));};$servers=[];$clients=[];$sessions=[]; +try{ + foreach([0,1]as$i){$socket=stream_socket_server('tcp://127.0.0.1:0');$port=(int)substr(strrchr(stream_socket_get_name($socket,false),':'),1);fclose($socket);$server=new Symfony\Component\Process\Process([PHP_BINARY,'-S','127.0.0.1:'.$port,'-t',$s['app'].'/public',dirname(__DIR__).'/scripts/receipt-composition-http.php'],$s['app'],null,null,180);$server->start();$servers[]=$server;for($j=0;$j<80;$j++){if($socket=@fsockopen('127.0.0.1',$port,$errno,$error,.1)){fclose($socket);break;}usleep(50000);}$clients[]=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:'.$port,'http_errors'=>false,'timeout'=>25]);} + $enter=function($role,$i=0,$query=[])use(&$sessions,$clients){$jar=new GuzzleHttp\Cookie\CookieJar;$r=$clients[$i]->get('/qa/enter/'.$role,['cookies'=>$jar,'query'=>$query]);$sessions[$role.$i]=['jar'=>$jar]+json_decode((string)$r->getBody(),true,32,JSON_THROW_ON_ERROR);};$options=function($role,$i=0,$data=null,$headers=[])use(&$sessions){$v=$sessions[$role.$i];$o=['cookies'=>$v['jar'],'headers'=>$headers+['Accept'=>'application/json','X-SGF-Context'=>$v['context'],'X-CSRF-TOKEN'=>$v['csrf']]];if($data!==null)$o['json']=$data;return $o;};$call=function($role,$path,$data=null,$i=0,$headers=[])use($clients,$options,$s){$r=$clients[$i]->request($data===null?'GET':'POST',$path,$options($role,$i,$data,$headers));$text=(string)$r->getBody();if($r->getStatusCode()>=500)file_put_contents($s['root'].'/purchasing-focus-last-500.txt',$text);return ['status'=>$r->getStatusCode(),'data'=>json_decode($text,true),'body'=>$text];};foreach(['actor','issuer','validator','reviewer','auditor','requester','approver']as$role)$enter($role);$enter('issuer',1);$enter('auditor',1);$base='/api/purchasing-invoices'; + require dirname(__DIR__).'/scripts/purchasing-focus-read-body.php'; +}finally{foreach($servers as$i=>$server){$server->stop(2);file_put_contents($s['root'].'/purchasing-focus-http-'.$i.'.log',$server->getOutput().$server->getErrorOutput());}} diff --git a/scripts/purchasing-focus-ui.mjs b/scripts/purchasing-focus-ui.mjs new file mode 100644 index 0000000..fe81979 --- /dev/null +++ b/scripts/purchasing-focus-ui.mjs @@ -0,0 +1,28 @@ +import fs from 'node:fs';import path from 'node:path';import assert from 'node:assert/strict'; +import {readFocus,focusHref,appendProcessLinks,beginWorkspace} from '../public/purchasing-focus.mjs'; +const tag=process.argv[2];assert(/^[a-f0-9]{12}$/.test(tag??''));const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),root=path.join(run.root,'private/purchasing-focus-read-'+tag),out=path.join(root,'purchasing-focus-ui.json');assert(!fs.existsSync(out));const checks=[],ok=(v,n)=>{assert(v,n);checks.push(n);}; +for(const [stage,query,value]of [['requests','?request=3',{request:3}],['orders','?award=2',{award:2}],['receipts','?order=41&receipt=91',{order:41,receipt:91}],['invoices','?order=41&invoice=77',{order:41,invoice:77}],['obligations','?invoice=77',{invoice:77}]]){assert.deepEqual(readFocus(stage,query),value);checks.push('strict focus parser admits '+stage);} +for(const query of ['?order=0','?order=-1','?order=01','?order=1.5','?order=9007199254740992','?order=1&order=2','?receipt=3','?order=1&url=https://example.com','?order=1e2','?order=%3Cscript%3E']){assert.throws(()=>readFocus('receipts',query));checks.push('strict focus parser refuses '+query);} +ok(readFocus('requests','')===null&&focusHref('orders',{award:2})==='/purchasing/orders?award=2','empty focus never selects a record and generated href is local and explicit'); +class Element{constructor(tag,text){this.tag=tag;this.textContent=text??'';this.children=[];this.dataset={focusEnabled:'true',context:'qa-context',csrf:'qa-csrf'};this.isConnected=true;}append(...nodes){this.children.push(...nodes);}prepend(...nodes){this.children.unshift(...nodes);}replaceChildren(...nodes){this.children=[...nodes];}setAttribute(k,v){this[k]=v;}dispatchEvent(){} } +globalThis.Option=class extends Element{constructor(text,value){super('option',text);this.value=value;}};globalThis.FormData=class{*[Symbol.iterator](){} };const walk=e=>[e,...e.children.flatMap(walk)],paginator=data=>({data,current_page:1,last_page:1,per_page:25,total:data.length}),rev='a'.repeat(64),calls=[];let elements=new Map,mismatchReceipt=false; +globalThis.document={createElement:tag=>new Element(tag),querySelector:selector=>{if(!elements.has(selector))elements.set(selector,new Element(selector));return elements.get(selector);}}; +const request={id:3,number:'REQ-EXACT',status:'approved',items:[],steps:[],total_minor:10000,process_version:3};const invoice={id:77,number:'INV-EXACT',status:'validated',issued_on:'2026-11-03',total_minor:10000,created_by:1,validated_by:2,items:[],purchase_order_id:41}; +const responses={ + '/api/purchasing-requests':{new_revision:rev,centres:[],can_prepare:false,requests:paginator([])},'/api/purchasing-requests/3':{request,capabilities:{},history:[],revision:rev}, + '/api/purchasing-sourcing/requests/3':{request,capabilities:{},comparison:{policy:{minimum_proposals:3,minimum_evaluators:2},ready:true,rows:[],top_ids:[]},quotes:[],award:{id:2,status:'approved',total_minor:10000,approvals:[]},history:[]}, + '/api/purchasing-orders/awards/2':{basis:{award:{id:2,status:'approved',approvals:[],total_minor:10000},quote:{supplier:{name:'QA'},items:[],currency:'MZN'}},existing:{order:{id:41,number:'OC-EXACT',items:[]}},can_issue:false}, + '/api/purchasing-receipts/orders/41':{order:{id:41,number:'OC-EXACT'},progress:{state:'complete'},history:{...paginator([]),last_page:2},can_confirm:false}, + '/api/purchasing-receipts/history/91':{receipt:{id:91,purchase_order_id:41,number:'REC-EXACT'},documents_enabled:false}, + '/api/purchasing-invoices/orders/41':{order:{id:41,number:'OC-EXACT',currency:'MZN',items:[]},invoices:[invoice],can_prepare:false,revision:rev,receipt_progress:{},physical_corrections:[]}, + '/api/purchasing-obligations/77':{documents:[{local_id:77,number:'INV-EXACT',supplier_name:'QA',total_minor:10000,status:'validated',order_id:41,missing:[],lines:[]}],obligations:[],permissions:{},proposals:[],events:[],revision:rev,pagination:{proposals:{page:1,last_page:1},events:{page:1,last_page:1}}}, + '/api/purchasing-dossiers/3':{request,view_revision:rev,_links:[{href:'/purchasing/requests?request=3',label:'Consultar esta requisição'}],stages:Object.fromEntries(['quotes','awards','orders','receipts','invoices','obligations'].map(k=>[k,{accessible:false}])),events:{accessible:true,data:[],pagination:{page:1,last_page:1}}} +}; +globalThis.fetch=async(url,options={})=>{calls.push({url,method:options.method??'GET'});const pathname=url.split('?')[0];let data=responses[pathname];if(!data&&(/\/history$/.test(pathname)||/^\/api\/purchasing-(sourcing|orders|receipts|invoices|obligations|dossiers)$/.test(pathname)))data=paginator([]);if(!data)throw Error('Unexpected mock read '+url);if(mismatchReceipt&&pathname==='/api/purchasing-receipts/history/91')data={receipt:{id:91,purchase_order_id:42,number:'REC-MISMATCH'},documents_enabled:false};return {ok:true,json:async()=>structuredClone(data)};}; +const settle=()=>new Promise(resolve=>setTimeout(resolve,10));let sequence=0;async function mount(file,query){elements=new Map;calls.length=0;globalThis.location={search:query};await import('../public/'+file+'.mjs?case='+tag+'-'+sequence++);await settle();await settle();return {calls:[...calls],detail:document.querySelector(file==='order-workspace'?'#award-detail':file==='sourcing-workspace'?'#process-detail':'#detail'),status:document.querySelector(file==='receipt-workspace'?'#message':'#status')};} +for(const [file,query,target,text]of [['request-workspace','?request=3','/api/purchasing-requests/3','REQ-EXACT'],['sourcing-workspace','?request=3','/api/purchasing-sourcing/requests/3','REQ-EXACT'],['order-workspace','?award=2','/api/purchasing-orders/awards/2','OC-EXACT'],['receipt-workspace','?order=41&receipt=91','/api/purchasing-receipts/history/91','REC-EXACT'],['supplier-invoice-workspace','?order=41&invoice=77','/api/purchasing-invoices/orders/41','INV-EXACT'],['supplier-obligation-workspace','?invoice=77','/api/purchasing-obligations/77','INV-EXACT'],['purchasing-dossier','?request=3','/api/purchasing-dossiers/3','REQ-EXACT']]){const d=await mount(file,query);ok(d.calls.some(c=>c.url.split('?')[0]===target)&&walk(d.detail).some(e=>e.textContent.includes(text)),'actual '+file+' opens exact focused source even when absent from first list page');ok(d.calls.every(c=>c.method==='GET'),'actual '+file+' startup never prepares or confirms a business operation');} +let d=await mount('supplier-invoice-workspace','?order=41&invoice=999');ok(d.status.textContent.includes('não pertence')&&!walk(d.detail).some(e=>e.textContent.includes('INV-EXACT')),'invoice of another or unknown order is not substituted with first available document');mismatchReceipt=true;d=await mount('receipt-workspace','?order=41&receipt=91');ok(d.status.textContent.includes('não pertence')&&!walk(d.detail).some(e=>e.textContent.includes('REC-MISMATCH')),'receipt parent mismatch is reported before rendering receipt evidence');mismatchReceipt=false; +d=await mount('order-workspace','?award=2&award=3');ok(d.status.textContent.includes('Atalho inválido')&&!d.calls.some(c=>c.url.includes('/awards/')),'ambiguous initial link performs list reads only and chooses no award'); +const links=new Element('div');appendProcessLinks(links,[{href:'https://example.com',label:'external'},{href:'/purchasing/orders?award=2&award=3',label:'duplicate'},{href:'/purchasing/orders?award=2',label:'safe'}]);ok(links.children.length===1&&links.children[0].href==='/purchasing/orders?award=2','link renderer rejects external and duplicated-parameter hints'); +let generation=0,release,opened=0;const pending=beginWorkspace({stage:'orders',root:new Element('root'),load:()=>{generation++;return new Promise(resolve=>{release=resolve;});},open:()=>{opened++;},current:()=>generation,error:()=>{},search:'?award=2'});generation++;release();await pending;ok(opened===0,'interaction during initial list request cancels late automatic focus');let listed=0;await beginWorkspace({stage:'orders',root:Object.assign(new Element('root'),{dataset:{focusEnabled:'false'}}),load:async()=>{listed++;},open:()=>{opened++;},current:()=>0,error:()=>{},search:'?award=2'});ok(listed===1&&opened===0,'disabled feature preserves list startup without focused read'); +fs.writeFileSync(out,JSON.stringify({passed:true,checks,dom_simulation:true,business_commands:0,visual_review:false},null,2));console.log(JSON.stringify({passed:true,checks:checks.length})); diff --git a/scripts/purchasing-integrated-assets.mjs b/scripts/purchasing-integrated-assets.mjs new file mode 100644 index 0000000..255f5f5 --- /dev/null +++ b/scripts/purchasing-integrated-assets.mjs @@ -0,0 +1,2 @@ +import fs from 'node:fs';import path from 'node:path';import assert from 'node:assert/strict';import crypto from 'node:crypto';import {spawnSync} from 'node:child_process'; +const tag=process.argv[2];assert(/^[a-f0-9]{12}$/.test(tag??''));const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),root=path.join(run.root,'private/receipt-composition-'+tag),s=JSON.parse(fs.readFileSync(path.join(root,'state.json'))),out=path.join(root,'integrated-demo-assets.json');assert(s.integrated&&!fs.existsSync(out));if(!fs.existsSync(path.join(root,'integrated-build.log'))){const result=spawnSync(process.execPath,['node_modules/vite/bin/vite.js','build','--outDir',path.join(s.app,'public/build')],{cwd:process.cwd(),encoding:'utf8',windowsHide:true,timeout:180000});fs.writeFileSync(path.join(root,'integrated-build.log'),result.stdout+'\n'+result.stderr);assert.equal(result.status,0,'private build');}else assert(fs.readFileSync(path.join(root,'integrated-build.log'),'utf8').includes('built in'),'prior build succeeded');const manifest=JSON.parse(fs.readFileSync(path.join(s.app,'public/build/manifest.json'))),files=Object.values(manifest).flatMap(v=>[v.file,...(v.css??[])]),checks=['private frontend build succeeds'];for(const file of files){const bytes=fs.readFileSync(path.join(s.app,'public/build',file)),r=await fetch('http://127.0.0.1:8072/build/'+file);assert.equal(r.status,200);assert.equal(crypto.createHash('sha256').update(Buffer.from(await r.arrayBuffer())).digest('hex'),crypto.createHash('sha256').update(bytes).digest('hex'));}checks.push('served built assets match private build');const r=await fetch('http://127.0.0.1:8072/supplier-obligation-workspace.mjs');assert.equal(r.status,200);checks.push('obligation module is served through private static whitelist');fs.writeFileSync(out,JSON.stringify({passed:true,checks,assets:files,visual_review:false},null,2));console.log(JSON.stringify({passed:true,checks:checks.length})); diff --git a/scripts/purchasing-integrated-body.php b/scripts/purchasing-integrated-body.php new file mode 100644 index 0000000..ccce028 --- /dev/null +++ b/scripts/purchasing-integrated-body.php @@ -0,0 +1,37 @@ +orderBy('id')->get())); +$ok($db->table('requisitions')->where('tenant_id',$n['tenant'])->count()===0&&$db->table('pa_obligations')->count()===0,'single composition begins before request and debt'); +$r=$call('actor','/purchasing/workspace');$ok($r['status']===200&&str_contains($r['body'],'/purchasing/sourcing')&&str_contains($r['body'],'/purchasing/requests')&&!str_contains($r['body'],'href="/purchasing/obligations"'),'buyer navigation includes only existing authorised stages'); +$r=$call('validator','/purchasing/workspace');$ok($r['status']===200&&str_contains($r['body'],'href="/purchasing/receipts"')&&!str_contains($r['body'],'href="/purchasing/invoices"'),'warehouse hub does not expose financial navigation'); +$ok($call('requester','/api/purchasing-requests/'.$n['foreign_requisition'])['status']===403,'foreign source remains isolated in combined book'); +$requestCommand=function($role,$id,$action,$data)use($call){$url='/api/purchasing-requests';$r=$call($role,$id?$url.'/'.$id:$url);$p=$call($role,$url.'/'.$id.'/preview',['operation_key'=>(string)Str::uuid(),'revision'=>$id?$r['data']['revision']:$r['data']['new_revision'],'action'=>$action,'data'=>$data]);if($p['status']!==200)throw new RuntimeException('Request preview '.$p['status']);return $call($role,$url.'/'.$id.'/confirm',['preview'=>$p['data']['preview']]);}; +$r=$requestCommand('requester',0,'save',['cost_center_id'=>$n['centre'],'priority'=>'normal','needed_by'=>date('Y-m-d',strtotime('+30 days')),'justification'=>'Necessidade sintetica integrada sem copiar origens.','items'=>[['description'=>'Material integrado QA','category'=>'Material','purchase_type'=>'consumable','quantity'=>'1.000','unit'=>'UN','unit_price'=>'100.00','tax_rate'=>'0']]]);$request=$r['data']['request_id'];$ok($r['status']===201,'request created through native lifecycle in combined composition'); +$r=$requestCommand('requester',$request,'submit',[]);$ok($r['status']===201&&$r['data']['status']==='pending','submission creates native reservation in same book'); +$r=$requestCommand('approver',$request,'decide',['decision'=>'approved','comment'=>'Aprovacao distinta da necessidade sintetica.']);$ok($r['status']===201&&$r['data']['status']==='approved','distinct head approves new request'); +$src='/api/purchasing-sourcing/requests/'.$request;$r=$call('actor',$src);$ok($r['status']===200&&$r['data']['capabilities']['quote']===true,'approved request flows to sourcing without binding rewrite');$line=(int)$db->table('requisition_items')->where('requisition_id',$request)->value('id'); +$sourceCommand=function($role,$action,$data)use($call,$src){$r=$call($role,$src);$p=$call($role,$src.'/preview',['operation_key'=>(string)Str::uuid(),'revision'=>$r['data']['revision'],'action'=>$action,'data'=>$data]);if($p['status']!==200)throw new RuntimeException('Sourcing '.$action.' preview '.$p['status']);return $call($role,$src.'/confirm',['preview'=>$p['data']['preview']]);}; +$quotes=[];foreach($n['supplier_ids']as$i=>$supplier){$r=$sourceCommand('actor','quote',['supplier_id'=>$supplier,'reference'=>'QA-INTEGRATED-Q'.($i+1),'delivery_days'=>5,'valid_until'=>date('Y-m-d',strtotime('+30 days')),'payment_terms'=>'Condicoes documentais QA sem vencimento presumido','no_conflict'=>true,'items'=>[['requisition_item_id'=>$line,'unit_price'=>(string)(100+$i*20),'discount_type'=>'none','discount_value'=>'0']]]);if($r['status']!==201)throw new RuntimeException('Quotation failed');$quotes[]=$r['data']['quotation_id'];} +$ok(count($quotes)===3&&$db->table('quotations')->where('requisition_id',$request)->count()===3,'three proposals retain new request and original supplier identities'); +foreach($quotes as$quote)foreach(['actor','issuer']as$role){$r=$sourceCommand($role,'evaluate',['quotation_id'=>$quote,'quality'=>'8','history'=>'5','payment'=>'8','comment'=>'Avaliacao individual sintetica integrada.','no_conflict'=>true]);if($r['status']!==201)throw new RuntimeException('Evaluation failed');} +$r=$call('actor',$src);$ok($r['data']['comparison']['ready']===true&&$r['data']['comparison']['top_ids']===[$quotes[0]],'native comparison ready after distinct individual evaluations'); +$r=$sourceCommand('actor','select',['quotation_id'=>$quotes[0],'justification'=>'Escolha individual pela comparacao documentada.','delivery_date'=>date('Y-m-d',strtotime('+7 days')),'delivery_location'=>'Armazem QA']);$award=$r['data']['award_id'];$ok($r['status']===201&&$r['data']['status']==='pending','selection produces pending award rather than implicit approval'); +$r=$sourceCommand('approver','decide',['award_id'=>$award,'decision'=>'approved','comment'=>'Conferencia distinta da adjudicacao integrada.']);$ok($r['status']===201&&$r['data']['status']==='approved','head identity survives invoice and payable composition and approves award'); +$url='/api/purchasing-orders/awards/'.$award;$r=$call('actor',$url);$p=$call('actor',$url.'/preview',['revision'=>$r['data']['revision']]);$r=$call('actor',$url.'/issue',['preview'=>$p['data']['preview']]);$order=$r['data']['order'];$ok($r['status']===201&&$order['requisition_id']===$request,'same award issues canonical order for original new request'); +$receipt='/api/purchasing-receipts/orders/'.$order['id'];$r=$call('validator',$receipt);$p=$call('validator',$receipt.'/preview',['revision'=>$r['data']['revision'],'idempotency_key'=>(string)Str::uuid(),'delivery_note'=>'QA-INTEGRATED-RECEIPT','received_on'=>date('Y-m-d'),'warehouse_id'=>$n['warehouse'],'items'=>[['purchase_order_item_id'=>$order['items'][0]['id'],'received_quantity'=>'1.000','accepted_quantity'=>'1.000','quality_status'=>'compliant','stock_item_id'=>$n['stock'],'notes'=>null]]]);$r=$call('validator',$receipt.'/confirm',['preview'=>$p['data']['preview']]);$ok($r['status']===201&&count($r['data']['movements'])===1,'warehouse receives actual new order without copying financial authority'); +$iv='/api/purchasing-invoices/orders/'.$order['id'];$r=$call('issuer',$iv);$ok($r['status']===200&&$r['data']['can_prepare']===true,'new request origin is visible to invoice finance without static id binding'); +$invoiceCommand=function($role,$action,$data)use($call,$iv){$r=$call($role,$iv);$p=$call($role,$iv.'/preview',['operation_key'=>(string)Str::uuid(),'revision'=>$r['data']['revision'],'action'=>$action,'reason'=>'Conferencia documental sintetica no percurso integrado.','data'=>$data]);if($p['status']!==200)throw new RuntimeException('Invoice preview '.$p['status']);return $call($role,$iv.'/confirm',['preview'=>$p['data']['preview']]);}; +$r=$invoiceCommand('issuer','register',['number'=>'QA-INTEGRATED-INV-100','issued_on'=>date('Y-m-d'),'subtotal'=>'100.00','tax'=>'0.00','total'=>'100.00','items'=>[['purchase_order_item_id'=>$order['items'][0]['id'],'quantity'=>'1.000']]]);$invoice=$r['data']['invoice_id'];$ok($r['status']===201&&$db->table('pa_obligations')->count()===0,'pending document does not recognise debt'); +$r=$invoiceCommand('reviewer','validate',['invoice_id'=>$invoice]);$ok($r['status']===201&&$r['data']['status']==='validated'&&$db->table('pa_obligations')->count()===0,'distinct document matching consumes original budget without implicit recognition'); +$url='/api/purchasing-obligations/'.$invoice;$r=$call('issuer',$url);$ok($r['status']===200&&$r['data']['documents'][0]['missing']===[],'new validated invoice reaches same native payable source'); +$payable=function($role,$action,$proposal=0)use($call,$url){$r=$call($role,$url);$p=$call($role,$url.'/preview',['operation_key'=>(string)Str::uuid(),'revision'=>$r['data']['revision'],'action'=>$action,'proposal_id'=>$proposal,'reason'=>'Responsabilidade sintetica conferida individualmente.']);if($p['status']!==200)throw new RuntimeException('Payable preview '.$p['status']);return $call($role,$url.'/confirm',['preview'=>$p['data']['preview']]);}; +$r=$payable('issuer','prepare');$proposal=$r['data']['proposal_id'];$ok($r['status']===201&&$r['data']['state']==='prepared','explicit preparation retains invoice snapshot');$r=$payable('reviewer','validate',$proposal);$ok($r['status']===201&&$r['data']['state']==='recognised','distinct person recognises same invoice responsibility'); +$r=$call('issuer',$url);$position=$r['data']['obligations'][0];$ok($position['principal_minor']===10000&&$position['balance_minor']===10000&&$position['due_on']===null&&$position['source_conflict']===false,'single100MZN principal and balance with unknown maturity'); +$ok($db->table('budget_entries')->where('requisition_id',$request)->where('kind','reserve')->count()===1&&$db->table('budget_entries')->where('requisition_id',$request)->where('kind','commit')->count()===1&&$db->table('budget_consumptions')->where('invoice_id',$invoice)->count()===1&&(int)$db->table('budget_consumptions')->sum('amount_minor')===10000,'one reservation commitment and100MZN consumption in canonical budget'); +$ok($db->table('pa_obligations')->count()===1&&$db->table('pa_events')->where('kind','payable.recognised')->count()===1&&$db->table('stock_movements')->count()===1&&$db->table('external_payments')->count()===0,'complete path leaves one debt and physical effect without payments'); +$ok(hash('sha256',json_encode(DB::table('cb_budget_entries')->orderBy('id')->get()))===$hostBudgetBefore,'host budget entries unchanged through complete native path'); +$r=$call('actor','/api/purchasing-suppliers/'.$n['supplier_ids'][0]);$ok($r['status']===200&&$r['data']['geography_enabled']===true,'supplier registry and common geography mounted alongside complete financial path'); +$r=$call('actor','/api/geography/entities/company/'.$f['company']);$ok($r['status']===200&&$r['data']['location']===null&&DB::table('geo_locations')->count()===0,'composition does not assign company or supplier locations automatically'); +$enter('issuer',1,['module'=>'commercial']);$ok($call('issuer',$url,null,1)['status']===409&&$call('issuer','/purchasing/workspace',null,1)['status']===409,'module boundary remains enforced on hub and final responsibility');$enter('issuer',1,['foreign'=>1]);$ok($call('issuer',$url,null,1)['status']===403,'unmapped unit cannot inspect integrated responsibility'); +$ok($call('validator',$url)['status']===403&&$call('requester',$iv)['status']===403,'stage roles do not gain economic rights through shared navigation'); +file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'same_context_whole_purchasing_path'=>true,'source_ids'=>['request'=>$request,'award'=>$award,'order'=>$order['id'],'invoice'=>$invoice,'obligation'=>$position['id']],'quotes'=>3,'evaluations'=>6,'principal_minor'=>10000,'native_consumption_minor'=>10000,'host_budget_unchanged'=>true,'new_right_names'=>[],'automatic_geography_assignments'=>0,'payments_created'=>0,'ledger_posted'=>false,'visual_review'=>false,'deployment_capacity_validated'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." integrated purchasing checks passed.\n"; diff --git a/scripts/purchasing-integrated-proof.php b/scripts/purchasing-integrated-proof.php new file mode 100644 index 0000000..5889f2b --- /dev/null +++ b/scripts/purchasing-integrated-proof.php @@ -0,0 +1,9 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true);$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.sourcing_verify'=>$s['nativeConnection']]);$db=DB::connection('sourcing_verify');$checks=[];$ok=function($v,$name)use(&$checks,$s){if(!$v)throw new RuntimeException($name);$checks[]=$name;file_put_contents($s['root'].'/integrated-progress.json',json_encode($checks,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));};$servers=[];$clients=[];$sessions=[]; +try{ + foreach([0,1]as$i){$socket=stream_socket_server('tcp://127.0.0.1:0');$port=(int)substr(strrchr(stream_socket_get_name($socket,false),':'),1);fclose($socket);$server=new Symfony\Component\Process\Process([PHP_BINARY,'-S','127.0.0.1:'.$port,'-t',$s['app'].'/public',dirname(__DIR__).'/scripts/receipt-composition-http.php'],$s['app'],null,null,180);$server->start();$servers[]=$server;for($j=0;$j<80;$j++){if($socket=@fsockopen('127.0.0.1',$port,$errno,$error,.1)){fclose($socket);break;}usleep(50000);}$clients[]=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:'.$port,'http_errors'=>false,'timeout'=>25]);} + $enter=function($role,$i=0,$query=[])use(&$sessions,$clients){$jar=new GuzzleHttp\Cookie\CookieJar;$r=$clients[$i]->get('/qa/enter/'.$role,['cookies'=>$jar,'query'=>$query]);$sessions[$role.$i]=['jar'=>$jar]+json_decode((string)$r->getBody(),true,32,JSON_THROW_ON_ERROR);};$options=function($role,$i=0,$data=null,$headers=[])use(&$sessions){$v=$sessions[$role.$i];$o=['cookies'=>$v['jar'],'headers'=>$headers+['Accept'=>'application/json','X-SGF-Context'=>$v['context'],'X-CSRF-TOKEN'=>$v['csrf']]];if($data!==null)$o['json']=$data;return $o;};$call=function($role,$path,$data=null,$i=0,$headers=[])use($clients,$options,$s){$r=$clients[$i]->request($data===null?'GET':'POST',$path,$options($role,$i,$data,$headers));$text=(string)$r->getBody();if($r->getStatusCode()>=500)file_put_contents($s['root'].'/integrated-last-500.txt',$text);return ['status'=>$r->getStatusCode(),'data'=>json_decode($text,true),'body'=>$text];};foreach(['actor','issuer','validator','reviewer','auditor','requester','approver']as$role)$enter($role);$enter('issuer',1);$enter('auditor',1);$base='/api/purchasing-invoices'; + require dirname(__DIR__).'/scripts/purchasing-integrated-body.php'; +}finally{foreach($servers as$i=>$server){$server->stop(2);file_put_contents($s['root'].'/integrated-http-'.$i.'.log',$server->getOutput().$server->getErrorOutput());}} diff --git a/scripts/purchasing-integrated-resume.php b/scripts/purchasing-integrated-resume.php new file mode 100644 index 0000000..00f6d58 --- /dev/null +++ b/scripts/purchasing-integrated-resume.php @@ -0,0 +1,9 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true);$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.sourcing_verify'=>$s['nativeConnection']]);$db=DB::connection('sourcing_verify');$checks=[];$ok=function($v,$name)use(&$checks,$s){if(!$v)throw new RuntimeException($name);$checks[]=$name;file_put_contents($s['root'].'/integrated-progress.json',json_encode($checks,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));};$servers=[];$clients=[];$sessions=[]; +try{ + foreach([0,1]as$i){$socket=stream_socket_server('tcp://127.0.0.1:0');$port=(int)substr(strrchr(stream_socket_get_name($socket,false),':'),1);fclose($socket);$server=new Symfony\Component\Process\Process([PHP_BINARY,'-S','127.0.0.1:'.$port,'-t',$s['app'].'/public',dirname(__DIR__).'/scripts/receipt-composition-http.php'],$s['app'],null,null,180);$server->start();$servers[]=$server;for($j=0;$j<80;$j++){if($socket=@fsockopen('127.0.0.1',$port,$errno,$error,.1)){fclose($socket);break;}usleep(50000);}$clients[]=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:'.$port,'http_errors'=>false,'timeout'=>25]);} + $enter=function($role,$i=0,$query=[])use(&$sessions,$clients){$jar=new GuzzleHttp\Cookie\CookieJar;$r=$clients[$i]->get('/qa/enter/'.$role,['cookies'=>$jar,'query'=>$query]);$sessions[$role.$i]=['jar'=>$jar]+json_decode((string)$r->getBody(),true,32,JSON_THROW_ON_ERROR);};$options=function($role,$i=0,$data=null,$headers=[])use(&$sessions){$v=$sessions[$role.$i];$o=['cookies'=>$v['jar'],'headers'=>$headers+['Accept'=>'application/json','X-SGF-Context'=>$v['context'],'X-CSRF-TOKEN'=>$v['csrf']]];if($data!==null)$o['json']=$data;return $o;};$call=function($role,$path,$data=null,$i=0,$headers=[])use($clients,$options,$s){$r=$clients[$i]->request($data===null?'GET':'POST',$path,$options($role,$i,$data,$headers));$text=(string)$r->getBody();if($r->getStatusCode()>=500)file_put_contents($s['root'].'/integrated-last-500.txt',$text);return ['status'=>$r->getStatusCode(),'data'=>json_decode($text,true),'body'=>$text];};foreach(['actor','issuer','validator','reviewer','auditor','requester','approver']as$role)$enter($role);$enter('issuer',1);$enter('auditor',1);$base='/api/purchasing-invoices'; + require dirname(__DIR__).'/scripts/purchasing-integrated-tail.php'; +}finally{foreach($servers as$i=>$server){$server->stop(2);file_put_contents($s['root'].'/integrated-resume-http-'.$i.'.log',$server->getOutput().$server->getErrorOutput());}} diff --git a/scripts/purchasing-integrated-setup.php b/scripts/purchasing-integrated-setup.php new file mode 100644 index 0000000..66f71a4 --- /dev/null +++ b/scripts/purchasing-integrated-setup.php @@ -0,0 +1,9 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();App\Modules\Purchasing\BudgetAdapter::guard(); +$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.integrated_setup'=>$s['nativeConnection']]);$db=DB::connection('integrated_setup');$counts=[]; +foreach(['requisitions','quotations','purchase_awards','purchase_orders','goods_receipts','invoices','budget_consumptions','pa_proposals','pa_obligations','external_payments']as$t){$counts[$t]=$db->table($t)->where('tenant_id',$n['tenant'])->count();if($counts[$t]!==0)throw new LogicException('Integrated main book must start empty: '.$t);} +if((int)$db->table('budget_entries')->where('tenant_id',$n['tenant'])->sum('reserved_minor')!==0||(int)$db->table('budget_entries')->where('tenant_id',$n['tenant'])->sum('committed_minor')!==0)throw new LogicException('No main reservation or commitment before request'); +foreach(['request','supplier','sourcing','order','geography','invoice','obligation']as$mode)if(!is_file($s['root'].'/'.$mode.'-baseline.json'))throw new LogicException('Composition missing '.$mode); +file_put_contents($s['root'].'/integrated-baseline.json',json_encode(['passed'=>true,'main_counts'=>$counts,'native_reserved_minor'=>0,'native_committed_minor'=>0,'prepared_suppliers'=>3,'geography_rows'=>DB::table('geo_territories')->count(),'automatic_localisations'=>DB::table('geo_locations')->count(),'new_permission_names'=>[],'same_native_book'=>true,'previous_fixtures_upgraded'=>false,'visual_review'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); diff --git a/scripts/purchasing-integrated-smoke.php b/scripts/purchasing-integrated-smoke.php new file mode 100644 index 0000000..bf14d8f --- /dev/null +++ b/scripts/purchasing-integrated-smoke.php @@ -0,0 +1,11 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true);$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.demo_verify'=>$s['nativeConnection']]);$db=DB::connection('demo_verify');$checks=[];$ok=function($v,$name)use(&$checks){if(!$v)throw new RuntimeException($name);$checks[]=$name;}; +$fingerprint=function()use($db){$rows=[];foreach(['requisitions','quotations','proposal_evaluations','purchase_awards','purchase_orders','goods_receipts','stock_movements','invoices','budget_entries','budget_consumptions','pa_proposals','pa_obligations','pa_commands','pa_events','audit_logs','external_payments']as$t)$rows['native:'.$t]=$db->table($t)->orderBy('id')->get();foreach(['geo_locations','geo_location_history','geo_commands','cb_budget_entries']as$t)$rows['host:'.$t]=DB::table($t)->get();return hash('sha256',json_encode($rows));};$before=$fingerprint(); +foreach(['requisitions','quotations','purchase_awards','purchase_orders','goods_receipts','invoices','pa_proposals','pa_obligations']as$t)$ok($db->table($t)->where('tenant_id',$n['tenant'])->count()===0,'live main book starts without '.$t); +$client=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:8072','http_errors'=>false,'timeout'=>25]); +foreach(['requester','approver','actor','validator','issuer','reviewer','auditor']as$role){$jar=new GuzzleHttp\Cookie\CookieJar;$r=$client->get('/qa/enter/'.$role,['cookies'=>$jar]);$v=json_decode((string)$r->getBody(),true);$o=['cookies'=>$jar,'headers'=>['Accept'=>'application/json','X-SGF-Context'=>$v['context']]];$r=$client->get('/purchasing/workspace',$o);$body=(string)$r->getBody();$ok($r->getStatusCode()===200&&str_contains($body,'aria-label="Etapas de Compras"'),'workspace live for '.$role);if($role==='validator')$ok(str_contains($body,'href="/purchasing/receipts"')&&!str_contains($body,'href="/purchasing/invoices"'),'warehouse sees physical stage without invoice economics'); + $path=match($role){'requester','approver'=>'/purchasing/requests','actor'=>'/purchasing/sourcing','validator'=>'/purchasing/receipts','issuer'=>'/purchasing/invoices',default=>'/purchasing/obligations'};$r=$client->get($path,$o);$ok($r->getStatusCode()===200&&str_contains((string)$r->getBody(),'aria-label="Etapas de Compras"'),'stage shares permission-aware navigation for '.$role); +} +$ok(DB::table('geo_territories')->count()===20407&&DB::table('geo_locations')->count()===0,'same host contains pinned reference without automatic localisation');$ok($fingerprint()===$before,'live navigation and screens preserve all business geography and budget evidence'); +file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'before'=>$before,'after'=>$fingerprint(),'initial_main_operations'=>0,'automatic_locations'=>0,'visual_review'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." integrated demonstration checks passed.\n"; diff --git a/scripts/purchasing-integrated-tail.php b/scripts/purchasing-integrated-tail.php new file mode 100644 index 0000000..af6bf04 --- /dev/null +++ b/scripts/purchasing-integrated-tail.php @@ -0,0 +1,7 @@ +table('pa_obligations')->count()!==1)throw new LogicException('Recorded integrated path required'); +$request=(int)$db->table('requisitions')->where('tenant_id',$n['tenant'])->value('id');$award=(int)$db->table('purchase_awards')->value('id');$order=['id'=>(int)$db->table('purchase_orders')->value('id')];$invoice=(int)$db->table('invoices')->value('id');$url='/api/purchasing-obligations/'.$invoice;$iv='/api/purchasing-invoices/orders/'.$order['id'];$r=$call('issuer',$url);$position=$r['data']['obligations'][0]; +$enter('issuer',1,['module'=>'commercial']);$ok($call('issuer',$url,null,1)['status']===409&&$call('issuer','/purchasing/workspace',null,1)['status']===409,'module boundary remains enforced on hub and final responsibility');$enter('issuer',1,['foreign'=>1]);$ok($call('issuer',$url,null,1)['status']===403,'unmapped unit cannot inspect integrated responsibility'); +$ok($call('validator',$url)['status']===403&&$call('requester',$iv)['status']===403,'stage roles do not gain economic rights through shared navigation'); +file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'same_context_whole_purchasing_path'=>true,'source_ids'=>['request'=>$request,'award'=>$award,'order'=>$order['id'],'invoice'=>$invoice,'obligation'=>$position['id']],'quotes'=>3,'evaluations'=>6,'principal_minor'=>10000,'native_consumption_minor'=>10000,'host_budget_unchanged'=>true,'new_right_names'=>[],'automatic_geography_assignments'=>0,'payments_created'=>0,'ledger_posted'=>false,'visual_review'=>false,'deployment_capacity_validated'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." integrated purchasing checks passed.\n"; diff --git a/scripts/purchasing-navigation-guard.php b/scripts/purchasing-navigation-guard.php new file mode 100644 index 0000000..8cef370 --- /dev/null +++ b/scripts/purchasing-navigation-guard.php @@ -0,0 +1,10 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$queries=0;DB::listen(function()use(&$queries){$queries++;});$checks=[]; +$nav=new App\Modules\Purchasing\WorkspaceNavigation; +config(['receipt_qa.enabled'=>false]);if($nav->links()!==[])throw new RuntimeException('Disabled links');$checks[]='disabled composition exposes no navigation'; +try{$nav->screen(new Illuminate\Http\Request,new App\Modules\Purchasing\ReceiptRuntime);throw new RuntimeException('Disabled hub accepted');}catch(Symfony\Component\HttpKernel\Exception\HttpException $e){if($e->getStatusCode()!==404)throw $e;}$checks[]='disabled hub returns404 before any database read'; +config(['receipt_qa.enabled'=>true]);$app->instance('env','production');if($nav->links()!==[])throw new RuntimeException('Production links');$checks[]='production cannot discover synthetic navigation'; +try{$nav->screen(new Illuminate\Http\Request,new App\Modules\Purchasing\ReceiptRuntime);throw new RuntimeException('Production accepted');}catch(Symfony\Component\HttpKernel\Exception\HttpException $e){if($e->getStatusCode()!==403)throw $e;}$checks[]='production hub refuses without SQL'; +if($queries!==0||App\Shared\Context\ModuleNavigation::owner('purchasing/workspace')!=='purchasing')throw new RuntimeException('Guard isolation');$checks[]='hub belongs to purchasing and guard probes issue zero SQL'; +file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'database_queries'=>$queries],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." navigation guard checks passed.\n"; diff --git a/scripts/purchasing-single-installation.mjs b/scripts/purchasing-single-installation.mjs new file mode 100644 index 0000000..23d0b65 --- /dev/null +++ b/scripts/purchasing-single-installation.mjs @@ -0,0 +1,22 @@ +import fs from 'node:fs';import path from 'node:path';import crypto from 'node:crypto';import net from 'node:net';import {spawn,spawnSync} from 'node:child_process'; +const command=process.argv[2]??'status';if(!['status','update','start'].includes(command))throw Error('Use status, start or update; no provisioning action exists'); +const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),tag='cc50a276c10c',root=path.join(run.root,'private/receipt-composition-'+tag),s=JSON.parse(fs.readFileSync(path.join(root,'state.json'))),server=JSON.parse(fs.readFileSync(path.join(root,'demo-server.json'))); +if(run.port!==55439||s.tag!==tag||server.port!==8085||s.env.DB_DATABASE!=='budget_core_sgf_'+tag||s.nativeConnection.database!=='compras_receipts_test_'+tag||s.env.DB_PORT!=='55439'||s.env.SGF_ISOLATED_REGRESSION_RUN!==run.id||!s.integrated)throw Error('Only the existing selected installation is allowed'); +const hash=p=>crypto.createHash('sha256').update(fs.readFileSync(p)).digest('hex'); +if(command==='status'){console.log(JSON.stringify({installation:tag,port:8085,single:s.singleInstallation===true,new_database:false,new_server:false,entry:'http://127.0.0.1:8085/compras'}));process.exit(0);} +if(command==='start'){ + if(!s.singleInstallation)throw Error('Selected installation not consolidated'); + try{const response=await fetch('http://127.0.0.1:8085/compras',{signal:AbortSignal.timeout(5000)});if(response.status===200&&response.headers.get('x-sgf-installation')===tag){console.log('Compras disponível: http://127.0.0.1:8085/compras (instalação existente)');process.exit(0);}throw Error('Port8085 is occupied by an unexpected or unavailable application');}catch(error){if(error.message.startsWith('Port8085'))throw error;} + await new Promise((resolve,reject)=>{const probe=net.createServer();probe.once('error',reject);probe.listen(8085,'127.0.0.1',()=>probe.close(resolve));}); + const stdout=fs.openSync(path.join(root,'demo-stdout.log'),'a'),stderr=fs.openSync(path.join(root,'demo-stderr.log'),'a'),child=spawn('C:/laragon/tools/sgf-tempo/php-8.4.27/php.exe',['-S','127.0.0.1:8085','-t',path.join(s.app,'public'),path.resolve('scripts/receipt-composition-http.php')],{cwd:s.app,env:s.env,detached:true,windowsHide:true,stdio:['ignore',stdout,stderr]}); + fs.writeFileSync(path.join(root,'demo-server.json'),JSON.stringify({...server,pid:child.pid,restarted_existing_installation:new Date().toISOString()},null,2));child.unref();console.log('Compras iniciada na instalação existente: http://127.0.0.1:8085/compras');process.exit(0); +} +const php='C:/laragon/tools/sgf-tempo/php-8.4.27/php.exe',files=['app/Modules/Purchasing/PurchasingEntry.php','resources/views/purchasing-entry.blade.php','resources/views/purchasing-workspace.blade.php','resources/views/partials/purchasing-navigation.blade.php','resources/views/supplier-workspace.blade.php','resources/js/PurchasingHome.jsx',...['purchasing-exit','purchasing-board','purchasing-presenter','purchasing-focus','request-workspace','sourcing-workspace','order-workspace','receipt-workspace','supplier-workspace','supplier-invoice-workspace','supplier-obligation-workspace','obligation-evidence'].map(n=>'public/'+n+'.mjs')]; +for(const file of files.filter(f=>f.endsWith('.php')&&!f.includes('/views/'))){const p=spawnSync(php,['-l',file],{encoding:'utf8',windowsHide:true});if(p.status!==0)throw Error('PHP syntax failed: '+file);} +const stamp=new Date().toISOString().replace(/[^0-9]/g,'')+'-'+crypto.randomBytes(3).toString('hex'),backup=path.join(root,'updates',stamp);fs.mkdirSync(backup,{recursive:true});const journal=[]; +for(const file of files){const target=path.join(s.app,file);if(fs.existsSync(target)){const saved=path.join(backup,file);fs.mkdirSync(path.dirname(saved),{recursive:true});fs.copyFileSync(target,saved);}journal.push({file,before:fs.existsSync(target)?hash(target):null,after:hash(file)});fs.mkdirSync(path.dirname(target),{recursive:true});fs.copyFileSync(file,target);} +for(const file of fs.readdirSync('public/build/assets')){const relative='public/build/assets/'+file;const target=path.join(s.app,relative);if(!fs.existsSync(target))fs.copyFileSync(relative,target);else if(hash(target)!==hash(relative))throw Error('Immutable asset content differs');} +const manifest=path.join(s.app,'public/build/manifest.json');fs.copyFileSync(manifest,path.join(backup,'build-manifest.json'));fs.copyFileSync('public/build/manifest.json',manifest); +// Commit the composition flag last. Its file is private and never printed or copied into the repo. +fs.copyFileSync(path.join(root,'state.json'),path.join(backup,'state.json'));s.singleInstallation=true;fs.writeFileSync(path.join(root,'state.next.json'),JSON.stringify(s,null,2));fs.renameSync(path.join(root,'state.next.json'),path.join(root,'state.json')); +fs.writeFileSync(path.join(backup,'code-update.json'),JSON.stringify({installation:tag,port:8085,files:journal,new_database:false,new_role:false,new_server:false,cache_cleared:false,build_manifest_sha256:hash(manifest)},null,2));console.log(JSON.stringify({updated:true,installation:tag,port:8085,backup:stamp,files:files.length,new_database:false,new_server:false})); diff --git a/scripts/purchasing-workspace-dom.mjs b/scripts/purchasing-workspace-dom.mjs new file mode 100644 index 0000000..2568353 --- /dev/null +++ b/scripts/purchasing-workspace-dom.mjs @@ -0,0 +1,35 @@ +// Small DOM for exercising the actual local workspace modules against real HTTP. +// It is not a browser renderer or a visual/accessibility acceptance test. +export const walk=e=>[e,...e.children.flatMap(walk)]; +const decode=s=>s.replace(/&(?:amp|quot|lt|gt|apos|#039);/g,v=>({'&':'&','"':'"','<':'<','>':'>',''':"'",''':"'"})[v]); +export class Element { + constructor(tag,text=''){this.tag=tag.toLowerCase();this._text=text;this.children=[];this.dataset={};this.style={};this.attributes={};this.checked=false;this.disabled=false;this.hidden=false;this.isConnected=true;this.parent=null;} + get textContent(){return this._text+this.children.map(e=>e.textContent).join('');}set textContent(v){this._text=String(v);this.replaceChildren();} + get value(){if(this._value!==undefined)return this._value;if(this.tag==='select')return this.children.find(e=>e.selected)?.value??this.children[0]?.value??'';return this.tag==='textarea'?this._text:'';}set value(v){this._value=String(v??'');} + append(...items){for(let item of items){if(typeof item==='string')item=new Element('span',item);item.parent=this;item.isConnected=this.isConnected;this.children.push(item);}} + prepend(...items){for(const item of items){item.parent=this;item.isConnected=this.isConnected;}this.children.unshift(...items);} + replaceChildren(...items){for(const item of this.children)for(const e of walk(item))e.isConnected=false;this.children=[];this.append(...items);} + setAttribute(k,v){this.attributes[k]=v;if(k.startsWith('data-'))this.dataset[k.slice(5).replace(/-([a-z])/g,(_,c)=>c.toUpperCase())]=v;else this[k]=v;} + getAttribute(k){return this.attributes[k]??this[k]??null;} + remove(){if(this.parent)this.parent.children=this.parent.children.filter(e=>e!==this);for(const e of walk(this))e.isConnected=false;} + matches(selector){if(selector.startsWith('#'))return this.id===selector.slice(1);if(selector.startsWith('.'))return String(this.className??this.class??'').split(' ').includes(selector.slice(1));const attr=/^(\w+)?\[([^=\]]+)(?:=["']?([^"'\]]+)["']?)?\]$/.exec(selector);if(attr)return (!attr[1]||this.tag===attr[1])&&(attr[3]===undefined?this.getAttribute(attr[2])!==null:String(this.getAttribute(attr[2]))===attr[3]);return this.tag===selector;} + querySelectorAll(selector){if(selector.includes(','))return selector.split(',').flatMap(s=>this.querySelectorAll(s.trim()));return walk(this).slice(1).filter(e=>e.matches(selector));} + querySelector(s){return this.querySelectorAll(s)[0]??null;} + closest(s){for(let e=this;e;e=e.parent)if(e.matches(s))return e;return null;} + dispatchEvent(event){for(let e=this;e;e=event.bubbles?e.parent:null)e['on'+event.type]?.(event);return true;} + addEventListener(name,callback){this['on'+name]=callback;} + reportValidity(){return true;}focus(){}scrollIntoView(){} +} +export function parsePage(html){ + const root=new Element('document'),stack=[root],voids=new Set(['input','meta','link','br','hr','img','source']); + for(const token of html.match(/<[^>]+>|[^<]+/g)??[]){if(token.startsWith('1){if(stack.pop().tag===tag)break;}continue;} + if(token.startsWith('<')){const tag=/^<([\w-]+)/.exec(token)?.[1];if(!tag)continue;const element=new Element(tag);for(const m of token.matchAll(/\s([\w:-]+)(?:="([^"]*)"|='([^']*)'|=([^\s>]+))?/g)){const v=decode(m[2]??m[3]??m[4]??'');if(['required','hidden','disabled','checked','selected'].includes(m[1]))element[m[1]]=true;else element.setAttribute(m[1],v);} + stack.at(-1).append(element);if(!voids.has(tag)&&!token.endsWith('/>'))stack.push(element); + }else stack.at(-1)._text+=decode(token); + } + const querySelector=selector=>{const nav=/^nav\[aria-label="Etapas de Compras"\] a\[href="([^"]+)"\]$/.exec(selector);if(nav)return walk(root).find(e=>e.tag==='nav'&&e.getAttribute('aria-label')==='Etapas de Compras')?.querySelector('a[href="'+nav[1]+'"]')??null;return root.querySelector(selector);}; + return {root,createElement:tag=>new Element(tag),querySelector,querySelectorAll:s=>root.querySelectorAll(s)}; +} +export function installDom(document){globalThis.document=document;globalThis.Option=class extends Element{constructor(text,value){super('option',text);this.value=value;}};globalThis.FormData=class{constructor(form){this.values=walk(form).filter(e=>['input','textarea','select'].includes(e.tag)&&e.name&&!e.disabled&&(!['checkbox','radio'].includes(e.type)||e.checked)).map(e=>[e.name,e.value]);}*[Symbol.iterator](){yield* this.values;}};} +export function byName(root,name){return walk(root).find(e=>e.name===name);} +export function setLabel(form,label,value){const e=walk(form).find(e=>e.tag==='label'&&e._text.includes(label));if(!e)throw Error('Missing field label: '+label);const input=walk(e).find(v=>['input','select','textarea'].includes(v.tag));if(!input)throw Error('Missing input: '+label);if(input.type==='checkbox')input.checked=Boolean(value);else input.value=value;input.onchange?.();return input;} diff --git a/scripts/purchasing-workspace-home-check.mjs b/scripts/purchasing-workspace-home-check.mjs new file mode 100644 index 0000000..22caa6e --- /dev/null +++ b/scripts/purchasing-workspace-home-check.mjs @@ -0,0 +1,5 @@ +import fs from 'node:fs';import assert from 'node:assert/strict';import React from 'react';import {renderToStaticMarkup} from 'react-dom/server';import {createServer} from 'vite'; +const out='docs/proofs/purchasing-workspace-home-20261103.json';assert(!fs.existsSync(out));const server=await createServer({configFile:false,server:{middlewareMode:true},appType:'custom'}),checks=[];const check=(v,n)=>{assert(v,n);checks.push(n);}; +try{const {default:Home}=await server.ssrLoadModule('/resources/js/PurchasingHome.jsx'),ctx={company:{name:'QA'},unit:{id:7},purchasing:{source_requests:true,supplier_invoices:true,supplier_obligations:true,receipts:true}},render=(context,rights)=>renderToStaticMarkup(React.createElement(Home,{context,can:(p,u)=>rights.includes(p)&&u===7,navigate(){}})); +check(render(ctx,['purchasing_requests.view']).includes('href="/purchasing/workspace"'),'request view exposes common workspace');check(render(ctx,['purchasing_receipts.view']).includes('href="/purchasing/workspace"'),'warehouse view exposes same workspace');check(!render(ctx,[]).includes('href="/purchasing/workspace"'),'no stage rights hide workspace');check(!render({...ctx,unit:null},['purchasing_requests.view']).includes('href="/purchasing/workspace"'),'unit required');check(!render({...ctx,purchasing:{}},['purchasing_requests.view']).includes('href="/purchasing/workspace"'),'disabled stage capabilities hide workspace');const html=render(ctx,['purchasing_invoices.view','purchasing_obligations.view']);check(html.includes('href="/purchasing/invoices"')&&html.includes('href="/purchasing/obligations"'),'individual invoice and obligation destinations preserved'); +fs.writeFileSync(out,JSON.stringify({passed:true,checks,visual_review:false},null,2)+'\n');console.log(JSON.stringify({passed:true,checks:checks.length}));}finally{await server.close();} diff --git a/scripts/receipt-composition-extra.mjs b/scripts/receipt-composition-extra.mjs new file mode 100644 index 0000000..778a676 --- /dev/null +++ b/scripts/receipt-composition-extra.mjs @@ -0,0 +1,2 @@ +import fs from 'node:fs';import path from 'node:path';import {spawnSync} from 'node:child_process'; +const [tag,file]=process.argv.slice(2);if(!/^[a-f0-9]{12}$/.test(tag??'')||!['stock-period-guards.php','stock-period-query-proof.php','stock-period-proof.php','stock-period-demo.php','stock-trace-demo.php','composition-stock-demo.php','composition-stock-proof.php','obligation-evidence-demo.php','invoice-progress-demo.php','request-history-demo.php','request-history-finalize.php','request-history-proof.php','purchasing-continuity-demo.php','continuity-boundaries.php','receipt-ui-source.php','purchasing-focus-demo.php','receipt-documents-extra.php','receipt-documents-resume.php','receipt-documents-guards.php','receipt-documents-proof.php','receipt-documents-demo.php','supplier-documents-integration.php','supplier-documents-resume.php','supplier-documents-proof.php','supplier-documents-guards.php','supplier-documents-demo.php','receipt-workspace-proof.php','receipt-workspace-seed.php','receipt-workspace-demo.php','receipt-workspace-guards.php','dossier-demo-proof.php','dossier-guard-proof.php','supplier-search-guard.php','supplier-search-proof.php','supplier-search-seed.php','supplier-search-demo.php','purchasing-integrated-resume.php','purchasing-navigation-guard.php','purchasing-integrated-proof.php','purchasing-integrated-smoke.php','obligation-boundary-proof.php','obligation-replay-proof.php','obligation-guard-proof.php','obligation-composition-proof.php','obligation-demo-smoke.php','invoice-boundary-proof.php','invoice-composition-proof.php','invoice-guard-proof.php','invoice-demo-smoke.php','geography-pagination-proof.php','geography-composition-proof.php','geography-demo-smoke.php','geography-guard-proof.php','request-sourcing-resume.php','request-composition-proof.php','sourcing-composition-proof.php','request-guard-proof.php','request-demo-smoke.php','supplier-guard-proof.php','supplier-boundary-proof.php','supplier-demo-smoke.php'].includes(file))throw Error('Explicit QA proof required');const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),root=path.join(run.root,'private/receipt-composition-'+tag),s=JSON.parse(fs.readFileSync(path.join(root,'state.json')));if(!s.suppliers&&!s.invoices)throw Error('Supplier QA fixture required');const result=spawnSync('C:/laragon/tools/sgf-tempo/php-8.4.27/php.exe',[path.resolve('scripts',file)],{cwd:s.app,env:s.env,encoding:'utf8',windowsHide:true,timeout:180000});fs.writeFileSync(path.join(root,file+'.log'),result.stdout+'\n'+result.stderr);if(file==='continuity-boundaries.php'&&!fs.existsSync(path.join(root,'continuity-boundaries.json')))throw Error('Continuity boundary proof incomplete');if(file==='receipt-ui-source.php'&&!fs.existsSync(path.join(root,'receipt-ui-source.json')))throw Error('Receipt UI source incomplete');if(file==='obligation-evidence-demo.php'&&!fs.existsSync(path.join(root,'obligation-evidence-demo.json')))throw Error('Evidence demo incomplete');if(file==='invoice-progress-demo.php'&&!fs.existsSync(path.join(root,'invoice-progress-demo.json')))throw Error('Matching demo incomplete');if(file==='request-history-demo.php'&&!fs.existsSync(path.join(root,'request-history-demo.json')))throw Error('Request history demo incomplete');if(file==='request-history-finalize.php'&&!fs.existsSync(path.join(root,'request-history-result.json')))throw Error('Request history final proof incomplete');if(file==='request-history-proof.php'&&!fs.existsSync(path.join(root,'request-history-result.json')))throw Error('Request history proof incomplete');if(file==='purchasing-continuity-demo.php'&&!fs.existsSync(path.join(root,'purchasing-continuity-demo.json')))throw Error('Continuity demonstration incomplete');if(file==='purchasing-focus-demo.php'&&!fs.existsSync(path.join(root,'purchasing-focus-demo.json')))throw Error('Focus demo proof incomplete');if(!['purchasing-focus-demo.php','purchasing-continuity-demo.php'].includes(file)&&file.startsWith('purchasing-')&&!fs.existsSync(path.join(root,({'purchasing-integrated-resume.php':'integrated-result.json','purchasing-integrated-proof.php':'integrated-result.json','purchasing-integrated-smoke.php':'integrated-smoke.json','purchasing-navigation-guard.php':'integrated-navigation-guard.json'})[file])))throw Error('Integrated proof incomplete; inspect private diagnostics');if(file.startsWith('obligation-')&&!fs.existsSync(path.join(root,({'obligation-evidence-demo.php':'obligation-evidence-demo.json','obligation-composition-proof.php':'obligation-result.json','obligation-boundary-proof.php':'obligation-boundaries.json','obligation-replay-proof.php':'obligation-replay.json','obligation-guard-proof.php':'obligation-guards.json','obligation-demo-smoke.php':'obligation-demo-smoke.json'})[file])))throw Error('Obligation proof incomplete; inspect private diagnostics');if(file.startsWith('receipt-documents-')&&!fs.existsSync(path.join(root,({'receipt-documents-extra.php':'receipt-documents-extra.json','receipt-documents-resume.php':'receipt-documents-result.json','receipt-documents-proof.php':'receipt-documents-result.json','receipt-documents-guards.php':'receipt-documents-guards.json','receipt-documents-demo.php':'receipt-documents-demo.json'})[file])))throw Error('Receipt documents proof incomplete; private diagnostics preserved');if(file==='supplier-documents-integration.php'&&!fs.existsSync(path.join(root,'supplier-documents-integration.json')))throw Error('Supplier document integration incomplete');if(file==='supplier-documents-resume.php'&&!fs.existsSync(path.join(root,'supplier-documents-result.json')))throw Error('Supplier document resume incomplete');if(file==='supplier-documents-proof.php'&&!fs.existsSync(path.join(root,'supplier-documents-result.json')))throw Error('Supplier document proof incomplete');if(file==='supplier-documents-guards.php'&&!fs.existsSync(path.join(root,'supplier-documents-guards.json')))throw Error('Supplier document guard proof incomplete');if(file==='supplier-documents-demo.php'&&!fs.existsSync(path.join(root,'supplier-documents-demo.json')))throw Error('Supplier document demo incomplete');if(file==='receipt-workspace-proof.php'&&!fs.existsSync(path.join(root,'receipt-workspace-result.json')))throw Error('Receipt workspace proof incomplete');if(file==='receipt-workspace-demo.php'&&!fs.existsSync(path.join(root,'receipt-workspace-demo.json')))throw Error('Receipt workspace demo incomplete');if(file==='receipt-workspace-guards.php'&&!fs.existsSync(path.join(root,'receipt-workspace-guards.json')))throw Error('Receipt workspace guards incomplete');if(file==='dossier-demo-proof.php'&&!fs.existsSync(path.join(root,'dossier-demo-result.json')))throw Error('Dossier demonstration incomplete');if(file==='dossier-guard-proof.php'&&!fs.existsSync(path.join(root,'dossier-guard-result.json')))throw Error('Dossier guard proof incomplete');if(file==='supplier-search-guard.php'&&!fs.existsSync(path.join(root,'supplier-search-guard.json')))throw Error('Supplier selector guard proof incomplete');if(file==='supplier-search-proof.php'&&!fs.existsSync(path.join(root,'supplier-search-result.json')))throw Error('Supplier search proof incomplete');if(file==='supplier-search-demo.php'&&!fs.existsSync(path.join(root,'supplier-search-demo.json')))throw Error('Supplier search smoke incomplete');if(file==='invoice-composition-proof.php'&&!fs.existsSync(path.join(root,'invoice-result.json')))throw Error('Invoice proof incomplete; inspect private diagnostics');if(file==='stock-period-guards.php'&&!fs.existsSync(path.join(root,'stock-period-guards.json')))throw Error('Period guards incomplete');if(file==='stock-period-query-proof.php'&&!fs.existsSync(path.join(root,'stock-period-queries.json')))throw Error('Period query proof incomplete');if(file==='stock-period-proof.php'&&!fs.existsSync(path.join(root,'stock-period-result.json')))throw Error('Period proof incomplete');if(file==='stock-period-demo.php'&&!fs.existsSync(path.join(root,'stock-period-demo.json')))throw Error('Period demo incomplete');if(file==='stock-trace-demo.php'&&!fs.existsSync(path.join(root,'stock-trace-demo.json')))throw Error('Trace demo incomplete');if(file==='composition-stock-demo.php'&&!fs.existsSync(path.join(root,'composition-stock-demo.json')))throw Error('Stock demo incomplete');if(file==='composition-stock-proof.php'&&!fs.existsSync(path.join(root,'composition-stock-result.json')))throw Error('Stock proof incomplete');if(result.status!==0)throw Error('Proof failed; private diagnostics preserved: '+file);console.log(result.stdout.trim()||file+' passed'); diff --git a/scripts/receipt-composition-extra.php b/scripts/receipt-composition-extra.php new file mode 100644 index 0000000..f8af4fb --- /dev/null +++ b/scripts/receipt-composition-extra.php @@ -0,0 +1,19 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); +$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true,64,JSON_THROW_ON_ERROR);$n=json_decode(file_get_contents($s['root'].'/native-extra-fixture.json'),true,64,JSON_THROW_ON_ERROR);$bindingFile=$s['root'].'/binding.json';$original=file_get_contents($bindingFile);$binding=json_decode($original,true,64,JSON_THROW_ON_ERROR);$binding['bindings'][implode(':',array_values($f['scope'])).':'.$f['actor']]=['tenant_id'=>$n['tenant'],'actor_id'=>$n['receiver'],'order_ids'=>[$n['order']],'warehouse_ids'=>[$n['warehouse']]];file_put_contents($bindingFile,json_encode($binding,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); +config(['database.connections.receipt_verify'=>$s['nativeConnection']]);$db=DB::connection('receipt_verify');$checks=[];$ok=function($v,$name)use(&$checks,$s){if(!$v)throw new RuntimeException($name);$checks[]=$name;file_put_contents($s['root'].'/extra-progress.json',json_encode($checks,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));};$servers=[];$clients=[];$sessions=[]; +try{ + foreach([0,1]as$i){$socket=stream_socket_server('tcp://127.0.0.1:0');$port=(int)substr(strrchr(stream_socket_get_name($socket,false),':'),1);fclose($socket);$server=new Symfony\Component\Process\Process([PHP_BINARY,'-S','127.0.0.1:'.$port,'-t',$s['app'].'/public',dirname(__DIR__).'/scripts/receipt-composition-http.php'],$s['app'],null,null,180);$server->start();$servers[]=$server;for($j=0;$j<80;$j++){if($socket=@fsockopen('127.0.0.1',$port,$errno,$error,.1)){fclose($socket);break;}usleep(50000);}$client=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:'.$port,'http_errors'=>false,'timeout'=>30]);$jar=new GuzzleHttp\Cookie\CookieJar;$r=$client->get('/qa/enter/actor',['cookies'=>$jar]);$sessions[$i]=['jar'=>$jar]+json_decode((string)$r->getBody(),true,32,JSON_THROW_ON_ERROR);$clients[]=$client;} + $options=function($i,$data=null)use(&$sessions){$session=$sessions[$i];$o=['cookies'=>$session['jar'],'headers'=>['Accept'=>'application/json','X-CSRF-TOKEN'=>$session['csrf'],'X-SGF-Context'=>$session['context']]];if($data!==null)$o['json']=$data;return $o;};$call=function($path,$data=null,$i=0)use($clients,$options){$r=$clients[$i]->request($data===null?'GET':'POST',$path,$options($i,$data));return ['status'=>$r->getStatusCode(),'data'=>json_decode((string)$r->getBody(),true)];};$url='/api/purchasing-receipts/orders/'.$n['order']; + $intent=function($reference)use($call,$url,$n){$d=$call($url);if($d['status']!==200)throw new RuntimeException('Extra order unavailable');$data=['revision'=>$d['data']['revision'],'idempotency_key'=>(string)Str::uuid(),'delivery_note'=>$reference,'received_on'=>date('Y-m-d'),'warehouse_id'=>$n['warehouse'],'items'=>[['purchase_order_item_id'=>$n['line'],'received_quantity'=>'0.500','accepted_quantity'=>'0.500','quality_status'=>'compliant','stock_item_id'=>$n['stock'],'notes'=>null]]];$r=$call($url.'/preview',$data);if($r['status']!==200)throw new RuntimeException('Extra preview failed');return $r['data']['preview'];}; + $preview=$intent('SGF-QA-CONCURRENT-SAME');$promises=[];foreach([0,1]as$i)$promises[]=$clients[$i]->postAsync($url.'/confirm',$options($i,['preview'=>$preview]));$responses=GuzzleHttp\Promise\Utils::unwrap($promises);$statuses=array_map(fn($r)=>$r->getStatusCode(),$responses);sort($statuses);$ok($statuses===[200,201],'two independent HTTP workers recover the same key once');$receipts=$db->table('goods_receipts')->where('tenant_id',$n['tenant'])->count();$ok($receipts===1&&(int)$db->table('stock_movements')->where('tenant_id',$n['tenant'])->sum('quantity_milli')===500,'concurrent repetition has one canonical receipt and movement'); + $a=$intent('SGF-QA-CONCURRENT-A');$b=$intent('SGF-QA-CONCURRENT-B');$responses=GuzzleHttp\Promise\Utils::unwrap([$clients[0]->postAsync($url.'/confirm',$options(0,['preview'=>$a])),$clients[1]->postAsync($url.'/confirm',$options(1,['preview'=>$b]))]);$statuses=array_map(fn($r)=>$r->getStatusCode(),$responses);sort($statuses);$ok($statuses===[201,409],'different intentions on one revision serialize and stale intention is refused');$ok($db->table('goods_receipts')->where('tenant_id',$n['tenant'])->count()===2&&(int)$db->table('stock_movements')->where('tenant_id',$n['tenant'])->sum('quantity_milli')===1000,'competing decisions do not duplicate accepted physical quantity'); + $preview=$intent('SGF-QA-FAIL-RECOVER');$fingerprint=function()use($db){$h=hash_init('sha256');foreach(['goods_receipts','goods_receipt_items','stock_movements','audit_logs','replenishment_work']as$table){if(!$db->getSchemaBuilder()->hasTable($table))continue;hash_update($h,$table);foreach($db->table($table)->orderBy('id')->get()as$row)hash_update($h,json_encode((array)$row,JSON_THROW_ON_ERROR));}return hash_final($h);};$before=$fingerprint(); + $db->unprepared("CREATE FUNCTION public.receipt_qa_fail() RETURNS trigger LANGUAGE plpgsql AS \$\$ BEGIN RAISE EXCEPTION 'synthetic receipt writer failure'; END \$\$; CREATE TRIGGER receipt_qa_fail AFTER INSERT ON stock_movements FOR EACH ROW EXECUTE FUNCTION public.receipt_qa_fail()"); + try{$r=$call($url.'/confirm',['preview'=>$preview]);$ok($r['status']===500,'injected failure after physical insert returns an unsuccessful response');$ok($fingerprint()===$before,'native transaction rolls back parent, items, movement, audit and work signal together');}finally{$db->unprepared('DROP TRIGGER receipt_qa_fail ON stock_movements; DROP FUNCTION public.receipt_qa_fail()');} + $r=$call($url.'/confirm',['preview'=>$preview]);$ok($r['status']===201,'same prepared intention succeeds after the cause is removed');$again=$call($url.'/confirm',['preview'=>$preview]);$ok($again['status']===200&&$again['data']['receipt']['id']===$r['data']['receipt']['id'],'recovery repetition returns the same immutable receipt');$ok($db->table('goods_receipts')->where('tenant_id',$n['tenant'])->count()===3&&(int)$db->table('stock_movements')->where('tenant_id',$n['tenant'])->sum('quantity_milli')===1500,'recovery leaves exactly three half-unit movements'); + $reader=$clients[0]->get('/qa/enter/validator',['cookies'=>$sessions[0]['jar']]);$sessions[0]=['jar'=>$sessions[0]['jar']]+json_decode((string)$reader->getBody(),true);$r=$call('/api/purchasing-receipts/orders/'.json_decode(file_get_contents($s['root'].'/native-fixture.json'),true)['order']);$ok($r['status']===200&&$r['data']['can_confirm']===false,'read-only SGF profile receives no confirmation capability'); + file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'two_independent_http_workers'=>true,'same_key_statuses'=>[200,201],'competing_key_statuses'=>[201,409],'fault_after_insert'=>true,'rollback_fingerprint_equal'=>true,'recovery_receipts'=>3,'recovery_quantity_milli'=>1500,'host_profile_changes_real'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." concurrency/recovery checks passed.\n"; +}finally{file_put_contents($bindingFile,$original);foreach($servers as$i=>$server){$server->stop(2);file_put_contents($s['root'].'/extra-http-'.$i.'.log',$server->getOutput()."\n".$server->getErrorOutput());}} diff --git a/scripts/receipt-composition-http.php b/scripts/receipt-composition-http.php new file mode 100644 index 0000000..a697db6 --- /dev/null +++ b/scripts/receipt-composition-http.php @@ -0,0 +1,12 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true,64,JSON_THROW_ON_ERROR); +Illuminate\Support\Facades\Route::middleware('web')->get('/qa/enter/{role}',function(Illuminate\Http\Request $r,string $role)use($f,$s){abort_unless(in_array($role,['actor','validator','issuer',...(($s['invoices']??false)?['reviewer','auditor']:[]),...(($s['requests']??false)?['requester','approver']:[])],true),404);$user=App\Models\User::findOrFail($f[$role]);auth()->login($user);$r->session()->put('auth_version',$user->auth_version);$token=bin2hex(random_bytes(20));$scope=$f['scope'];if($r->query('foreign'))$scope['unit_id']=$f['foreign_unit'];$r->session()->put('company_context',$scope+['token'=>$token,'module_id'=>$r->query('module','purchasing')]);if($r->boolean('open')&&($s['stockComposition']??false)&&$r->query('module')==='stock')return redirect('/');if($r->boolean('open')&&($s['integrated']??false)&&!$r->has('geography')&&!$r->has('obligations'))return redirect('/purchasing/workspace');if($r->boolean('open')&&($s['geography']??false)&&in_array($r->query('geography'),['company','unit','client'],true))return redirect('/geography/'.$r->query('geography').'/'.($r->query('geography')==='company'?$f['company']:($r->query('geography')==='unit'?$f['unit']:$f['client'])));if($r->boolean('open')&&($s['obligations']??false)&&$r->boolean('obligations'))return redirect('/purchasing/obligations');if($r->boolean('open')&&($s['invoices']??false)&&in_array($role,['issuer','reviewer','auditor'],true))return redirect('/purchasing/invoices');if($r->boolean('open'))return redirect(($s['requests']??false)&&in_array($role,['requester','approver'],true)?'/purchasing/requests':(($s['suppliers']??false)&&$role!=='validator'?'/purchasing/suppliers':(($s['sourcing']??false)&&$role!=='validator'?'/purchasing/sourcing':(($s['orders']??false)&&$role!=='validator'?'/purchasing/orders':'/purchasing/receipts'))));return response()->json(['csrf'=>csrf_token(),'context'=>$token]);}); +if(($s['singleInstallation']??false)===true){ + App\Modules\Purchasing\BudgetAdapter::guard(); + config(['purchasing_workspace.id'=>$s['tag'],'purchasing_workspace.single_installation'=>true,'purchasing_workspace.scope'=>$f['scope'],'purchasing_workspace.profiles'=>App\Modules\Purchasing\PurchasingEntry::profiles($f)]); + Illuminate\Support\Facades\Route::middleware('web')->get('/compras',[App\Modules\Purchasing\PurchasingEntry::class,'screen']); + Illuminate\Support\Facades\Route::middleware('web')->post('/compras/entrar',[App\Modules\Purchasing\PurchasingEntry::class,'enter']); +} +$app->handleRequest(Illuminate\Http\Request::capture()); diff --git a/scripts/receipt-composition-proof.php b/scripts/receipt-composition-proof.php new file mode 100644 index 0000000..f34c363 --- /dev/null +++ b/scripts/receipt-composition-proof.php @@ -0,0 +1,58 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); +$mode=getenv('RECEIPT_PROOF_RESUME');$resume=in_array($mode,['after-partial','after-complete'],true);$checks=$resume?json_decode(file_get_contents($s['root'].'/'.($mode==='after-complete'?'complete-accepted.json':'partial-accepted.json')),true,64,JSON_THROW_ON_ERROR):[];if($resume&&count($checks)!==($mode==='after-complete'?29:21))throw new LogicException('Exact partial evidence required');$check=function($value,$name)use(&$checks,$s){if(!$value)throw new RuntimeException($name);$checks[]=$name;file_put_contents($s['root'].'/checks-progress.json',json_encode($checks,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));}; +$finish=function()use(&$checks,$s){file_put_contents($s['root'].'/result.json',json_encode(['passed'=>true,'checks'=>$checks,'http'=>true,'canonical_receipts'=>2,'canonical_movements'=>2,'physical_milli'=>1750,'quality_pending'=>true,'original_workflow'=>true,'namespace_only_bundle'=>true,'real_rights_changed'=>false,'publication'=>false,'deployment_capacity_validated'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." integrated receipt checks passed.\n";}; +if(!Schema::hasTable('users')){ + require $s['app'].'/packages/budget-control/tests/sgf-schema.php';require $s['app'].'/packages/budget-control/tests/host-support.php';$f=DB::transaction(fn()=>budgetQaFixture('sgf')); + DB::statement('ALTER TABLE permission_grants DROP CONSTRAINT permission_grants_scope_check');DB::statement("ALTER TABLE permission_grants ADD CONSTRAINT permission_grants_scope_check CHECK ((unit_id IS NULL AND permission IN ('company.view','company.edit','unit.create','access.manage')) OR (unit_id IS NOT NULL AND (permission LIKE 'purchasing_budget.%' OR permission IN ('unit.view','unit.edit','purchasing_receipts.view','purchasing_receipts.confirm'))))"); + $now=now();$u=App\Models\User::create(['name'=>'Synthetic original issuer','email'=>'issuer-'.Str::uuid().'@example.test','password'=>Str::random(40)]);$f['issuer']=$u->id;$f['foreign_unit']=DB::table('units')->insertGetId(['tenant_id'=>$f['tenant'],'company_id'=>$f['company'],'name'=>'Other QA unit','created_at'=>$now,'updated_at'=>$now]);DB::table('company_memberships')->insert(['user_id'=>$u->id,'tenant_id'=>$f['tenant'],'company_id'=>$f['company']]); + foreach([$f['actor'],$f['validator'],$f['issuer']]as$id){foreach(['company.view'=>null,'unit.view'=>$f['unit'],'purchasing_receipts.view'=>$f['unit']]as$p=>$unit)DB::table('permission_grants')->insertOrIgnore(['user_id'=>$id,'tenant_id'=>$f['tenant'],'company_id'=>$f['company'],'unit_id'=>$unit,'permission'=>$p,'created_at'=>$now,'updated_at'=>$now]);DB::table('permission_grants')->insertOrIgnore($f['scope']+['user_id'=>$id,'permission'=>'unit.view','unit_id'=>$f['foreign_unit'],'created_at'=>$now,'updated_at'=>$now]);} + foreach([$f['actor'],$f['issuer']]as$id)DB::table('permission_grants')->insert($f['scope']+['user_id'=>$id,'permission'=>'purchasing_receipts.confirm','created_at'=>$now,'updated_at'=>$now]); + file_put_contents($s['root'].'/fixture.json',json_encode($f,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); +}else{$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true,64,JSON_THROW_ON_ERROR);} +$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true,64,JSON_THROW_ON_ERROR);$bindings=[];foreach(['actor'=>'receiver','validator'=>'reader','issuer'=>'issuer']as$role=>$native)$bindings[implode(':',array_values($f['scope'])).':'.$f[$role]]=['tenant_id'=>$n['tenant'],'actor_id'=>$n[$native],'order_ids'=>[$n['order']],'warehouse_ids'=>[$n['warehouse']]]; +file_put_contents($s['root'].'/binding.json',json_encode(['manifest_sha256'=>$s['manifest_sha256'],'connection'=>$s['nativeConnection'],'bindings'=>$bindings],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); +config(['database.connections.receipt_verify'=>$s['nativeConnection']]);$verify=DB::connection('receipt_verify');if($mode==='after-complete'){if($verify->table('goods_receipts')->count()!==2||$verify->table('stock_movements')->count()!==2||(int)$verify->table('stock_movements')->sum('quantity_milli')!==1750)throw new LogicException('Completed business state changed');$check($verify->table('invoices')->count()===0,'receipt did not create a supplier invoice');$finish();exit;}if(!$resume)$check($verify->table('goods_receipts')->count()===0&&$verify->table('stock_movements')->count()===0,'fresh canonical book contains no receipt or movement');elseif($verify->table('goods_receipts')->count()!==1||$verify->table('stock_movements')->count()!==1||(int)$verify->table('stock_movements')->sum('quantity_milli')!==750)throw new LogicException('Partial business state changed'); +if(getenv('RECEIPT_PROOF_PREPARE_ONLY')==='true'){file_put_contents($s['root'].'/demo-baseline.json',json_encode(['passed'=>true,'receipts'=>0,'movements'=>0,'explicit_new_qa_rights'=>['purchasing_receipts.view','purchasing_receipts.confirm']],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));exit;} +$socket=stream_socket_server('tcp://127.0.0.1:0');$address=stream_socket_get_name($socket,false);fclose($socket);$port=(int)substr(strrchr($address,':'),1); +$server=new Symfony\Component\Process\Process([PHP_BINARY,'-S','127.0.0.1:'.$port,'-t',$s['app'].'/public',dirname(__DIR__).'/scripts/receipt-composition-http.php'],$s['app'],null,null,180);$server->start(); +try{ + for($i=0;$i<80;$i++){if($socket=@fsockopen('127.0.0.1',$port,$errno,$error,.1)){fclose($socket);break;}usleep(50000);} + $client=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:'.$port,'http_errors'=>false,'timeout'=>25]);$sessions=[]; + $enter=function($role,$query=[])use($client,&$sessions){$jar=new GuzzleHttp\Cookie\CookieJar;$r=$client->get('/qa/enter/'.$role,['cookies'=>$jar,'query'=>$query]);if($r->getStatusCode()!==200)throw new RuntimeException('Entry failed');$sessions[$role]=['jar'=>$jar]+json_decode((string)$r->getBody(),true,32,JSON_THROW_ON_ERROR);}; + $call=function($role,$url,$body=null,$headers=[])use($client,&$sessions,$s){$v=$sessions[$role];$options=['cookies'=>$v['jar'],'headers'=>$headers+['Accept'=>'application/json','X-CSRF-TOKEN'=>$v['csrf'],'X-SGF-Context'=>$v['context']]];if($body!==null)$options['json']=$body;$r=$client->request($body===null?'GET':'POST',$url,$options);$text=(string)$r->getBody();if($r->getStatusCode()>=500)file_put_contents($s['root'].'/http-failure-body.txt',$text);return ['status'=>$r->getStatusCode(),'data'=>json_decode($text,true),'body'=>$text];}; + $enter('actor');$enter('validator');$enter('issuer');$base='/api/purchasing-receipts';$url=$base.'/orders/'.$n['order']; + if(!$resume){ + $r=$call('actor',$base);$check($r['status']===200&&count($r['data']['data'])===1,'SGF lists only explicitly mapped canonical order'); + $r=$call('actor','/purchasing/receipts');$check($r['status']===200&&str_contains($r['body'],'Recepção de mercadoria'),'SGF receipt workspace is mounted'); + $r=$call('actor',$url);$check($r['status']===200&&$r['data']['progress']['state']==='not_received','native workflow supplies actual pending quantities');$detail=$r['data']; + $check($call('actor',$base.'/orders/'.$n['foreign_order'])['status']===403,'unmapped order from another tenant refused'); + $check($call('actor',$url,null,['X-SGF-Context'=>'stale'])['status']===409,'stale context token refused on read'); + $payload=['revision'=>$detail['revision'],'idempotency_key'=>(string)Str::uuid(),'delivery_note'=>'SGF-QA-PARTIAL','received_on'=>date('Y-m-d'),'warehouse_id'=>$n['warehouse'],'items'=>[['purchase_order_item_id'=>$n['line'],'received_quantity'=>'1.000','accepted_quantity'=>'0.750','quality_status'=>'reservations','stock_item_id'=>$n['stock'],'notes'=>'Uma parte não foi aceite na conferência sintética.']]]; + $check($call('validator',$url.'/preview',$payload)['status']===403,'reader cannot prepare a confirmation');$check($call('issuer',$url.'/preview',$payload)['status']===403,'original order issuer cannot receive the same order'); + $r=$call('actor',$url.'/preview',$payload);$check($r['status']===200&&!$r['data']['impact']['accounting']&&!$r['data']['impact']['payments'],'explicit impact preview without financial effects');$preview=$r['data']['preview']; + $check($verify->table('goods_receipts')->count()===0&&$verify->table('stock_movements')->count()===0,'preview creates neither receipt nor physical movement'); + $check($call('actor',$url.'/confirm',['preview'=>$preview.'invalid'])['status']===409,'tampered preview refused'); + $r=$call('actor',$url.'/confirm',['preview'=>$preview]);$check($r['status']===201&&count($r['data']['movements'])===1&&(int)$r['data']['movements'][0]['quantity_milli']===750,'SGF confirmation invokes original workflow and shared writer exactly once');$receipt=$r['data']['receipt']['id']; + $r=$call('actor',$url.'/confirm',['preview'=>$preview]);$check($r['status']===200&&$r['data']['replayed']&&$r['data']['receipt']['id']===$receipt,'same confirmation recovers original receipt without duplication'); + $check($verify->table('goods_receipts')->count()===1&&$verify->table('stock_movements')->count()===1,'canonical source remains sole physical authority'); + $r=$call('validator',$base.'/history/'.$receipt);$check($r['status']===200&&(int)$r['data']['receipt']['items'][0]['rejected_milli']===250,'SGF history preserves accepted and rejected evidence with actual movement'); + $check($verify->table('audit_logs')->where('action','receipt.confirmed')->count()===1,'original append-only receipt audit created once'); + $r=$call('actor',$url);$check($r['data']['progress']['state']==='partial'&&(int)$r['data']['progress']['lines'][0]['received_milli']===1000,'next SGF read reflects cumulative native quantities'); + $payload['idempotency_key']=(string)Str::uuid();$payload['delivery_note']='SGF-QA-SECOND';$check($call('actor',$url.'/preview',$payload)['status']===409,'stale order revision requires renewed conference'); + $payload['revision']=$r['data']['revision'];$payload['items'][0]['received_quantity']='1.001';$payload['items'][0]['accepted_quantity']='1.001';$payload['items'][0]['quality_status']='compliant';$r=$call('actor',$url.'/preview',$payload);$check($r['status']===200,'second intent remains an uncommitted preview');$check($call('actor',$url.'/confirm',['preview'=>$r['data']['preview']])['status']===422,'native cumulative limit rejects over-receipt atomically'); + $check($verify->table('goods_receipts')->count()===1&&$verify->table('stock_movements')->count()===1,'refused confirmation leaves all physical and receipt records unchanged'); + }else{$r=$call('actor',$url);$payload=['revision'=>$r['data']['revision'],'idempotency_key'=>(string)Str::uuid(),'delivery_note'=>'SGF-QA-SECOND','received_on'=>date('Y-m-d'),'warehouse_id'=>$n['warehouse'],'items'=>[['purchase_order_item_id'=>$n['line'],'received_quantity'=>'1.000','accepted_quantity'=>'1.000','quality_status'=>'compliant','stock_item_id'=>$n['stock'],'notes'=>null]]];} + $payload['items'][0]['received_quantity']='1.000';$payload['items'][0]['accepted_quantity']='1.000';$payload['warehouse_id']=$n['foreign_warehouse'];$check(in_array($call('actor',$url.'/preview',$payload)['status'],[403,422],true),'warehouse outside mapped unit refused');$payload['warehouse_id']=$n['warehouse']; + $r=$call('actor',$url.'/preview',$payload);$second=$r['data']['preview'];$grant=DB::table('permission_grants')->where($f['scope'])->where('user_id',$f['actor'])->where('permission','purchasing_receipts.confirm')->first();DB::table('permission_grants')->where('id',$grant->id)->delete();$check($call('actor',$url.'/confirm',['preview'=>$second])['status']===403,'revoked host permission is rechecked at confirmation');DB::table('permission_grants')->insert((array)$grant); + $check($call('validator',$url.'/confirm',['preview'=>$second])['status']===403,'preview cannot transfer authority to a reader'); + $enter('actor',['foreign'=>1]);$check(in_array($call('actor',$url)['status'],[403,409],true),'other SGF unit cannot reuse source mapping');$enter('actor'); + $r=$call('actor',$url.'/confirm',['preview'=>$second]);$check($r['status']===201&&(int)$r['data']['movements'][0]['quantity_milli']===1000,'remaining authorized quantity receives through same native workflow'); + $r=$call('actor',$url);$check($r['data']['progress']['state']==='quality_pending'&&(int)$r['data']['progress']['lines'][0]['accepted_milli']===1750,'quality shortfall stays visible rather than falsely completing order'); + $check($verify->table('goods_receipts')->count()===2&&$verify->table('stock_movements')->count()===2&&(int)$verify->table('stock_movements')->sum('quantity_milli')===1750,'two receipts and two unique movements; only1750 milli accepted'); + $check($call('actor','/api/session')['status']===200,'host session and database restored after native success and refusals'); + $check($verify->table('invoices')->count()===0,'receipt did not create a supplier invoice');$finish(); +}finally{$server->stop(2);file_put_contents($s['root'].'/http-output-'.($resume?'resume':'initial').'.log',$server->getOutput()."\n".$server->getErrorOutput());} diff --git a/scripts/receipt-composition-run.mjs b/scripts/receipt-composition-run.mjs new file mode 100644 index 0000000..417dcc6 --- /dev/null +++ b/scripts/receipt-composition-run.mjs @@ -0,0 +1,27 @@ +import fs from 'node:fs';import path from 'node:path';import crypto from 'node:crypto';import {spawnSync} from 'node:child_process'; +const repo=process.cwd(),source=path.resolve('../compras'),state=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')); +if(state.port!==55439||!/^[a-f0-9]{12}$/.test(state.id)||path.resolve(state.root)!==path.resolve('C:/laragon/data/sgf-tempo/run/modular-regression-'+state.id))throw Error('Owned QA cluster required'); +const php='C:/laragon/tools/sgf-tempo/php-8.4.27/php.exe',psql='C:/Program Files/PostgreSQL/17/bin/psql.exe',tag=crypto.randomBytes(6).toString('hex'),root=path.join(state.root,'private/receipt-composition-'+tag),app=path.join(root,'app'),bundle=path.join(root,'bundle'),hostDb='budget_core_sgf_'+tag,hostRole='ir_composition_'+tag,nativeDb='compras_receipts_test_'+tag,nativeRole='payable_history_native_'+tag; +fs.mkdirSync(root);const hostPassword=crypto.randomBytes(32).toString('hex'),nativePassword=crypto.randomBytes(32).toString('hex'),admin=fs.readFileSync(path.join(state.root,'private/admin-password.txt'),'utf8').trim(); +const pg=input=>{const r=spawnSync(psql,['-h','127.0.0.1','-p','55439','-U','sgf_regression_owner','-d','postgres','-Atq','-v','ON_ERROR_STOP=1'],{input,encoding:'utf8',windowsHide:true,env:{...process.env,PGPASSWORD:admin}});if(r.status!==0)throw Error('Private QA provisioning failed');return r.stdout.trim();}; +if(pg("SELECT current_setting('cluster_name')")!=='sgf_modular_regression_'+state.id)throw Error('Wrong physical cluster'); +for(const [db,role,password]of [[hostDb,hostRole,hostPassword],[nativeDb,nativeRole,nativePassword]])pg(`CREATE ROLE ${role} LOGIN PASSWORD '${password}' NOSUPERUSER NOCREATEDB NOCREATEROLE NOREPLICATION NOBYPASSRLS; CREATE DATABASE ${db} OWNER ${role}; REVOKE ALL ON DATABASE ${db} FROM PUBLIC;`); +const storage=path.join(root,'native-storage');for(const d of ['framework/cache/data','framework/views','framework/sessions','logs','cache'])fs.mkdirSync(path.join(storage,d),{recursive:true}); +const stockPeriod=process.argv.includes('stock-period'),stockTrace=process.argv.includes('stock-trace')||stockPeriod,stockComposition=process.argv.includes('stock-composition')||stockTrace,obligationEvidence=process.argv.includes('obligation-evidence')||stockComposition,invoiceProgress=process.argv.includes('invoice-progress')||obligationEvidence,requestHistory=process.argv.includes('request-history')||invoiceProgress,continuity=process.argv.includes('continuity')||requestHistory,focus=process.argv.includes('focus')||continuity,receiptDocuments=process.argv.includes('receipt-documents')||focus,supplierDocuments=process.argv.includes('supplier-documents')||receiptDocuments,receiptWorkspace=process.argv.includes('receipt-workspace')||supplierDocuments,dossiers=process.argv.includes('dossiers')||receiptWorkspace,supplierSearch=process.argv.includes('supplier-search'),integrated=process.argv.includes('integrated')||supplierSearch||dossiers,obligations=process.argv.includes('obligations')||integrated,invoices=process.argv.includes('invoices')||obligations,geography=process.argv.includes('geography')||integrated,requests=process.argv.includes('requests')||geography,suppliers=process.argv.includes('suppliers')||requests,sourcing=process.argv.includes('sourcing')||suppliers;const nativeSettings={stockPeriod,stockTrace,stockComposition,obligationEvidence,invoiceProgress,requestHistory,continuity,focus,receiptDocuments,supplierDocuments,receiptWorkspace,dossiers,supplierSearch,integrated,obligations,invoices,requests,suppliers,sourcing,tag,root,database:nativeDb,role:nativeRole,password:nativePassword,storage,native:source,ledger:path.resolve('packages/general-ledger'),run:state.id,app_key:'base64:'+crypto.randomBytes(32).toString('base64')};fs.writeFileSync(path.join(root,'settings.json'),JSON.stringify(nativeSettings,null,2)); +function run(args,cwd=repo,env=process.env,log='step'){const r=spawnSync(php,args,{cwd,env,encoding:'utf8',windowsHide:true,timeout:180000,maxBuffer:2*1024*1024});fs.writeFileSync(path.join(root,log+'.log'),r.stdout+'\n'+r.stderr);if(r.status!==0)throw Error(log+' failed; private diagnostics preserved for '+tag);} +const orders=process.argv.includes('orders')||sourcing||invoices;run(['scripts/stock-ledger-entry.php',path.join(root,'settings.json'),orders?'order-native-setup':'receipt-native-setup'],repo,process.env,'native-setup');if(invoices&&!integrated)run(['scripts/stock-ledger-entry.php',path.join(root,'settings.json'),'invoice-native-negative'],repo,process.env,'invoice-negative'); +if(geography||invoices){const ref=path.join(state.root,'private/receipt-composition-297f4626f01f');for(const name of ['bundle','economic','internal'])fs.cpSync(path.join(ref,name),path.join(root,name),{recursive:true});}else run(['scripts/build-receipt-runtime.php',source,bundle],repo,process.env,'namespace-bundle');if(orders&&!geography&&!invoices){const economic=path.join(root,'economic'),files={};fs.mkdirSync(economic);for(const file of ['ProposalScoring.php','QuotationPricing.php']){const bytes=fs.readFileSync(path.join(source,'packages/purchasing/src',file));fs.writeFileSync(path.join(economic,file),bytes);files[file]=crypto.createHash('sha256').update(bytes).digest('hex');}fs.writeFileSync(path.join(economic,'manifest.json'),JSON.stringify({files},null,2));} +if(requests&&!geography&&!invoices){const internal=path.join(root,'internal'),files={};fs.mkdirSync(internal);for(const file of ['RequisitionPort.php','RequisitionFailure.php','InternalRequisitions.php']){const bytes=fs.readFileSync(path.join(source,'packages/purchasing/src',file));fs.writeFileSync(path.join(internal,file),bytes);files[file]=crypto.createHash('sha256').update(bytes).digest('hex');}fs.writeFileSync(path.join(internal,'manifest.json'),JSON.stringify({files},null,2));} +for(const dir of ['app','bootstrap','config','routes','resources','database','public'])fs.cpSync(dir,path.join(app,dir),{recursive:true,filter:p=>!p.replaceAll('\\','/').includes('bootstrap/cache')}); +for(const pkg of ['budget-control','payables','general-ledger','module-updates','purchasing','inventory-read'])fs.cpSync(path.join('packages',pkg),path.join(app,'packages',pkg),{recursive:true}); +fs.cpSync(path.join(source,'packages/inventory-write'),path.join(app,'packages/inventory-write'),{recursive:true}); +fs.symlinkSync(path.join(repo,'vendor'),path.join(app,'vendor'),'junction');fs.copyFileSync('composer.json',path.join(app,'composer.json')); +for(const d of ['bootstrap/cache','storage/logs','storage/framework/cache/data','storage/framework/sessions','storage/framework/views'])fs.mkdirSync(path.join(app,d),{recursive:true}); +const hash=f=>crypto.createHash('sha256').update(fs.readFileSync(f)).digest('hex'); +const nativeConnection={driver:'pgsql',host:'127.0.0.1',port:55439,database:nativeDb,username:nativeRole,password:nativePassword,charset:'utf8',prefix:'',search_path:'public',sslmode:'prefer'}; +const demo=process.argv[2]==='demo';const env={...process.env,APP_ENV:'budget-testing',APP_KEY:'base64:'+crypto.randomBytes(32).toString('base64'),APP_DEBUG:'false',APP_BASE_PATH:app,DB_CONNECTION:'pgsql',DB_HOST:'127.0.0.1',DB_PORT:'55439',DB_DATABASE:hostDb,DB_USERNAME:hostRole,DB_PASSWORD:hostPassword,DB_URL:'',SESSION_DRIVER:'file',SESSION_COOKIE:'sgf_receipts_'+tag,CACHE_STORE:'array',QUEUE_CONNECTION:'sync',BCRYPT_ROUNDS:'4',SGF_ISOLATED_REGRESSION_RUN:state.id,SGF_REQUISITIONS_QA_ENABLED:'false',SGF_RECEIPTS_QA_ENABLED:'true',SGF_ORDERS_QA_ENABLED:orders?'true':'false',SGF_SOURCING_QA_ENABLED:sourcing?'true':'false',SGF_SUPPLIERS_QA_ENABLED:suppliers?'true':'false',SGF_STOCK_PERIOD_QA_ENABLED:stockPeriod?'true':'false',SGF_STOCK_RECEIPT_TRACE_QA_ENABLED:stockTrace?'true':'false',SGF_COMPOSITION_STOCK_READ_QA_ENABLED:stockComposition?'true':'false',SGF_OBLIGATION_EVIDENCE_QA_ENABLED:obligationEvidence?'true':'false',SGF_INVOICE_PROGRESS_QA_ENABLED:invoiceProgress?'true':'false',SGF_REQUEST_HISTORY_QA_ENABLED:requestHistory?'true':'false',SGF_PURCHASING_CONTINUITY_QA_ENABLED:continuity?'true':'false',SGF_PURCHASING_FOCUS_QA_ENABLED:focus?'true':'false',SGF_RECEIPT_DOCUMENTS_QA_ENABLED:receiptDocuments?'true':'false',SGF_SUPPLIER_DOCUMENTS_QA_ENABLED:supplierDocuments?'true':'false',SGF_DOSSIERS_QA_ENABLED:dossiers?'true':'false',SGF_REQUESTS_QA_ENABLED:requests?'true':'false',PAYABLE_SOURCE_INSTANCE:obligations?'qa-stock-ledger-'+tag:'',SGF_OBLIGATIONS_QA_ENABLED:obligations?'true':'false',SGF_INVOICES_QA_ENABLED:invoices?'true':'false',SGF_GEOGRAPHY_QA_ENABLED:geography?'true':'false',SGF_GEOGRAPHY_SOURCE_SHA256:'70996d9a9133785a848de90bedb4bf685e24d8f823cd153c0adc43eac642a292',SGF_RECEIPTS_QA_PROFILE:path.join(root,'binding.json'),RECEIPT_COMPOSITION_STATE:path.join(root,'state.json'),...(demo?{RECEIPT_PROOF_PREPARE_ONLY:'true'}:{})}; +fs.writeFileSync(path.join(root,'state.json'),JSON.stringify({tag,root,app,bundle,env,nativeConnection,orders,sourcing,suppliers,requests,stockPeriod,stockTrace,stockComposition,obligationEvidence,invoiceProgress,requestHistory,continuity,focus,receiptDocuments,supplierDocuments,receiptWorkspace,dossiers,supplierSearch,integrated,geography,obligations,invoices,manifest_sha256:hash(path.join(bundle,'manifest.json'))},null,2)); +console.log(JSON.stringify({tag,root,native_setup:true,namespace_bundle:true})); +if(integrated){for(const [file,log]of [['receipt-composition-proof.php','host-schema'],['order-host-setup.php','order-host'],['sourcing-host-setup.php','sourcing-host'],['supplier-host-setup.php','supplier-host'],['request-host-setup.php','request-host'],['geography-host-setup.php','geography-host'],['invoice-host-setup.php','invoice-host'],['obligation-host-setup.php','obligation-host'],['purchasing-integrated-setup.php','integrated-host']])run([path.join(repo,'scripts',file)],app,{...env,RECEIPT_PROOF_PREPARE_ONLY:'true'},log);if(!demo)run([path.join(repo,'scripts/purchasing-integrated-proof.php')],app,env,'integrated-proof');}else if(orders){run([path.join(repo,'scripts/receipt-composition-proof.php')],app,{...env,RECEIPT_PROOF_PREPARE_ONLY:'true'},'host-schema');run([path.join(repo,'scripts/order-host-setup.php')],app,env,'order-host');if(sourcing){run([path.join(repo,'scripts/sourcing-host-setup.php')],app,env,'sourcing-host');if(suppliers){run([path.join(repo,'scripts/supplier-host-setup.php')],app,env,'supplier-host');if(requests){run([path.join(repo,'scripts/request-host-setup.php')],app,env,'request-host');if(geography){run([path.join(repo,'scripts/geography-host-setup.php')],app,env,'geography-host');if(!demo)run([path.join(repo,'scripts/geography-composition-proof.php')],app,env,'geography-proof');}else if(!demo){run([path.join(repo,'scripts/request-composition-proof.php')],app,env,'request-proof');if(!fs.existsSync(path.join(root,'request-result.json')))throw Error('Request proof did not complete; do not continue dependent workflow');run([path.join(repo,'scripts/sourcing-composition-proof.php')],app,env,'request-sourcing-proof');}}else if(!demo)run([path.join(repo,'scripts/supplier-composition-proof.php')],app,env,'supplier-proof');}else if(!demo)run([path.join(repo,'scripts/sourcing-composition-proof.php')],app,env,'sourcing-proof');}else if(invoices){run([path.join(repo,'scripts/invoice-host-setup.php')],app,env,'invoice-host');if(obligations)run([path.join(repo,'scripts/obligation-host-setup.php')],app,env,'obligation-host');if(!demo&&obligations)run([path.join(repo,'scripts/obligation-composition-proof.php')],app,env,'obligation-proof');else if(!demo)run([path.join(repo,'scripts/invoice-composition-proof.php')],app,env,'invoice-proof');}else if(!demo)run([path.join(repo,'scripts/order-composition-proof.php')],app,env,'order-proof');}else run([path.join(repo,'scripts/receipt-composition-proof.php')],app,env,'composition-proof'); +if(stockComposition){run([path.join(repo,'scripts/composition-stock-setup.php')],app,env,'composition-stock-setup');if(!fs.existsSync(path.join(root,'composition-stock-baseline.json')))throw Error('Stock setup incomplete');} +console.log(JSON.stringify({tag,passed:JSON.parse(fs.readFileSync(path.join(root,integrated?(demo?'integrated-baseline.json':'integrated-result.json'):obligations?(demo?'obligation-baseline.json':'obligation-result.json'):invoices?(demo?'invoice-baseline.json':'invoice-result.json'):geography?(demo?'geography-baseline.json':'geography-result.json'):requests?(demo?'request-baseline.json':'request-result.json'):suppliers?(demo?'supplier-baseline.json':'supplier-result.json'):sourcing?(demo?'sourcing-baseline.json':'sourcing-result.json'):orders?(demo?'order-baseline.json':'order-result.json'):(demo?'demo-baseline.json':'result.json')))).passed,demo})); diff --git a/scripts/receipt-demo-launch.mjs b/scripts/receipt-demo-launch.mjs new file mode 100644 index 0000000..b013c3b --- /dev/null +++ b/scripts/receipt-demo-launch.mjs @@ -0,0 +1,4 @@ +import fs from 'node:fs';import path from 'node:path';import net from 'node:net';import {spawn} from 'node:child_process'; +const tag=process.argv[2];if(!/^[a-f0-9]{12}$/.test(tag??''))throw Error('QA tag required');const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),root=path.join(run.root,'private/receipt-composition-'+tag),s=JSON.parse(fs.readFileSync(path.join(root,'state.json'))),out=path.join(root,'demo-server.json');const port=s.stockPeriod?8085:s.stockTrace?8084:s.stockComposition?8083:s.obligationEvidence?8082:s.invoiceProgress?8081:s.requestHistory?8080:s.continuity?8079:s.focus?8078:s.receiptDocuments?8077:s.supplierDocuments?8076:s.receiptWorkspace?8075:s.dossiers?8074:s.supplierSearch?8073:s.integrated?8072:s.obligations?8071:s.invoices?8070:s.geography?8069:s.requests?8068:s.suppliers?8067:s.sourcing?8066:s.orders?8065:8064;if(fs.existsSync(out)||!fs.existsSync(path.join(root,s.integrated?'integrated-baseline.json':s.obligations?'obligation-baseline.json':s.invoices?'invoice-baseline.json':s.geography?'geography-baseline.json':s.requests?'request-baseline.json':s.suppliers?'supplier-baseline.json':s.sourcing?'sourcing-baseline.json':s.orders?'order-baseline.json':'demo-baseline.json')))throw Error('New prepared demonstration required'); +await new Promise((resolve,reject)=>{const probe=net.createServer();probe.once('error',reject);probe.listen(port,'127.0.0.1',()=>probe.close(resolve));}); +const stdout=fs.openSync(path.join(root,'demo-stdout.log'),'a'),stderr=fs.openSync(path.join(root,'demo-stderr.log'),'a'),child=spawn('C:/laragon/tools/sgf-tempo/php-8.4.27/php.exe',['-S','127.0.0.1:'+port,'-t',path.join(s.app,'public'),path.resolve('scripts/receipt-composition-http.php')],{cwd:s.app,env:s.env,detached:true,windowsHide:true,stdio:['ignore',stdout,stderr]});fs.writeFileSync(out,JSON.stringify({pid:child.pid,port,tag,root,qa_only:true,created:new Date().toISOString()},null,2));child.unref();console.log(JSON.stringify({pid:child.pid,port,tag})); diff --git a/scripts/receipt-demo-smoke.php b/scripts/receipt-demo-smoke.php new file mode 100644 index 0000000..ff77792 --- /dev/null +++ b/scripts/receipt-demo-smoke.php @@ -0,0 +1,5 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.demo_receipt_verify'=>$s['nativeConnection']]);$db=DB::connection('demo_receipt_verify');$checks=[];$ok=function($v,$name)use(&$checks){if(!$v)throw new RuntimeException($name);$checks[]=$name;};$fingerprint=function()use($db){$h=hash_init('sha256');foreach(['goods_receipts','goods_receipt_items','stock_movements','audit_logs']as$table){hash_update($h,$table);foreach($db->table($table)->orderBy('id')->get()as$row)hash_update($h,json_encode((array)$row,JSON_THROW_ON_ERROR));}return hash_final($h);};$before=$fingerprint();$ok($db->table('goods_receipts')->count()===0&&$db->table('stock_movements')->count()===0,'new demonstration starts with unconsumed receipt and movement decisions');$client=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:8064','http_errors'=>false,'timeout'=>20]); +foreach(['actor'=>true,'validator'=>false,'issuer'=>false]as$role=>$can){$jar=new GuzzleHttp\Cookie\CookieJar;$r=$client->get('/qa/enter/'.$role,['cookies'=>$jar]);$v=json_decode((string)$r->getBody(),true);$options=['cookies'=>$jar,'headers'=>['Accept'=>'application/json','X-SGF-Context'=>$v['context']]];$r=$client->get('/api/purchasing-receipts/orders/'.$n['order'],$options);$d=json_decode((string)$r->getBody(),true);$ok($r->getStatusCode()===200&&$d['can_confirm']===$can,'demo exposes exact receipt capability for '.$role);$r=$client->get('/purchasing/receipts',$options);$ok($r->getStatusCode()===200&&str_contains((string)$r->getBody(),'receipt-workspace.mjs'),'functional screen available for '.$role);} +$r=$client->get('/receipt-workspace.mjs');$ok($r->getStatusCode()===200&&hash('sha256',(string)$r->getBody())===hash_file('sha256',$s['app'].'/public/receipt-workspace.mjs'),'live receipt interface matches delivered source');$ok($fingerprint()===$before,'read-only smoke preserves all initial business evidence');file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'before'=>$before,'after'=>$fingerprint(),'receipts'=>0,'movements'=>0,'visual_review'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." demonstration read checks passed.\n"; diff --git a/scripts/receipt-documents-assets.mjs b/scripts/receipt-documents-assets.mjs new file mode 100644 index 0000000..41ec42f --- /dev/null +++ b/scripts/receipt-documents-assets.mjs @@ -0,0 +1,2 @@ +import fs from 'node:fs';import path from 'node:path';import assert from 'node:assert/strict';import crypto from 'node:crypto';import {spawnSync} from 'node:child_process'; +const tag=process.argv[2];assert(/^[a-f0-9]{12}$/.test(tag??''));const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),root=path.join(run.root,'private/receipt-composition-'+tag),s=JSON.parse(fs.readFileSync(path.join(root,'state.json'))),out=path.join(root,'receipt-documents-assets.json');assert(s.receiptDocuments&&!fs.existsSync(out));if(!fs.existsSync(path.join(root,'receipt-documents-build.log'))){const result=spawnSync(process.execPath,['node_modules/vite/bin/vite.js','build','--outDir',path.join(s.app,'public/build')],{cwd:process.cwd(),encoding:'utf8',windowsHide:true,timeout:180000});fs.writeFileSync(path.join(root,'receipt-documents-build.log'),result.stdout+'\n'+result.stderr);assert.equal(result.status,0,'private build');}else assert(fs.readFileSync(path.join(root,'receipt-documents-build.log'),'utf8').includes('built in'),'prior build succeeded');const manifest=JSON.parse(fs.readFileSync(path.join(s.app,'public/build/manifest.json'))),files=Object.values(manifest).flatMap(v=>[v.file,...(v.css??[])]),checks=['private frontend build succeeds'];for(const file of files){const bytes=fs.readFileSync(path.join(s.app,'public/build',file)),r=await fetch('http://127.0.0.1:8077/build/'+file);assert.equal(r.status,200);assert.equal(crypto.createHash('sha256').update(Buffer.from(await r.arrayBuffer())).digest('hex'),crypto.createHash('sha256').update(bytes).digest('hex'));}checks.push('served built assets match private build');const r=await fetch('http://127.0.0.1:8077/supplier-documents.mjs');assert.equal(r.status,200);checks.push('supplier document module is served through private static whitelist');fs.writeFileSync(out,JSON.stringify({passed:true,checks,assets:files,visual_review:false},null,2));console.log(JSON.stringify({passed:true,checks:checks.length})); diff --git a/scripts/receipt-documents-body.php b/scripts/receipt-documents-body.php new file mode 100644 index 0000000..69cc6d9 --- /dev/null +++ b/scripts/receipt-documents-body.php @@ -0,0 +1,29 @@ +$r['data']['revision'],'idempotency_key'=>(string)Str::uuid(),'delivery_note'=>'QA-DOCUMENT-ORIGIN','received_on'=>date('Y-m-d'),'warehouse_id'=>$n['warehouse'],'items'=>[['purchase_order_item_id'=>$order['items'][0]['id'],'received_quantity'=>'1.000','accepted_quantity'=>'1.000','quality_status'=>'compliant','stock_item_id'=>$n['stock'],'notes'=>null]]]);$r=$call('validator',$receiptUrl.'/confirm',['preview'=>$p['data']['preview']]);if($r['status']!==201)throw new RuntimeException('Receipt origin failed');$id=$r['data']['receipt']['id'];$url='/api/purchasing-receipts/history/'.$id;$docs=$url.'/documents'; +$bytes=base64_decode('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAusB9Wl6pAoAAAAASUVORK5CYII=').str_repeat("\0",2048);file_put_contents($s['root'].'/qa-document.png',$bytes);$enter('validator',1); +$send=function($path,$fields=[],$content=null,$filename='qa-document.png',$i=0)use($clients,$options,$bytes){$parts=[];foreach($fields as$name=>$value)$parts[]=['name'=>$name,'contents'=>(string)$value];$parts[]=['name'=>'file','contents'=>$content??$bytes,'filename'=>$filename];$r=$clients[$i]->post($path,$options('validator',$i)+['multipart'=>$parts]);$text=(string)$r->getBody();return ['status'=>$r->getStatusCode(),'data'=>json_decode($text,true),'body'=>$text];}; +$preview=function($key=null,$content=null,$filename='qa-document.png',$i=0,$type='delivery_note')use($send,$call,$url,$docs){$r=$call('validator',$url,null,$i);return $send($docs.'/preview',['operation_key'=>$key??(string)Str::uuid(),'revision'=>$r['data']['document_revision'],'document_type'=>$type,'reason'=>'Evidencia sintetica individual da entrega recebida.'],$content,$filename,$i);};$confirm=fn($cut,$content=null,$filename='qa-document.png',$i=0)=>$send($docs.'/confirm',['preview'=>$cut],$content,$filename,$i); +$countFiles=function($dir){if(!is_dir($dir))return 0;$count=0;foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir,FilesystemIterator::SKIP_DOTS))as$file)if($file->isFile())$count++;return $count;};$root=$s['root'].'/receipt-documents';$stage=$s['root'].'/receipt-document-previews'; +$physical=fn()=>hash('sha256',json_encode(array_map(fn($t)=>$db->table($t)->orderBy('id')->get(),['goods_receipts','goods_receipt_items','stock_movements','purchase_orders','purchase_order_items'])));$before=$physical();$audits=$db->table('audit_logs')->count(); +$ok($db->table('receipt_documents')->count()===0,'fresh native receipt document book begins empty');$r=$call('validator',$url);$ok($r['status']===200&&$r['data']['documents_enabled']===true&&$r['data']['can_attach']===true,'receipt detail exposes attachment revision and existing warehouse capability');$r=$call('validator',$docs);$ok($r['status']===200&&$r['data']['data']===[]&&$r['data']['per_page']===15,'private metadata has server pagination15'); +$ok($call('requester',$docs)['status']===403&&$call('approver',$docs)['status']===403,'request-only roles cannot inspect receipt attachment metadata'); +$p=$preview();$ok($p['status']===200&&$p['data']['impact']['document']['sha256']===hash('sha256',$bytes)&&$p['data']['impact']['receipt_unchanged']&&!$p['data']['impact']['reused']&&!isset($p['data']['impact']['document']['path']),'preview uses original service and explicit safe metadata and impact');$ok($db->table('receipt_documents')->count()===0&&$db->table('audit_logs')->count()===$audits&&$countFiles($root)===0&&$countFiles($stage)===0&&$physical()===$before,'preview rolls back document and audit and removes only staged file'); +$ok($preview(null,str_repeat('not an image',200))['status']===422&&$preview(null,$bytes,'qa.php')['status']===422&&$preview(null,null,'qa-document.png',0,'invalid')['status']===422,'native content extension and type validation preserved'); +$key=(string)Str::uuid();$p0=$preview($key);$p1=$preview($key,null,'qa-document.png',1);$ok($p0['status']===200&&$p1['status']===200,'independent sessions prepare same native operation key');$ok($confirm($p0['data']['preview'],$bytes.'substituted')['status']===409,'confirmation rejects substituted bytes'); +$fScope=$f['scope'];$grant=DB::table('permission_grants')->where($fScope)->where('user_id',$f['validator'])->where('permission','purchasing_receipts.confirm')->first();if(!$grant)throw new RuntimeException('Validator grant fixture not found');DB::table('permission_grants')->where('id',$grant->id)->delete();try{$ok($confirm($p0['data']['preview'])['status']===403,'confirmation rechecks existing host permission');}finally{DB::table('permission_grants')->insert((array)$grant);} +$db->unprepared("CREATE FUNCTION public.receipt_document_fail() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN IF NEW.action='sgf.receipt.document' THEN RAISE EXCEPTION 'QA_DOCUMENT_FAILURE'; END IF; RETURN NEW; END $$; CREATE TRIGGER receipt_document_fail BEFORE INSERT ON audit_logs FOR EACH ROW EXECUTE FUNCTION receipt_document_fail()");try{$r=$confirm($p0['data']['preview']);$ok($r['status']===500&&$db->table('receipt_documents')->count()===0&&$countFiles($root)===0,'outer provenance failure rolls back native document and compensates proven uncommitted file');}finally{$db->unprepared('DROP TRIGGER receipt_document_fail ON audit_logs; DROP FUNCTION public.receipt_document_fail()');} +$parts=fn($cut)=>[['name'=>'preview','contents'=>$cut],['name'=>'file','contents'=>$bytes,'filename'=>'qa-document.png']];$responses=GuzzleHttp\Promise\Utils::unwrap([$clients[0]->postAsync($docs.'/confirm',$options('validator')+['multipart'=>$parts($p0['data']['preview'])]),$clients[1]->postAsync($docs.'/confirm',$options('validator',1)+['multipart'=>$parts($p1['data']['preview'])])]);$statuses=array_map(fn($r)=>$r->getStatusCode(),$responses);sort($statuses);$ok($statuses===[200,201]&&$db->table('receipt_documents')->count()===1&&$countFiles($root)===1,'concurrent confirmations finish once with201 and replay200 after lock release');$document=$db->table('receipt_documents')->first();$ok($confirm($p0['data']['preview'])['status']===200&&$db->table('audit_logs')->where('action','sgf.receipt.document')->count()===1,'lost-response replay creates no additional root decision'); +$reuse=$preview(null,null,'another-name.png');$ok($reuse['status']===200&&$reuse['data']['impact']['reused']&&$countFiles($root)===1&&$countFiles($stage)===0,'preview of same type and hash reuses original without deleting permanent file');$r=$confirm($reuse['data']['preview'],null,'another-name.png');$ok($r['status']===201&&$r['data']['reused']&&$r['data']['document_id']===$document->id&&$db->table('receipt_documents')->count()===1&&$countFiles($root)===1,'new explicit intent reuses original native document and filename without another file'); +$r=$preview($key,$bytes.'different');$ok($r['status']===422,'native key rejects another content before confirmation');$r=$call('validator',$docs);$ok(!isset($r['data']['data'][0]['path'],$r['data']['data'][0]['tenant_id']),'metadata never exposes private path or native tenant'); +$response=$clients[0]->get($docs.'/'.$document->id.'/download',$options('validator'));$ok($response->getStatusCode()===200&&(string)$response->getBody()===$bytes&&str_contains($response->getHeaderLine('Content-Disposition'),'attachment')&&$response->getHeaderLine('X-Content-Type-Options')==='nosniff'&&str_contains($response->getHeaderLine('Content-Security-Policy'),'sandbox'),'native download checks original hash and streams private sandboxed bytes');$ok($db->table('audit_logs')->where('action','sgf.receipt.document_downloaded')->count()===1,'authorised download trace linked to original requisition'); +$path=$root.'/'.$document->path;file_put_contents($path,'QA changed bytes');try{$ok($call('validator',$docs.'/'.$document->id.'/download')['status']===409&&$confirm($p0['data']['preview'])['status']===409,'tampered stored evidence blocks both download and replay');}finally{file_put_contents($path,$bytes);} +$ok($call('validator','/api/purchasing-receipts/history/999999/documents/'.$document->id.'/download')['status']===404,'document cannot cross receipt parent'); +// Bounded volume fixture through the same native service, not repeated HTTP workflow tests. +$user=App\Models\User::findOrFail($f['validator']);auth()->setUser($user);request()->setUserResolver(fn()=>$user);app(App\Shared\Context\CompanyContext::class)->selectFor($user->id,$f['tenant'],$f['company'],$f['unit']); +(new App\Modules\Purchasing\ReceiptRuntime)->run('purchasing_receipts.confirm',function($a)use($id,$s,$bytes){$receipt=Tempo\Purchasing\Embedded\Models\GoodsReceipt::findOrFail($id);$files=app(App\Modules\Purchasing\SupplierDocumentFiles::class);$files->using($files->root(false,'receipt'),function()use($a,$receipt,$s,$bytes){for($i=1;$i<=15;$i++){file_put_contents($s['root'].'/qa-document.png',$bytes.$i);$file=new Illuminate\Http\UploadedFile($s['root'].'/qa-document.png','QA-volume-'.$i.'.png','image/png',UPLOAD_ERR_OK,true);app(Tempo\Purchasing\Embedded\Services\ReceiptDocuments::class)->add($a,$receipt,['operation_key'=>(string)Str::uuid(),'document_type'=>'quality'],$file);}},'receipt_documents');}); +$r=$call('validator',$docs.'?page=1');$r2=$call('validator',$docs.'?page=2');$ok($r['status']===200&&count($r['data']['data'])===15&&count($r2['data']['data'])===1&&array_intersect(array_column($r['data']['data'],'id'),array_column($r2['data']['data'],'id'))===[],'16 documents span distinct15 and1 pages');$ok($countFiles($root)===16&&$countFiles($stage)===0,'permanent files match native documents and preview files are absent'); +$r=$call('actor','/api/purchasing-dossiers/'.$request);if($r['status']===200)$r=$call('actor','/api/purchasing-dossiers/'.$request.'?events_page='.$r['data']['events']['pagination']['last_page']);$ok($r['status']===200&&array_filter($r['data']['events']['data']??[],fn($v)=>str_starts_with($v['action'],'receipt.document')||$v['action']==='sgf.receipt.document_downloaded'),'receipt evidence appears in authorised requisition dossier timeline'); +$enter('validator',1,['module'=>'commercial']);$ok($call('validator',$docs,null,1)['status']===403,'other module cannot reuse document capability');$enter('validator',1,['foreign'=>1]);$ok($call('validator',$docs,null,1)['status']===403,'unmapped unit cannot read private attachments'); +$ok($physical()===$before,'attachments preserve receipt quantities quality acceptance orders and physical stock movements');$ok($db->table('invoices')->count()===0&&$db->table('pa_obligations')->count()===0&&$db->table('external_payments')->count()===0,'attachment decisions introduce no invoice debt payment or accounting effect'); +file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'transport_documents'=>1,'native_volume_documents'=>15,'documents'=>16,'permanent_files'=>16,'staged_files'=>0,'concurrency_statuses'=>$statuses,'new_right_names'=>[],'visual_review'=>false,'deployment_capacity_validated'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." receipt document checks passed.\n"; diff --git a/scripts/receipt-documents-demo.php b/scripts/receipt-documents-demo.php new file mode 100644 index 0000000..e3c7904 --- /dev/null +++ b/scripts/receipt-documents-demo.php @@ -0,0 +1,5 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.document_demo'=>$s['nativeConnection']]);$db=DB::connection('document_demo');$checks=[];$ok=function($v,$name)use(&$checks){if(!$v)throw new RuntimeException($name);$checks[]=$name;};$fingerprint=fn()=>hash('sha256',json_encode(array_map(fn($t)=>$db->table($t)->orderBy('id')->get(),['suppliers','goods_receipts','receipt_documents','supplier_documents','audit_logs'])));$before=$fingerprint();$ok($db->table('receipt_documents')->count()===0&&$db->table('goods_receipts')->count()===0&&$db->table('requisitions')->where('tenant_id',$n['tenant'])->count()===0,'new integrated demo starts without main requests receipts or documents');$client=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:8077','http_errors'=>false,'timeout'=>25]); +foreach(['actor','validator','requester']as$role){$jar=new GuzzleHttp\Cookie\CookieJar;$r=$client->get('/qa/enter/'.$role,['cookies'=>$jar]);$v=json_decode((string)$r->getBody(),true);$o=['cookies'=>$jar,'headers'=>['Accept'=>'application/json','X-SGF-Context'=>$v['context']]];$r=$client->get('/purchasing/receipts',$o);$ok($r->getStatusCode()===($role==='requester'?403:200),'receipt screen respects '.$role.' permission');if($role==='validator'){$r=$client->get('/api/purchasing-receipts/history/1/documents',$o);$ok($r->getStatusCode()===404,'empty demo invents no receipt attachment owner');}} +foreach(['receipt-workspace.mjs','supplier-documents.mjs']as$file){$r=$client->get('/'.$file);$ok($r->getStatusCode()===200&&hash('sha256',(string)$r->getBody())===hash_file('sha256',$s['app'].'/public/'.$file),'served receipt evidence source matches '.$file);}$ok($fingerprint()===$before,'demonstration metadata probes preserve supplier receipt document and audit book');file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'before'=>$before,'after'=>$fingerprint(),'visual_review'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." receipt document demonstration checks passed.\n"; diff --git a/scripts/receipt-documents-extra-body.php b/scripts/receipt-documents-extra-body.php new file mode 100644 index 0000000..1a6ba5f --- /dev/null +++ b/scripts/receipt-documents-extra-body.php @@ -0,0 +1,6 @@ +table('goods_receipts')->value('id');$url='/api/purchasing-receipts/history/'.$id;$docs=$url.'/documents';$bytes=file_get_contents($s['root'].'/receipt-documents/'.$db->table('receipt_documents')->where('goods_receipt_id',$id)->orderBy('id')->value('path')); +$send=function($role,$path,$fields)use($clients,$options,$bytes){$parts=[];foreach($fields as$name=>$value)$parts[]=['name'=>$name,'contents'=>$value];$parts[]=['name'=>'file','contents'=>$bytes,'filename'=>'qa-original.png'];$r=$clients[0]->post($path,$options($role)+['multipart'=>$parts]);return ['status'=>$r->getStatusCode(),'data'=>json_decode((string)$r->getBody(),true)];};$r=$call('validator',$url);$fields=['operation_key'=>(string)Str::uuid(),'revision'=>$r['data']['document_revision'],'reason'=>'Conferencia adicional da origem documental sintetica.','document_type'=>'delivery_note'];$p=$send('validator',$docs.'/preview',$fields);if($p['status']!==200)throw new RuntimeException('Additional preview failed');$cut=json_decode(Illuminate\Support\Facades\Crypt::decryptString($p['data']['preview']),true,64,JSON_THROW_ON_ERROR);$encode=fn($v)=>Illuminate\Support\Facades\Crypt::encryptString(json_encode($v,JSON_THROW_ON_ERROR));$bad=$cut;$bad['revision']=str_repeat('0',64);$ok($send('validator',$docs.'/confirm',['preview'=>$encode($bad)])['status']===409,'confirmation compares current immutable receipt revision again');$bad=$cut;$bad['observed']=time()-601;$ok($send('validator',$docs.'/confirm',['preview'=>$encode($bad)])['status']===409,'expired conference requires a new individual preview');$bad=$cut;$bad['binding']=str_repeat('0',64);$ok($send('validator',$docs.'/confirm',['preview'=>$encode($bad)])['status']===409,'changed source binding cannot confirm earlier conference');$bad=$cut;$bad['generation']=str_repeat('0',64);$ok($send('validator',$docs.'/confirm',['preview'=>$encode($bad)])['status']===409,'changed session context generation requires renewed conference'); +// Exercise the shared storage helper's original default branch, without committing supplier changes. +$supplier=$n['supplier_ids'][0];$u='/api/purchasing-suppliers/'.$supplier;$r=$call('actor',$u);$before=(array)$db->table('suppliers')->where('id',$supplier)->first();$p=$send('actor',$u.'/documents/preview',['operation_key'=>(string)Str::uuid(),'revision'=>$r['data']['revision'],'reason'=>'Prova da preservacao do armazenamento privado existente.','document_type'=>'license']);$ok($p['status']===200&&$p['data']['impact']['supplier_status']==='pending','shared storage helper preserves supplier native preview with default disk');$ok($db->table('supplier_documents')->count()===0&&(array)$db->table('suppliers')->where('id',$supplier)->first()===$before&&$db->table('receipt_documents')->count()===16,'supplier preview keeps both document namespaces and prior receipt evidence intact'); +file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'new_right_names'=>[]],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." receipt document additional checks passed.\n"; diff --git a/scripts/receipt-documents-extra.php b/scripts/receipt-documents-extra.php new file mode 100644 index 0000000..d08b890 --- /dev/null +++ b/scripts/receipt-documents-extra.php @@ -0,0 +1,9 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true);$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.sourcing_verify'=>$s['nativeConnection']]);$db=DB::connection('sourcing_verify');$checks=[];$ok=function($v,$name)use(&$checks,$s){if(!$v)throw new RuntimeException($name);$checks[]=$name;file_put_contents($s['root'].'/receipt-documents-extra-progress.json',json_encode($checks,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));};$servers=[];$clients=[];$sessions=[]; +try{ + foreach([0,1]as$i){$socket=stream_socket_server('tcp://127.0.0.1:0');$port=(int)substr(strrchr(stream_socket_get_name($socket,false),':'),1);fclose($socket);$server=new Symfony\Component\Process\Process([PHP_BINARY,'-S','127.0.0.1:'.$port,'-t',$s['app'].'/public',dirname(__DIR__).'/scripts/receipt-composition-http.php'],$s['app'],null,null,180);$server->start();$servers[]=$server;for($j=0;$j<80;$j++){if($socket=@fsockopen('127.0.0.1',$port,$errno,$error,.1)){fclose($socket);break;}usleep(50000);}$clients[]=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:'.$port,'http_errors'=>false,'timeout'=>25]);} + $enter=function($role,$i=0,$query=[])use(&$sessions,$clients){$jar=new GuzzleHttp\Cookie\CookieJar;$r=$clients[$i]->get('/qa/enter/'.$role,['cookies'=>$jar,'query'=>$query]);$sessions[$role.$i]=['jar'=>$jar]+json_decode((string)$r->getBody(),true,32,JSON_THROW_ON_ERROR);};$options=function($role,$i=0,$data=null,$headers=[])use(&$sessions){$v=$sessions[$role.$i];$o=['cookies'=>$v['jar'],'headers'=>$headers+['Accept'=>'application/json','X-SGF-Context'=>$v['context'],'X-CSRF-TOKEN'=>$v['csrf']]];if($data!==null)$o['json']=$data;return $o;};$call=function($role,$path,$data=null,$i=0,$headers=[])use($clients,$options,$s){$r=$clients[$i]->request($data===null?'GET':'POST',$path,$options($role,$i,$data,$headers));$text=(string)$r->getBody();if($r->getStatusCode()>=500)file_put_contents($s['root'].'/receipt-documents-last-500.txt',$text);return ['status'=>$r->getStatusCode(),'data'=>json_decode($text,true),'body'=>$text];};foreach(['actor','issuer','validator','reviewer','auditor','requester','approver']as$role)$enter($role);$enter('issuer',1);$enter('auditor',1);$base='/api/purchasing-invoices'; + require dirname(__DIR__).'/scripts/receipt-documents-extra-body.php'; +}finally{foreach($servers as$i=>$server){$server->stop(2);file_put_contents($s['root'].'/receipt-documents-http-'.$i.'.log',$server->getOutput().$server->getErrorOutput());}} diff --git a/scripts/receipt-documents-guards.php b/scripts/receipt-documents-guards.php new file mode 100644 index 0000000..c7662e7 --- /dev/null +++ b/scripts/receipt-documents-guards.php @@ -0,0 +1,4 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$queries=0;$checks=[];DB::listen(function()use(&$queries){$queries++;});$c=new App\Modules\Purchasing\ReceiptDocumentsController;$runtime=new App\Modules\Purchasing\ReceiptRuntime; +$check=function($fn,$status,$name)use(&$checks){try{$fn();throw new RuntimeException('Unexpected acceptance');}catch(Symfony\Component\HttpKernel\Exception\HttpException $e){if($e->getStatusCode()!==$status)throw $e;}$checks[]=$name;};config(['receipt_qa.receipt_documents_enabled'=>false]);$check(fn()=>$c->index(1,new Illuminate\Http\Request,$runtime),404,'disabled document metadata refuses before SQL');$check(fn()=>$c->preview(1,new Illuminate\Http\Request,$runtime),404,'disabled upload refuses before validation storage and SQL');config(['receipt_qa.receipt_documents_enabled'=>true]);$app->instance('env','production');$check(fn()=>$c->index(1,new Illuminate\Http\Request,$runtime),403,'production refuses synthetic document adapter before SQL');if($queries!==0||App\Shared\Context\ModuleNavigation::owner('api/purchasing-receipts/history/1/documents/1/download')!=='purchasing')throw new RuntimeException('Document guard scope');$checks[]='document route belongs to purchasing and guard probes issue zero SQL';file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'database_queries'=>0],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." document guard checks passed.\n"; diff --git a/scripts/receipt-documents-proof.php b/scripts/receipt-documents-proof.php new file mode 100644 index 0000000..4662a7c --- /dev/null +++ b/scripts/receipt-documents-proof.php @@ -0,0 +1,10 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true);$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.sourcing_verify'=>$s['nativeConnection']]);$db=DB::connection('sourcing_verify');$checks=[];$ok=function($v,$name)use(&$checks,$s){if(!$v)throw new RuntimeException($name);$checks[]=$name;file_put_contents($s['root'].'/receipt-documents-progress.json',json_encode($checks,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));};$servers=[];$clients=[];$sessions=[]; +try{ + foreach([0,1]as$i){$socket=stream_socket_server('tcp://127.0.0.1:0');$port=(int)substr(strrchr(stream_socket_get_name($socket,false),':'),1);fclose($socket);$server=new Symfony\Component\Process\Process([PHP_BINARY,'-S','127.0.0.1:'.$port,'-t',$s['app'].'/public',dirname(__DIR__).'/scripts/receipt-composition-http.php'],$s['app'],null,null,180);$server->start();$servers[]=$server;for($j=0;$j<80;$j++){if($socket=@fsockopen('127.0.0.1',$port,$errno,$error,.1)){fclose($socket);break;}usleep(50000);}$clients[]=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:'.$port,'http_errors'=>false,'timeout'=>25]);} + $enter=function($role,$i=0,$query=[])use(&$sessions,$clients){$jar=new GuzzleHttp\Cookie\CookieJar;$r=$clients[$i]->get('/qa/enter/'.$role,['cookies'=>$jar,'query'=>$query]);$sessions[$role.$i]=['jar'=>$jar]+json_decode((string)$r->getBody(),true,32,JSON_THROW_ON_ERROR);};$options=function($role,$i=0,$data=null,$headers=[])use(&$sessions){$v=$sessions[$role.$i];$o=['cookies'=>$v['jar'],'headers'=>$headers+['Accept'=>'application/json','X-SGF-Context'=>$v['context'],'X-CSRF-TOKEN'=>$v['csrf']]];if($data!==null)$o['json']=$data;return $o;};$call=function($role,$path,$data=null,$i=0,$headers=[])use($clients,$options,$s){$r=$clients[$i]->request($data===null?'GET':'POST',$path,$options($role,$i,$data,$headers));$text=(string)$r->getBody();if($r->getStatusCode()>=500)file_put_contents($s['root'].'/receipt-documents-last-500.txt',$text);return ['status'=>$r->getStatusCode(),'data'=>json_decode($text,true),'body'=>$text];};foreach(['actor','issuer','validator','reviewer','auditor','requester','approver']as$role)$enter($role);$enter('issuer',1);$enter('auditor',1);$base='/api/purchasing-invoices'; + require dirname(__DIR__).'/scripts/receipt-workspace-source.php'; + require dirname(__DIR__).'/scripts/receipt-documents-body.php'; +}finally{foreach($servers as$i=>$server){$server->stop(2);file_put_contents($s['root'].'/receipt-documents-http-'.$i.'.log',$server->getOutput().$server->getErrorOutput());}} diff --git a/scripts/receipt-documents-resume.php b/scripts/receipt-documents-resume.php new file mode 100644 index 0000000..96bda8c --- /dev/null +++ b/scripts/receipt-documents-resume.php @@ -0,0 +1,9 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true);$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.sourcing_verify'=>$s['nativeConnection']]);$db=DB::connection('sourcing_verify');$checks=array_values(array_unique(json_decode(file_get_contents($s['root'].'/receipt-documents-progress.json'),true,64,JSON_THROW_ON_ERROR)));$ok=function($v,$name)use(&$checks,$s){if(!$v)throw new RuntimeException($name);$checks[]=$name;file_put_contents($s['root'].'/receipt-documents-progress.json',json_encode($checks,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));};$servers=[];$clients=[];$sessions=[]; +try{ + foreach([0,1]as$i){$socket=stream_socket_server('tcp://127.0.0.1:0');$port=(int)substr(strrchr(stream_socket_get_name($socket,false),':'),1);fclose($socket);$server=new Symfony\Component\Process\Process([PHP_BINARY,'-S','127.0.0.1:'.$port,'-t',$s['app'].'/public',dirname(__DIR__).'/scripts/receipt-composition-http.php'],$s['app'],null,null,180);$server->start();$servers[]=$server;for($j=0;$j<80;$j++){if($socket=@fsockopen('127.0.0.1',$port,$errno,$error,.1)){fclose($socket);break;}usleep(50000);}$clients[]=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:'.$port,'http_errors'=>false,'timeout'=>25]);} + $enter=function($role,$i=0,$query=[])use(&$sessions,$clients){$jar=new GuzzleHttp\Cookie\CookieJar;$r=$clients[$i]->get('/qa/enter/'.$role,['cookies'=>$jar,'query'=>$query]);$sessions[$role.$i]=['jar'=>$jar]+json_decode((string)$r->getBody(),true,32,JSON_THROW_ON_ERROR);};$options=function($role,$i=0,$data=null,$headers=[])use(&$sessions){$v=$sessions[$role.$i];$o=['cookies'=>$v['jar'],'headers'=>$headers+['Accept'=>'application/json','X-SGF-Context'=>$v['context'],'X-CSRF-TOKEN'=>$v['csrf']]];if($data!==null)$o['json']=$data;return $o;};$call=function($role,$path,$data=null,$i=0,$headers=[])use($clients,$options,$s){$r=$clients[$i]->request($data===null?'GET':'POST',$path,$options($role,$i,$data,$headers));$text=(string)$r->getBody();if($r->getStatusCode()>=500)file_put_contents($s['root'].'/receipt-documents-last-500.txt',$text);return ['status'=>$r->getStatusCode(),'data'=>json_decode($text,true),'body'=>$text];};foreach(['actor','issuer','validator','reviewer','auditor','requester','approver']as$role)$enter($role);$enter('issuer',1);$enter('auditor',1);$base='/api/purchasing-invoices'; + require dirname(__DIR__).'/scripts/receipt-documents-tail.php'; +}finally{foreach($servers as$i=>$server){$server->stop(2);file_put_contents($s['root'].'/receipt-documents-http-'.$i.'.log',$server->getOutput().$server->getErrorOutput());}} diff --git a/scripts/receipt-documents-tail.php b/scripts/receipt-documents-tail.php new file mode 100644 index 0000000..95da153 --- /dev/null +++ b/scripts/receipt-documents-tail.php @@ -0,0 +1,5 @@ +table('goods_receipts')->value('id');$request=(int)$db->table('purchase_orders')->where('id',$db->table('goods_receipts')->where('id',$id)->value('purchase_order_id'))->value('requisition_id');$docs='/api/purchasing-receipts/history/'.$id.'/documents';$statuses=[200,201]; +$enter('validator',1,['module'=>'commercial']);$ok($call('validator',$docs,null,1)['status']===403,'other module cannot reuse document capability');$enter('validator',1,['foreign'=>1]);$ok($call('validator',$docs,null,1)['status']===403,'unmapped unit cannot read private attachments'); +$ok($db->table('goods_receipts')->count()===1&&$db->table('stock_movements')->count()===1&&(int)$db->table('stock_movements')->sum('quantity_milli')===1000,'attachment book retains one complete receipt and its original1000milli movement');$ok($db->table('invoices')->count()===0&&$db->table('pa_obligations')->count()===0&&$db->table('external_payments')->count()===0,'attachment decisions introduce no invoice debt payment or accounting effect'); +file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'transport_documents'=>1,'native_volume_documents'=>15,'documents'=>16,'permanent_files'=>16,'staged_files'=>0,'concurrency_statuses'=>$statuses,'new_right_names'=>[],'visual_review'=>false,'deployment_capacity_validated'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." receipt document checks passed.\n"; diff --git a/scripts/receipt-documents-ui.mjs b/scripts/receipt-documents-ui.mjs new file mode 100644 index 0000000..2acb3f6 --- /dev/null +++ b/scripts/receipt-documents-ui.mjs @@ -0,0 +1,13 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import assert from 'node:assert/strict'; +import {mountSupplierDocuments} from '../public/supplier-documents.mjs'; +const tag=process.argv[2];assert(/^[a-f0-9]{12}$/.test(tag??''));const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),root=path.join(run.root,'private/receipt-composition-'+tag),out=path.join(root,'receipt-documents-ui.json');assert(!fs.existsSync(out)); +class Element{constructor(tag,text){this.tag=tag;this.textContent=text??'';this.children=[];this.dataset={};this.isConnected=true;}append(...v){this.children.push(...v);}replaceChildren(...v){this.children=[...v];}} +globalThis.document={createElement:tag=>new Element(tag)};globalThis.Option=class extends Element{constructor(text,value){super('option',text);this.value=value;}}; +const checks=[],check=(v,n)=>{assert(v,n);checks.push(n);},walk=e=>[e,...e.children.flatMap(walk)],calls=[];let defer=null; +globalThis.fetch=async(url,options)=>{calls.push({url,options});if(options.method==='GET')return {ok:true,json:async()=>({data:[],current_page:1,last_page:1})};if(defer)return await new Promise(resolve=>{defer.resolve=resolve;});return {ok:true,json:async()=>url.endsWith('/preview')?{preview:'sealed',impact:{document:{original_name:'qa.png',mime_type:'image/png',size:3,sha256:'abc'},reused:true,reason:'individual reason'}}:{document_id:1}};}; +const rootNode=new Element('root');rootNode.dataset={context:'qa-context',csrf:'qa-csrf'};const mount=(receipt,canUpload=true)=>{const detail=new Element('detail');let reloaded=0;mountSupplierDocuments({id:1,revision:'a'.repeat(64),canUpload,root:rootNode,detail,active:()=>true,reload:async()=>{reloaded++;},message:()=>{},receipt,...(receipt?{basePath:'/api/purchasing-receipts/history/1/documents'}:{})});return {detail,reloaded:()=>reloaded};};const tick=()=>new Promise(resolve=>setTimeout(resolve,0)); +const supplier=mount(false);await tick();check(walk(supplier.detail).filter(v=>v.tag==='option').map(v=>v.value).join(',')===',license,tax,conflict,other','shared component preserves original supplier type choices');const receipt=mount(true);await tick();const elements=walk(receipt.detail),form=elements.find(v=>v.tag==='form'),type=elements.find(v=>v.tag==='select'),file=elements.find(v=>v.type==='file'),reason=elements.find(v=>v.tag==='textarea'),confirm=elements.find(v=>v.tag==='button'&&v.textContent==='Confirmar este anexo');check(type.children.map(v=>v.value).join(',')===',delivery_note,quality,other','receipt uses native types and an explicit initially empty choice');check(calls.every(v=>v.options.method==='GET')&&confirm.disabled,'mounting lists evidence without preparing or confirming an upload'); +type.value='delivery_note';file.files=[new File(['abc'],'qa.png',{type:'image/png'})];reason.value='individual reason';await form.onsubmit({preventDefault(){}});check(!confirm.disabled&&calls.at(-1).url==='/api/purchasing-receipts/history/1/documents/preview'&&calls.at(-1).options.body.get('revision')==='a'.repeat(64),'explicit receipt preview uses owner endpoint context and original revision');check(elements.some(v=>v.tag==='p'&&v.textContent.includes('quantidades'))||walk(receipt.detail).some(v=>v.textContent.includes('Quantidades')),'receipt impact explains preserved quantities and stock');await confirm.onclick();check(receipt.reloaded()===1&&calls.at(-1).options.body.get('preview')==='sealed','only explicit confirmation sends the preview and reloads receipt history');form.oninput();check(confirm.disabled,'editing invalidates the existing conference'); +defer={};const pending=form.onsubmit({preventDefault(){}});await tick();form.oninput();defer.resolve({ok:true,json:async()=>({preview:'stale',impact:{}})});await pending;check(confirm.disabled,'late preview cannot restore confirmation after an input edit');defer=null;const readOnly=mount(true,false);await tick();check(!walk(readOnly.detail).some(v=>v.tag==='form'),'read-only view lists documents without creating an upload form');fs.writeFileSync(out,JSON.stringify({passed:true,checks,dom_simulation:true,visual_review:false},null,2));console.log(JSON.stringify({passed:true,checks:checks.length})); diff --git a/scripts/receipt-home-check.mjs b/scripts/receipt-home-check.mjs new file mode 100644 index 0000000..e5705be --- /dev/null +++ b/scripts/receipt-home-check.mjs @@ -0,0 +1,3 @@ +import fs from 'node:fs';import crypto from 'node:crypto';import assert from 'node:assert/strict';import React from 'react';import {renderToStaticMarkup} from 'react-dom/server';import {createServer} from 'vite'; +const out='docs/proofs/receipt-home-20261103.json';assert(!fs.existsSync(out));const server=await createServer({configFile:false,server:{middlewareMode:true},appType:'custom'});const checks=[];const check=(v,n)=>{assert(v,n);checks.push(n);}; +try{const {default:Home}=await server.ssrLoadModule('/resources/js/PurchasingHome.jsx');const context={company:{name:'QA'},unit:{id:7,name:'QA unit'},purchasing:{receipts:true,internal_requisitions:true}};const render=(c,rights)=>renderToStaticMarkup(React.createElement(Home,{context:c,can:(p,u)=>rights.includes(p)&&u===7,navigate(){}}));check(render(context,['purchasing_receipts.view']).includes('href="/purchasing/receipts"'),'explicit capability and scoped right expose receipt link');check(!render(context,[]).includes('href="/purchasing/receipts"'),'no receipt right hides link');check(!render({...context,unit:{id:8}},['purchasing_receipts.view']).includes('href="/purchasing/receipts"'),'other unit right cannot expose link');check(!render({...context,purchasing:{receipts:false}},['purchasing_receipts.view']).includes('href="/purchasing/receipts"'),'disabled composition hides link');check(!render({...context,unit:null},['purchasing_receipts.view']).includes('href="/purchasing/receipts"'),'no selected unit hides link');check(render(context,['purchasing_requisitions.view']).includes('href="/purchasing/internal-requisitions"'),'existing requisition link remains available');fs.writeFileSync(out,JSON.stringify({passed:true,checks:checks.length,names:checks,source:'resources/js/PurchasingHome.jsx',sha256:crypto.createHash('sha256').update(fs.readFileSync('resources/js/PurchasingHome.jsx')).digest('hex'),visual_review:false},null,2)+'\n');console.log(JSON.stringify({passed:true,checks:checks.length}));}finally{await server.close();} diff --git a/scripts/receipt-native-extra.php b/scripts/receipt-native-extra.php new file mode 100644 index 0000000..fbb223f --- /dev/null +++ b/scripts/receipt-native-extra.php @@ -0,0 +1,5 @@ +$f['tenant']->id,'receiver'=>$f['receiver']->id,'order'=>$f['order']->id,'line'=>$f['line']->id,'warehouse'=>$f['warehouse']->id,'stock'=>$f['stock']->id],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); diff --git a/scripts/receipt-native-setup.php b/scripts/receipt-native-setup.php new file mode 100644 index 0000000..c809594 --- /dev/null +++ b/scripts/receipt-native-setup.php @@ -0,0 +1,7 @@ +hasTable('users'))throw new LogicException('Fresh native QA database required'); +Artisan::call('migrate',['--force'=>true]);require $s['native'].'/tests/Support/ReceiptFixture.php'; +$f=receiptFixture('2.000');$foreign=receiptFixture('2.000'); +file_put_contents($s['root'].'/native-fixture.json',json_encode(['tenant'=>$f['tenant']->id,'receiver'=>$f['receiver']->id,'reader'=>$f['otherReceiver']->id,'issuer'=>$f['issuer']->id,'order'=>$f['order']->id,'line'=>$f['line']->id,'warehouse'=>$f['warehouse']->id,'stock'=>$f['stock']->id,'foreign_order'=>$foreign['order']->id,'foreign_warehouse'=>$foreign['warehouse']->id,'foreign_stock'=>$foreign['stock']->id,'issued_on'=>substr($f['order']->getRawOriginal('issued_at'),0,10)],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); +file_put_contents($s['root'].'/native-setup.json',json_encode(['passed'=>true,'issued_order_fixture'=>true,'initial_receipts'=>DB::table('goods_receipts')->count(),'initial_movements'=>DB::table('stock_movements')->count(),'new_qa_database'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); diff --git a/scripts/receipt-origin-proof.php b/scripts/receipt-origin-proof.php new file mode 100644 index 0000000..71677a1 --- /dev/null +++ b/scripts/receipt-origin-proof.php @@ -0,0 +1,13 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true);$n=json_decode(file_get_contents($s['root'].'/native-extra-fixture.json'),true);$file=$s['root'].'/binding.json';$original=file_get_contents($file);$binding=json_decode($original,true);$binding['bindings'][implode(':',array_values($f['scope'])).':'.$f['actor']]=['tenant_id'=>$n['tenant'],'actor_id'=>$n['receiver'],'order_ids'=>[$n['order']],'warehouse_ids'=>[$n['warehouse']]];file_put_contents($file,json_encode($binding,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));config(['database.connections.receipt_verify'=>$s['nativeConnection']]);$db=DB::connection('receipt_verify');$checks=[];$ok=function($v,$name)use(&$checks){if(!$v)throw new RuntimeException($name);$checks[]=$name;}; +$socket=stream_socket_server('tcp://127.0.0.1:0');$port=(int)substr(strrchr(stream_socket_get_name($socket,false),':'),1);fclose($socket);$server=new Symfony\Component\Process\Process([PHP_BINARY,'-S','127.0.0.1:'.$port,'-t',$s['app'].'/public',dirname(__DIR__).'/scripts/receipt-composition-http.php'],$s['app'],null,null,120);$server->start(); +try{ + for($i=0;$i<80;$i++){if($socket=@fsockopen('127.0.0.1',$port,$errno,$error,.1)){fclose($socket);break;}usleep(50000);}$client=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:'.$port,'http_errors'=>false,'timeout'=>25]);$jar=new GuzzleHttp\Cookie\CookieJar;$r=$client->get('/qa/enter/actor',['cookies'=>$jar]);$session=json_decode((string)$r->getBody(),true);$url='/api/purchasing-receipts/orders/'.$n['order'];$call=function($path,$data=null)use($client,$jar,$session){$o=['cookies'=>$jar,'headers'=>['Accept'=>'application/json','X-SGF-Context'=>$session['context'],'X-CSRF-TOKEN'=>$session['csrf']]];if($data!==null)$o['json']=$data;$r=$client->request($data===null?'GET':'POST',$path,$o);return ['status'=>$r->getStatusCode(),'data'=>json_decode((string)$r->getBody(),true)];}; + $d=$call($url);$r=$call($url.'/preview',['revision'=>$d['data']['revision'],'idempotency_key'=>(string)Str::uuid(),'delivery_note'=>'SGF-QA-ORIGIN','received_on'=>date('Y-m-d'),'warehouse_id'=>$n['warehouse'],'items'=>[['purchase_order_item_id'=>$n['line'],'received_quantity'=>'0.500','accepted_quantity'=>'0.500','quality_status'=>'compliant','stock_item_id'=>$n['stock'],'notes'=>null]]]);if($r['status']!==200)throw new RuntimeException('Origin preview failed');$preview=$r['data']['preview']; + $before=[$db->table('goods_receipts')->count(),$db->table('stock_movements')->count(),$db->table('audit_logs')->count()];$db->unprepared("CREATE FUNCTION public.receipt_origin_fail() RETURNS trigger LANGUAGE plpgsql AS \$\$ BEGIN IF NEW.action='sgf.receipt.confirmed' THEN RAISE EXCEPTION 'synthetic origin audit failure'; END IF; RETURN NEW; END \$\$; CREATE TRIGGER receipt_origin_fail BEFORE INSERT ON audit_logs FOR EACH ROW EXECUTE FUNCTION public.receipt_origin_fail()"); + try{$r=$call($url.'/confirm',['preview'=>$preview]);$ok($r['status']===500,'failure to record SGF provenance refuses the whole confirmation');$ok($before===[$db->table('goods_receipts')->count(),$db->table('stock_movements')->count(),$db->table('audit_logs')->count()],'physical receipt and original audit roll back when provenance fails');}finally{$db->unprepared('DROP TRIGGER receipt_origin_fail ON audit_logs; DROP FUNCTION public.receipt_origin_fail()');} + $r=$call($url.'/confirm',['preview'=>$preview]);$ok($r['status']===201,'same intention recovers after provenance failure');$id=$r['data']['receipt']['id'];$audits=$db->table('audit_logs')->where('tenant_id',$n['tenant'])->where('action','sgf.receipt.confirmed')->get();$a=json_decode($audits[0]->after,true);$ok(count($audits)===1&&$a['receipt_id']===$id&&$a['sgf_context_key']===implode(':',array_values($f['scope'])).':'.$f['actor']&&$a['workflow_manifest']===$s['manifest_sha256'],'same transaction records exact SGF context, actor mapping and workflow manifest');$r=$call($url.'/confirm',['preview'=>$preview]);$ok($r['status']===200&&$db->table('audit_logs')->where('action','sgf.receipt.confirmed')->count()===1,'repetition duplicates neither business effect nor SGF provenance');$r=$call($url);$ok($r['data']['progress']['state']==='complete'&&(int)$r['data']['progress']['lines'][0]['accepted_milli']===2000,'fully accepted cumulative order reaches complete through SGF'); + file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'origin_audit_atomic'=>true,'same_key_recovery'=>true,'complete_order'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." origin audit checks passed.\n"; +}finally{file_put_contents($file,$original);$server->stop(2);file_put_contents($s['root'].'/origin-http.log',$server->getOutput()."\n".$server->getErrorOutput());} diff --git a/scripts/receipt-runtime-contract.php b/scripts/receipt-runtime-contract.php new file mode 100644 index 0000000..bf3fbd7 --- /dev/null +++ b/scripts/receipt-runtime-contract.php @@ -0,0 +1,6 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true);$checks=[];$ok=function($v,$name)use(&$checks){if(!$v)throw new RuntimeException($name);$checks[]=$name;};$runtime=new ReceiptRuntime;$queries=0;DB::listen(function()use(&$queries){$queries++;}); +foreach([[false,'budget-testing',404],[true,'production',403]]as[$enabled,$environment,$status]){config(['receipt_qa.enabled'=>$enabled]);$app->instance('env',$environment);$start=$queries;try{$runtime->run('purchasing_receipts.view',fn()=>true);throw new RuntimeException('Guard did not refuse');}catch(Symfony\Component\HttpKernel\Exception\HttpException $e){$ok($e->getStatusCode()===$status&&$queries===$start,'disabled/production guard refuses before database access '.$status);}} +$app->instance('env','budget-testing');config(['receipt_qa.enabled'=>true]);$actor=App\Models\User::findOrFail($f['actor']);auth()->guard()->setUser($actor);request()->setUserResolver(fn()=>$actor);$ctx=app(App\Shared\Context\CompanyContext::class);$ctx->selectFor($actor->id,$f['tenant'],$f['company'],$f['unit']);$default=DB::getDefaultConnection();$guard=auth()->getDefaultDriver();$value=$runtime->run('purchasing_receipts.view',fn()=>app(Tempo\Purchasing\Embedded\Services\ReplenishmentRun::class)===app(Tempo\Purchasing\Embedded\Services\ReplenishmentRun::class));$ok($value===true,'original replenishment execution context keeps native singleton semantics');$ok(DB::getDefaultConnection()===$default&&auth()->getDefaultDriver()===$guard&&app()->environment('budget-testing')&&DB::connection()->transactionLevel()===0,'local composition restores host database auth environment and transaction ownership');file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'business_writes'=>0],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." runtime contract checks passed.\n"; diff --git a/scripts/receipt-selection-race-check.mjs b/scripts/receipt-selection-race-check.mjs new file mode 100644 index 0000000..108d7b5 --- /dev/null +++ b/scripts/receipt-selection-race-check.mjs @@ -0,0 +1,5 @@ +import fs from 'node:fs';import vm from 'node:vm';import assert from 'node:assert/strict'; +const html=fs.readFileSync('resources/views/accounting/receipt-recovery.blade.php','utf8'),script=html.match(/']))->getContent(); + $assert(!str_contains($bad,'')&&str_contains($bad,'<script>ledger_xss</script>'),'Search remains escaped'); +}); +$baseline=json_decode(file_get_contents($s['root'].'/settlement-volume.json'),true,64,JSON_THROW_ON_ERROR); +$assert($fingerprint()===$baseline['baseline_fingerprint'],'Cases changed retained financial rows'); +file_put_contents($s['root'].'/settlement-cases.json',json_encode(['passed'=>true,'cases'=>$cases,'assertions'=>$checks,'baseline_fingerprint_equal'=>true,'test_writes_rolled_back'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); +echo json_encode(['cases'=>count($cases),'assertions'=>$checks,'passed'=>true])."\n"; diff --git a/scripts/settlement-page-http-router.php b/scripts/settlement-page-http-router.php new file mode 100644 index 0000000..8f16b8b --- /dev/null +++ b/scripts/settlement-page-http-router.php @@ -0,0 +1,3 @@ +JSON.parse(fs.readFileSync(p,'utf8')); +const state=read('C:/laragon/data/sgf-tempo/run/modular-regression-current.json'),tag=process.argv[2]; +if(state.port!==55439||!/^[a-f0-9]{12}$/.test(tag??''))throw Error('Owned QA tag required'); +const root=path.join(state.root,'private/settlement-page-'+tag),settings=path.join(root,'settings.json'),owned=read(settings),fixture=read(path.join(root,'settlement-fixture.json')); +if(owned.tag!==tag||owned.cluster!=='sgf_modular_regression_'+state.id)throw Error('Owned cluster mismatch'); +const output=path.join(root,'settlement-http.json');if(fs.existsSync(output))throw Error('Completed HTTP proof preserved'); +await new Promise((resolve,reject)=>{const p=net.createServer();p.once('error',()=>reject(Error('Proof port unavailable')));p.listen(8047,'127.0.0.1',()=>p.close(resolve));}); +const log=fs.openSync(path.join(root,'settlement-http-server.log'),'a'),server=spawn('C:/laragon/tools/sgf-tempo/php-8.4.27/php.exe',['-S','127.0.0.1:8047',path.resolve('scripts/settlement-page-http-router.php')],{cwd:process.cwd(),env:{...process.env,SETTLEMENT_PAGE_QA_SETTINGS:settings},windowsHide:true,stdio:['ignore',log,log]}); +let checks=0,auth;const jar=new Map(),check=(ok,why)=>{checks++;assert(ok,why);}; +async function request(url,body,extra={}){ + const headers={Accept:'application/json',Cookie:[...jar].map(([k,v])=>k+'='+v).join('; '),'X-SGF-Context':auth?.context??'',...extra}; + if(body)Object.assign(headers,{'Content-Type':'application/json','X-CSRF-TOKEN':auth?.csrf??'','Idempotency-Key':crypto.randomUUID()},extra); + const r=await fetch('http://127.0.0.1:8047'+url,{method:body?'POST':'GET',headers,body:body?JSON.stringify(body):undefined,redirect:'manual',signal:AbortSignal.timeout(8000)}); + for(const cookie of r.headers.getSetCookie()){const pair=cookie.split(';')[0],at=pair.indexOf('=');jar.set(pair.slice(0,at),pair.slice(at+1));} + const text=await r.text();let data;try{data=JSON.parse(text);}catch{}return {status:r.status,data,text,headers:r.headers}; +} +try{ + for(let n=0;n<50&&!auth;n++){try{const r=await request('/qa/settlement-enter');if(r.status===200)auth=r.data;}catch{}if(!auth)await new Promise(r=>setTimeout(r,100));} + check(Boolean(auth),'Owned QA entry'); + const first=await request('/api/supplier-payments');check(first.status===200,'Actual kernel exposes bounded ledger'); + for(const key of ['payments','allocation_proposals','allocations','events'])check(first.data[key].length===25,'Bounded HTTP window '+key); + const next=await request('/api/supplier-payments?payments_page=2&allocation_proposals_page=2&allocations_page=2&payment_events_page=2'); + check(next.status===200,'Independent next windows'); + for(const key of ['payments','allocation_proposals','allocations','events'])check(!next.data[key].some(row=>first.data[key].some(old=>old.id===row.id)),'Disjoint HTTP window '+key); + const large=await request('/api/supplier-payments?payment_per_page=100');check(large.status===200&&large.data.payments.length===100&&large.data.allocations.length===100,'100 rows enforced by server'); + const focus=await request('/api/supplier-payments?payment='+fixture.payment_id+'&allocations_page=3'); + check(focus.status===200&&focus.data.payments.length===1&&focus.data.payments[0].unallocated_minor===41&&focus.data.reversals.length===1,'Full-history amount and old reversal beyond page one'); + const filtered=await request('/api/supplier-payments?payment_state=rejected');check(filtered.status===200&&filtered.data.settlement_pagination.payments.total===333&&filtered.data.allocations.length===0,'Root state constrains child windows before count'); + for(const query of ['payments_page=0','payment_per_page=500','payment_state=paid','payment%5Bx%5D=1','payment=0','company_id=999'])check((await request('/api/supplier-payments?'+query)).status===422,'Invalid or injected filter refused'); + check((await request('/api/supplier-payments?payment=9223372036854775807')).status===403,'Unavailable payment refused uniformly'); + check((await request('/api/supplier-payments',undefined,{'X-SGF-Context':'obsolete'})).status===409,'Current context required'); + const body={payment_id:fixture.payment_id,decision:'confirmed',evidence_reference:'SIM-HTTP-READONLY',reason:'Read page cannot grant a payment decision.'}; + check((await request('/api/supplier-payments/payment-decide',body)).status===403,'Read actor cannot decide payment'); + check((await request('/api/supplier-payments/payment-decide',body,{'X-CSRF-TOKEN':''})).status===419,'Real CSRF middleware enforced'); + const html=await request('/supplier-payments?source='+fixture.source_ids[0]+'&payment_state=confirmed&payments_page=2'); + check(html.status===200&&html.text.includes('Paginação de pagamentos')&&html.text.includes('Paginação de eventos de pagamentos'),'HTML independent pagers'); + check(html.text.includes('name="source" value="'+fixture.source_ids[0]+'"')&&html.text.includes('payment_state=confirmed'),'Links and forms preserve document and ledger filters'); + const old=await request('/supplier-payments?payment='+fixture.payment_id+'&allocations_page=3'); + check(old.status===200&&old.text.includes('Conferir origem e reconhecimento')&&old.text.includes('Consultar outros pagamentos'),'Old allocation traces to origin and parent payment'); + const xss=await request('/supplier-payments?payment_q='+encodeURIComponent('')); + check(xss.status===200&&!xss.text.includes('')&&xss.text.includes('<script>ledger_http_xss</script>'),'Search escaped'); + check(first.headers.get('cache-control').includes('no-store'),'Private HTTP response'); + const report={passed:true,checks,real_http_kernel:true,csrf_enforced:true,read_only_actor:true,visual_review:false,browser_interactions_tested:false};fs.writeFileSync(output,JSON.stringify(report,null,2)+'\n');console.log(JSON.stringify(report)); +}finally{if(server.exitCode===null){server.kill();await new Promise(resolve=>server.once('exit',resolve));}fs.closeSync(log);} diff --git a/scripts/settlement-page-proof.php b/scripts/settlement-page-proof.php new file mode 100644 index 0000000..b582d3a --- /dev/null +++ b/scripts/settlement-page-proof.php @@ -0,0 +1,134 @@ + true]); +$service = app(SupplierPayables::class); +$enter = function (string $role) use ($f, $scope): User { + $u = User::findOrFail($f['actors'][$role]); auth()->setUser($u); + app(CompanyContext::class)->selectFor($u->id, $scope['tenant_id'], $scope['company_id'], $scope['unit_id']); + return $u; +}; +$command = fn (string $role, string $action, array $data) => $service->engine($enter($role))->settlements()->command($action, $data, (string) Str::uuid()); +$fingerprint = function (): string { + $h = hash_init('sha256'); + foreach (['pa_imported_sources','pa_source_histories','pa_sources','pa_proposals','pa_obligations','pa_history_imports','pa_imported_payments','pa_events','pa_commands','pa_access', ...SettlementSchema::TABLES, ...ReversalSchema::TABLES] as $table) { + hash_update($h, $table."\n"); + foreach (DB::table($table)->orderBy($table === 'ps_outbox' ? 'event_id' : 'id')->cursor() as $row) hash_update($h, Payables::canonical((array) $row)."\n"); + } + return hash_final($h); +}; +if ($phase === 'settlement-page-http') { + auth()->forgetGuards(); + Illuminate\Support\Facades\Route::middleware('web')->get('/qa/settlement-enter', function (Request $r) use ($f) { + $u=User::findOrFail($f['actors']['read']); auth()->login($u); $r->session()->regenerate(); + $token=bin2hex(random_bytes(24)); $r->session()->put('auth_version',$u->auth_version); + $r->session()->put('company_context',$f['scope']+['token'=>$token,'module_id'=>'purchasing']); + return response()->json(['csrf'=>csrf_token(),'context'=>$token])->header('Cache-Control','no-store'); + }); + $app->handleRequest(Request::capture()); exit; +} +if ($phase === 'settlement-page-setup') { + if (DB::getSchemaBuilder()->hasTable('ps_payments')) throw new LogicException('Fresh settlement fixture required'); + SettlementSchema::install(); ReversalSchema::install(); + foreach (['prepare'=>['payments_view','payment_prepare','allocation_prepare','reversal_prepare'], 'validate'=>['payments_view','payment_confirm','allocation_confirm','reversal_confirm'], 'read'=>['payments_view']] as $role=>$actions) { + foreach($actions as $action) DB::table('pa_access')->insert($scope+['user_id'=>$f['actors'][$role],'action'=>$action,'person'=>'sgf-history-person-'.$f['actors'][$role]]); + } + $base=$service->document($enter('read'),$f['source_id']); unset($base['local_id']); $obligations=[]; $sources=[]; + for($n=1;$n<=61;$n++) { + $doc=array_replace($base,['document'=>110000+$n,'number'=>'SETTLE-PAGE-SOURCE-'.$n,'payment_count'=>0]); $payload=Payables::canonical($doc); + $id=DB::table('pa_imported_sources')->insertGetId($scope+['payload'=>$payload,'receipt_hash'=>hash('sha256',$payload)]); + $p=$service->engine($enter('prepare'))->command('prepare',$id,'Explicit synthetic source for settlement pages.',(string)Str::uuid()); + $o=$service->engine($enter('validate'))->command('validate',$p['proposal_id'],'Independent synthetic recognition.',(string)Str::uuid()); + $obligations[]=$o['obligation_id']; $sources[]=$id; + } + $revision=DB::table('pa_obligations')->where('id',$obligations[0])->value('source_revision'); + $p=$command('prepare','payment-prepare',['obligation_id'=>$obligations[0],'source_revision'=>$revision,'amount'=>'1.00','currency'=>'MZN','paid_on'=>'2026-10-29','fact_reference'=>'SIM-PAGE-ORIGINAL','evidence_reference'=>'SIM-PAGE-EVIDENCE','reason'=>'Synthetic payment fact for bounded reading.']); + $payment=$p['payment_id']; + $command('validate','payment-decide',['payment_id'=>$payment,'decision'=>'confirmed','evidence_reference'=>'SIM-PAGE-CONFIRM','reason'=>'Independent synthetic payment evidence.']); + $proposalIds=[]; + foreach(array_chunk(array_slice($obligations,0,60),30) as $batch=>$ids) { + $plan=[];foreach($ids as $id)$plan[]=['obligation_id'=>$id,'source_revision'=>DB::table('pa_obligations')->where('id',$id)->value('source_revision'),'amount'=>'0.01']; + $p=$command('prepare','allocation-prepare',['payment_id'=>$payment,'reference'=>'SIM-PAGE-PLAN-'.$batch,'allocations'=>$plan,'reason'=>'Synthetic partial allocations across obligations.']); + $command('validate','allocation-decide',['proposal_id'=>$p['proposal_id'],'decision'=>'confirmed','reason'=>'Independent synthetic allocation review.']); $proposalIds[]=$p['proposal_id']; + } + $oldest=DB::table('ps_allocations')->where('payment_id',$payment)->orderBy('id')->first(); + $r=$command('prepare','reversal-prepare',['allocation_id'=>$oldest->id,'source_revision'=>$oldest->source_revision,'reason'=>'Synthetic integral correction with original preserved.']); + $command('validate','reversal-confirm',['proposal_id'=>$r['proposal_id'],'reason'=>'Independent integral reversal review.']); + $last=end($obligations); $pending=$command('prepare','allocation-prepare',['payment_id'=>$payment,'reference'=>'SIM-PAGE-PENDING','allocations'=>[['obligation_id'=>$last,'source_revision'=>DB::table('pa_obligations')->where('id',$last)->value('source_revision'),'amount'=>'0.10']],'reason'=>'Pending proposal to test current revision after reading.']); + file_put_contents($s['root'].'/settlement-fixture.json',json_encode(['source_ids'=>$sources,'obligation_ids'=>$obligations,'payment_id'=>$payment,'confirmed_proposals'=>$proposalIds,'pending_proposal_id'=>$pending['proposal_id'],'original_payment_unallocated_minor'=>41,'synthetic_only'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); + echo "Fresh synthetic settlement workflow prepared: 61 obligations, one payment, 60 allocations and one reversal.\n"; exit; +} +$g=json_decode(file_get_contents($s['root'].'/settlement-fixture.json'),true,64,JSON_THROW_ON_ERROR); +$u=$enter('read'); +if(str_starts_with($phase,'settlement-read-')){require __DIR__.'/settlement-read-proof.php';exit;} +if ($phase === 'settlement-page-seed') { + if(DB::table('ps_payments')->count()!==1)throw new LogicException('Seed cannot reset or replace retained facts'); + DB::transaction(function()use($g,$scope,$f){ + $template=(array)DB::table('ps_payments')->where('id',$g['payment_id'])->first();unset($template['id']); + $proposal=(array)DB::table('ps_proposals')->where('id',$g['confirmed_proposals'][0])->first();unset($proposal['id']); + $decision=(array)DB::table('ps_payment_decisions')->where('payment_id',$g['payment_id'])->first();unset($decision['id']); + $allocDecision=(array)DB::table('ps_allocation_decisions')->where('proposal_id',$g['confirmed_proposals'][0])->first();unset($allocDecision['id']); + $allocation=(array)DB::table('ps_allocations')->where('payment_id',$g['payment_id'])->orderBy('id')->first();unset($allocation['id']); + $key=fn($v)=>hash('sha256',Payables::canonical([array_intersect_key($scope,array_flip(['tenant_id','company_id'])),$v])); + for($n=1;$n<=999;$n++) { + $fact='SIM-PAGE-CLONE-'.str_pad((string)$n,4,'0',STR_PAD_LEFT);$evidence='SIM-EVID-CLONE-'.$n; + $snapshot=json_decode($template['snapshot'],true,64,JSON_THROW_ON_ERROR);$snapshot['fact_reference']=$fact;$snapshot['evidence_reference']=$evidence; + $row=array_replace($template,['fact_reference'=>$fact,'evidence_reference'=>$evidence,'fact_key'=>$key($fact),'evidence_key'=>$key($evidence),'snapshot'=>Payables::canonical($snapshot),'payload_hash'=>hash('sha256',Payables::canonical($snapshot))]); + $id=DB::table('ps_payments')->insertGetId($row);$state=$n%3===0?'proposed':($n%3===1?'confirmed':'rejected'); + if($state!=='proposed')DB::table('ps_payment_decisions')->insert(array_replace($decision,['payment_id'=>$id,'decision'=>$state])); + if($state==='confirmed') { + $reference='SIM-PLAN-CLONE-'.$n;$plan=[['obligation_id'=>$allocation['obligation_id'],'source_revision'=>$allocation['source_revision'],'amount_minor'=>1]]; + $pid=DB::table('ps_proposals')->insertGetId(array_replace($proposal,['payment_id'=>$id,'reference'=>$reference,'reference_key'=>$key($reference),'plan'=>Payables::canonical($plan),'plan_hash'=>hash('sha256',Payables::canonical($plan))])); + $did=DB::table('ps_allocation_decisions')->insertGetId(array_replace($allocDecision,['proposal_id'=>$pid])); + DB::table('ps_allocations')->insert(array_replace($allocation,['payment_id'=>$id,'decision_id'=>$did,'amount_minor'=>1])); + } + DB::table('ps_events')->insert($scope+['payment_id'=>$id,'actor_id'=>$f['actors']['prepare'],'person'=>'sgf-history-person-'.$f['actors']['prepare'],'kind'=>'qa.explicit_benchmark_clone','payload'=>'{}','created_at'=>now()]); + } + }); + $hash=$fingerprint();file_put_contents($s['root'].'/settlement-volume.json',json_encode(['payments'=>1000,'actual_command_workflow_payments'=>1,'explicit_benchmark_clones'=>999,'indices_added'=>false,'baseline_fingerprint'=>$hash],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); + echo "Synthetic volume ready: 1000 payment facts, original command workflow preserved.\n";exit; +} +if ($phase === 'settlement-page-cases') { require __DIR__.'/settlement-page-cases.php'; exit; } +if ($phase === 'settlement-page-nav') { + $request=Request::create('/supplier-payments?'.http_build_query(['source'=>$g['source_ids'][0],'payment_state'=>'confirmed','payments_page'=>2]),'GET'); + $request->setUserResolver(fn()=>$u);$request->setLaravelSession(app('session')->driver()); + $html=app(SupplierPaymentsController::class)->page($request)->getContent(); + if(!preg_match('/href="([^"]+)">Consultar todas as origens/',$html,$match))throw new LogicException('Source exit absent'); + parse_str(parse_url(html_entity_decode($match[1]),PHP_URL_QUERY)??'',$query); + if(isset($query['source'])||($query['payment_state']??'')!=='confirmed'||($query['payments_page']??'')!=='2'||($query['page']??'')!=='1')throw new LogicException('Source exit loses independent payment filters'); + file_put_contents($s['root'].'/settlement-nav.json',json_encode(['passed'=>true,'source_exit_preserves_payment_filters'=>true,'document_page_reset'=>true],JSON_PRETTY_PRINT));echo "Source exit preserves independent ledger filters.\n";exit; +} +if ($phase === 'settlement-page-bench') { + $strategy=$argv[3]??'';if(!in_array($strategy,['legacy','page25','page100','focus'],true))throw new LogicException('Unknown measurement'); + $book=$service->engine($u)->settlements();$book->listingPage(['payment'=>$g['payment_id']]);$queries=0;$active=false; + DB::listen(function()use(&$queries,&$active){if($active)$queries++;});gc_collect_cycles();memory_reset_peak_usage();$baseline=memory_get_usage(true);$active=true;$start=hrtime(true); + $data=$strategy==='legacy'?$book->listing():$book->listingPage($strategy==='focus'?['payment'=>$g['payment_id']]:['payment_per_page'=>$strategy==='page25'?25:100]); + $ms=(hrtime(true)-$start)/1e6;$active=false;$peak=memory_get_peak_usage(true);$windows=[]; + foreach(['payments','proposals','allocations','events'] as $table){ + $rows=json_decode(json_encode($data[$table],JSON_THROW_ON_ERROR),true,128,JSON_THROW_ON_ERROR); + foreach($rows as &$row)unset($row['local_source_id']);unset($row); + usort($rows,fn($a,$b)=>$b['id']<=>$a['id']); + foreach($strategy==='legacy'?[25,100]:($strategy==='focus'?[]:[$strategy==='page25'?25:100]) as $size)$windows[$table][$size]=hash('sha256',Payables::canonical(array_slice($rows,0,$size))); + } + $original=array_values(array_filter($data['payments'],fn($p)=>$p['id']===$g['payment_id'])); + $report=['strategy'=>$strategy,'volume'=>DB::table('ps_payments')->count(),'time_ms'=>round($ms,3),'queries'=>$queries,'php_heap_baseline_bytes'=>$baseline,'php_heap_peak_bytes'=>$peak,'window_fingerprints'=>$windows,'original_payment_fingerprint'=>hash('sha256',Payables::canonical(json_decode(json_encode($original,JSON_THROW_ON_ERROR),true,128,JSON_THROW_ON_ERROR))),'original_unallocated_minor'=>$original[0]['unallocated_minor']??null,'rows'=>array_map('count',array_intersect_key($data,array_flip(['payments','proposals','allocations','events','reversal_proposals','reversals']))),'indices_added'=>false,'php'=>PHP_VERSION,'not_deployment_capacity'=>true]; + file_put_contents($s['root'].'/settlement-bench-'.$strategy.'.json',json_encode($report,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo json_encode($report)."\n";exit; +} +if ($phase === 'settlement-page-post') { + DB::beginTransaction();DB::statement('SET TRANSACTION READ ONLY');try{ + $baseline=json_decode(file_get_contents($s['root'].'/settlement-volume.json'),true,64,JSON_THROW_ON_ERROR);$hash=$fingerprint(); + $bundle=json_decode(file_get_contents($s['root'].'/source.json'),true,64,JSON_THROW_ON_ERROR);$doc=$bundle['source'];unset($doc['local_id']); + $original=json_decode(DB::table('pa_imported_sources')->where('id',$f['source_id'])->value('payload'),true,64,JSON_THROW_ON_ERROR); + if($baseline['baseline_fingerprint']!==$hash||Payables::canonical($original)!==Payables::canonical($doc)||DB::table('ps_payments')->count()!==1000)throw new LogicException('Retained synthetic facts changed'); + file_put_contents($s['root'].'/settlement-post.json',json_encode(['passed'=>true,'read_only'=>true,'baseline_fingerprint_equal'=>true,'business_fingerprint'=>$hash,'copied_original_receipt_unchanged'=>true,'payment_count'=>1000,'source_databases_and_demos_not_written'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); + }finally{DB::rollBack();}echo "Synthetic financial rows unchanged after tests and measurement.\n";exit; +} +throw new LogicException('Unknown settlement page phase'); diff --git a/scripts/settlement-page-run.mjs b/scripts/settlement-page-run.mjs new file mode 100644 index 0000000..166bb12 --- /dev/null +++ b/scripts/settlement-page-run.mjs @@ -0,0 +1,32 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import crypto from 'node:crypto'; +import {spawnSync} from 'node:child_process'; +const read=p=>JSON.parse(fs.readFileSync(p,'utf8')); +const state=read('C:/laragon/data/sgf-tempo/run/modular-regression-current.json'); +if(state.port!==55439||!/^[a-f0-9]{12}$/.test(state.id))throw Error('Isolated QA host required'); +const resume=process.argv[2];if(resume&&!/^[a-f0-9]{12}$/.test(resume))throw Error('Invalid owned tag'); +const tag=resume??crypto.randomBytes(6).toString('hex'),root=path.join(state.root,'private/settlement-page-'+tag),settings=path.join(root,'settings.json'); +if(!resume){ + const prior=path.join(state.root,'private/payable-history-03e16d9fb37d/source.json'),bundle=read(prior); + const admin=fs.readFileSync(path.join(state.root,'private/admin-password.txt'),'utf8').trim(); + const pg=input=>{const r=spawnSync('C:/Program Files/PostgreSQL/17/bin/psql.exe',['-h','127.0.0.1','-p','55439','-U','sgf_regression_owner','-d','postgres','-Atq','-v','ON_ERROR_STOP=1'],{input,encoding:'utf8',windowsHide:true,env:{...process.env,PGPASSWORD:admin}});if(r.status!==0)throw Error('Isolated provisioning failed');return r.stdout.trim();}; + if(pg("SELECT current_setting('cluster_name')")!=='sgf_modular_regression_'+state.id)throw Error('Wrong effective cluster'); + const role='payable_history_sgf_'+tag,database='payable_sgf_'+tag,password=crypto.randomBytes(32).toString('hex'); + pg(`CREATE ROLE ${role} LOGIN PASSWORD '${password}' NOSUPERUSER NOCREATEDB NOCREATEROLE NOREPLICATION NOBYPASSRLS; CREATE DATABASE ${database} OWNER ${role}; REVOKE ALL ON DATABASE ${database} FROM PUBLIC;`); + const storage=path.join(root,'storage');for(const dir of ['framework/cache/data','framework/views','framework/sessions','logs','cache'])fs.mkdirSync(path.join(storage,dir),{recursive:true}); + fs.copyFileSync(prior,path.join(root,'source.json')); + fs.writeFileSync(settings,JSON.stringify({tag,root,cluster:'sgf_modular_regression_'+state.id,source_instance:bundle.source.instance,app_key:'base64:'+crypto.randomBytes(32).toString('base64'),source_bundle_sha256:crypto.createHash('sha256').update(fs.readFileSync(prior)).digest('hex'),sgf:{root:process.cwd(),database,role,password,storage}},null,2)); +} +const owned=read(settings);if(owned.tag!==tag||owned.cluster!=='sgf_modular_regression_'+state.id)throw Error('Owned context mismatch'); +const phases=process.argv[3]?.split(',')??(resume?[]:['sgf','settlement-page-setup']); +for(const phase of phases){ + const name={sgf:'fixture.json','settlement-page-setup':'settlement-fixture.json','settlement-page-cases':'settlement-cases.json','settlement-page-seed':'settlement-volume.json','settlement-page-post':'settlement-post.json'}[phase];if(!name)throw Error('Unknown phase'); + if(fs.existsSync(path.join(root,name)))throw Error('Completed phase preserved; do not overwrite'); + const at=Date.now(),r=spawnSync('C:/laragon/tools/sgf-tempo/php-8.4.27/php.exe',['-d','memory_limit=512M','scripts/payable-history-sgf-proof.php',settings,phase],{encoding:'utf8',windowsHide:true,maxBuffer:1024*1024}); + fs.writeFileSync(path.join(root,phase+'-'+at+'.log'),(r.stdout??'')+(r.stderr??'')); + if(r.status!==0||!fs.existsSync(path.join(root,name)))throw Error('Private QA phase failed: '+root); + process.stdout.write(r.stdout); +} +fs.writeFileSync(path.join(state.root,'settlement-page-latest.json'),JSON.stringify({tag,root})); +console.log(JSON.stringify({tag,root,owned_synthetic_database_only:true})); diff --git a/scripts/settlement-read-cases.php b/scripts/settlement-read-cases.php new file mode 100644 index 0000000..de940c7 --- /dev/null +++ b/scripts/settlement-read-cases.php @@ -0,0 +1,74 @@ +$name,'assertions'=>$checks-$n,'passed'=>true];} + finally{while(DB::transactionLevel()>0)DB::rollBack();$enter('read');}echo 'Passed settlement read case: '.$name."\n"; +}; +DB::listen(function($event)use(&$capture,&$queries,&$state){ + if(!$capture)return;$queries[]=$event->sql; + if(!$state&&str_contains($event->sql,'"ps_payments"')){$pdo=$event->connection->getPdo();$state=['isolation'=>$pdo->query('SHOW transaction_isolation')->fetchColumn(),'read_only'=>$pdo->query('SHOW transaction_read_only')->fetchColumn()];} +}); +$makeBook=fn()=>$service->engine($enter('read'))->settlements(); +$case('standalone-reader-and-old-constructor-contract',function()use($makeBook,$g,$scope,$u,$assert,&$capture,&$queries,&$state):void{ + $queries=[];$state=[];$capture=true;$book=$makeBook();$data=$book->listingPage(['payment'=>$g['payment_id']]);$capture=false; + $assert($data['payments'][0]['unallocated_minor']===41,'Full-history position preserved'); + $assert($state===['isolation'=>'repeatable read','read_only'=>'on'],'Own reader transaction is coherent and read only'); + $assert(!array_filter($queries,fn($sql)=>str_contains(strtolower($sql),'for update')),'Read callback never takes writer locks'); + $assert(DB::transactionLevel()===0&&DB::selectOne('SHOW default_transaction_read_only')->default_transaction_read_only==='off','Read mode does not stick to later transactions'); + $writer=(new ReflectionProperty($book,'authorize'))->getValue($book); + $legacy=new Tempo\Finance\Payables\SupplierSettlements(DB::connection(),$u->id,'sgf-history-person-'.$u->id,$scope,$writer,fn()=>throw new LogicException('No source callback required by a read')); + $queries=[];$state=[];$capture=true;$old=$legacy->listingPage(['payment'=>$g['payment_id']]);$capture=false; + $assert(json_encode($old['payments'],JSON_THROW_ON_ERROR)===json_encode($data['payments'],JSON_THROW_ON_ERROR),'Old constructor retains identical position'); + $assert(count(array_filter($queries,fn($sql)=>str_contains(strtolower($sql),'for update')))===2&&$state['read_only']==='off','Without new callback existing writer authorization is retained'); + $reads=0;$writes=0; + $separate=new Tempo\Finance\Payables\SupplierSettlements(DB::connection(),$u->id,'test-only',$scope, + function()use(&$writes){$writes++;abort(403);},fn()=>throw new LogicException('No obligation requested'),function()use(&$reads){$reads++;}); + $separate->listingPage(['payment'=>$g['payment_id']]);$refused=false; + try{$separate->command('allocation-decide',['proposal_id'=>$g['pending_proposal_id'],'decision'=>'confirmed','reason'=>'Read callback must not authorize a command.'],(string)Illuminate\Support\Str::uuid());} + catch(Symfony\Component\HttpKernel\Exception\HttpExceptionInterface $e){$refused=$e->getStatusCode()===403;} + $assert($reads===1&&$writes===1&&$refused,'Read authorization cannot replace command authority'); +}); +$case('rights-identity-and-authenticated-user-revalidated',function()use($makeBook,$g,$scope,$f,$enter,$assert):void{ + foreach(['right','person','actor'] as $change){ + DB::beginTransaction();try{ + $book=$makeBook(); + if($change==='right')DB::table('pa_access')->where($scope)->where(['user_id'=>$f['actors']['read'],'action'=>'payments_view'])->delete(); + if($change==='person')DB::table('pa_access')->where($scope)->where(['user_id'=>$f['actors']['read'],'action'=>'view'])->update(['person'=>'QA_CHANGED_AFTER_ENGINE_CREATION']); + if($change==='actor')$enter('validate'); + $status=null;try{$book->listingPage(['payment'=>$g['payment_id']]);}catch(Symfony\Component\HttpKernel\Exception\HttpExceptionInterface $e){$status=$e->getStatusCode();} + $assert($status===($change==='person'?409:403),'Fresh authority refused change '.$change); + }finally{DB::rollBack();$enter('read');} + } +}); +$case('existing-page-and-financial-proofs-remain-equivalent',function()use($makeBook,$s,$g,$assert):void{ + foreach([25,100] as $size){ + $before=json_decode(file_get_contents($s['root'].'/settlement-bench-page'.$size.'.json'),true,128,JSON_THROW_ON_ERROR); + $now=$makeBook()->listingPage(['payment_per_page'=>$size]); + foreach(['payments','proposals','allocations','events'] as $key){ + $rows=json_decode(json_encode($now[$key],JSON_THROW_ON_ERROR),true,128,JSON_THROW_ON_ERROR); + foreach($rows as &$row)unset($row['local_source_id']);unset($row);usort($rows,fn($a,$b)=>$b['id']<=>$a['id']); + $assert(hash('sha256',Tempo\Finance\Payables\Payables::canonical($rows))===$before['window_fingerprints'][$key][$size],'Earlier facts equal after read authorization change: '.$key.'/'.$size); + } + } + $before=json_decode(file_get_contents($s['root'].'/settlement-bench-focus.json'),true,128,JSON_THROW_ON_ERROR); + $payments=$makeBook()->listingPage(['payment'=>$g['payment_id']])['payments']; + $assert(hash('sha256',Tempo\Finance\Payables\Payables::canonical(json_decode(json_encode($payments,JSON_THROW_ON_ERROR),true,128,JSON_THROW_ON_ERROR)))===$before['original_payment_fingerprint'],'Full original position identical without repeating old benchmark'); +}); +$case('read-only-database-guard-and-recovery',function()use($makeBook,$g,$scope,$u,$assert):void{ + $armed=true;DB::listen(function($event)use(&$armed,$g,$scope,$u){ + if($armed&&str_contains($event->sql,'"ps_payments"')){ + $armed=false; + $event->connection->table('ps_events')->insert($scope+['payment_id'=>$g['payment_id'],'actor_id'=>$u->id,'person'=>'QA','kind'=>'qa.write_must_fail','payload'=>'{}','created_at'=>now()]); + } + }); + $blocked=false;try{$makeBook()->listingPage(['payment'=>$g['payment_id']]);}catch(Illuminate\Database\QueryException $e){$blocked=($e->errorInfo[0]??null)==='25006';} + $assert($blocked&&DB::transactionLevel()===0,'Database refuses accidental write and reader rolls back'); + $assert(!DB::table('ps_events')->where('kind','qa.write_must_fail')->exists(),'No accidental event recorded'); + $assert($makeBook()->listingPage(['payment'=>$g['payment_id']])['payments'][0]['unallocated_minor']===41,'Next read recovers with no sticky aborted transaction'); +}); +$baseline=json_decode(file_get_contents($s['root'].'/settlement-volume.json'),true,64,JSON_THROW_ON_ERROR); +$assert($fingerprint()===$baseline['baseline_fingerprint'],'New read tests changed financial rows'); +file_put_contents($s['root'].'/settlement-read-cases.json',json_encode(['passed'=>true,'cases'=>$cases,'assertions'=>$checks,'financial_fingerprint_equal'=>true,'previous_benchmarks_reused'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); +echo json_encode(['cases'=>count($cases),'assertions'=>$checks,'passed'=>true])."\n"; diff --git a/scripts/settlement-read-http-router.php b/scripts/settlement-read-http-router.php new file mode 100644 index 0000000..6b2b16c --- /dev/null +++ b/scripts/settlement-read-http-router.php @@ -0,0 +1,3 @@ +JSON.parse(fs.readFileSync(p,'utf8')); +const state=read('C:/laragon/data/sgf-tempo/run/modular-regression-current.json'),tag=process.argv[2]; +if(state.port!==55439||!/^[a-f0-9]{12}$/.test(tag??''))throw Error('Owned QA tag required'); +const root=path.join(state.root,'private/settlement-page-'+tag),settings=path.join(root,'settings.json'),owned=read(settings),g=read(path.join(root,'settlement-fixture.json')); +if(owned.tag!==tag||owned.cluster!=='sgf_modular_regression_'+state.id)throw Error('Owned cluster mismatch'); +const output=path.join(root,'settlement-read-http.json');if(fs.existsSync(output))throw Error('Completed read HTTP proof preserved'); +await new Promise((resolve,reject)=>{const p=net.createServer();p.once('error',()=>reject(Error('Proof port unavailable')));p.listen(8047,'127.0.0.1',()=>p.close(resolve));}); +const log=fs.openSync(path.join(root,'settlement-read-http-server.log'),'a'),server=spawn('C:/laragon/tools/sgf-tempo/php-8.4.27/php.exe',['-S','127.0.0.1:8047',path.resolve('scripts/settlement-read-http-router.php')],{cwd:process.cwd(),env:{...process.env,SETTLEMENT_PAGE_QA_SETTINGS:settings},windowsHide:true,stdio:['ignore',log,log]}); +let checks=0,auth;const jar=new Map(),check=(ok,why)=>{checks++;assert(ok,why);}; +async function request(url,{body,key,headers:extra={}}={}){ + const headers={Accept:'application/json',Cookie:[...jar].map(([k,v])=>k+'='+v).join('; '),'X-SGF-Context':auth?.context??'',...extra}; + if(key)headers['X-QA-Read-Proof']=key; + if(body)Object.assign(headers,{'Content-Type':'application/json','X-CSRF-TOKEN':auth?.csrf??'','Idempotency-Key':crypto.randomUUID()},extra); + const r=await fetch('http://127.0.0.1:8047'+url,{method:body?'POST':'GET',headers,body:body?JSON.stringify(body):undefined,redirect:'manual',signal:AbortSignal.timeout(8000)}); + for(const c of r.headers.getSetCookie()){const p=c.split(';')[0],at=p.indexOf('=');jar.set(p.slice(0,at),p.slice(at+1));} + const text=await r.text();let data;try{data=JSON.parse(text);}catch{}return {status:r.status,data,text,headers:r.headers}; +} +try{ + let ready=false;for(let n=0;n<50&&!ready;n++){try{const r=await request('/api/supplier-payments');if(r.status===401)ready=true;}catch{}if(!ready)await new Promise(r=>setTimeout(r,100));} + check(ready,'Unauthenticated request is refused by real middleware'); + const entry=await request('/qa/read-enter');check(entry.status===200,'Owned QA entry');auth=entry.data; + const query='payment='+g.payment_id+'&source='+g.source_ids[0]; + const focused=await request('/api/supplier-payments?'+query,{key:'focus'}); + check(focused.status===200&&focused.data.payments[0].unallocated_minor===41,'HTTP preserves original full-history position'); + const facts=read(path.join(root,'read-http-focus.json')); + check(facts.transaction.isolation==='repeatable read'&&facts.transaction.read_only==='on'&&facts.writer_lock_queries===0,'Whole HTTP JSON query is read-only snapshot without writer locks'); + const page=await request('/supplier-payments?'+query,{key:'page'});check(page.status===200&&page.text.includes('Conferência do pagamento #'+g.payment_id),'HTML read path works'); + const htmlFacts=read(path.join(root,'read-http-page.json')); + check(htmlFacts.transaction.isolation==='repeatable read'&&htmlFacts.transaction.read_only==='on'&&htmlFacts.writer_lock_queries===0,'Whole HTML data query is read only without writer locks'); + check((await request('/api/supplier-payments?'+query,{headers:{'X-SGF-Context':'obsolete'}})).status===409,'Current context still required'); + check((await request('/api/supplier-payments?payment=9223372036854775807')).status===403,'Payment focus cannot escape scope'); + const body={proposal_id:g.pending_proposal_id,decision:'confirmed',reason:'Read-only authority does not authorize confirmation.'}; + check((await request('/api/supplier-payments/allocation-decide',{body})).status===403,'Read permission still grants no decision'); + check((await request('/api/supplier-payments/allocation-decide',{body,headers:{'X-CSRF-TOKEN':''}})).status===419,'CSRF remains enforced on commands'); + check(focused.headers.get('cache-control').includes('no-store'),'Private response retained'); + const report={passed:true,checks,real_http_kernel:true,json_query:facts,html_query:htmlFacts,no_browser:true,visual_review:false};fs.writeFileSync(output,JSON.stringify(report,null,2)+'\n');console.log(JSON.stringify({passed:true,checks,json_writer_locks:facts.writer_lock_queries,html_writer_locks:htmlFacts.writer_lock_queries})); +}finally{if(server.exitCode===null){server.kill();await new Promise(resolve=>server.once('exit',resolve));}fs.closeSync(log);} diff --git a/scripts/settlement-read-proof.php b/scripts/settlement-read-proof.php new file mode 100644 index 0000000..a91e7b5 --- /dev/null +++ b/scripts/settlement-read-proof.php @@ -0,0 +1,111 @@ +forgetGuards();app(App\Shared\Context\CompanyContext::class)->clear(); + Illuminate\Support\Facades\Route::middleware('web')->get('/qa/read-enter',function(Illuminate\Http\Request $r)use($f){ + $u=App\Models\User::findOrFail($f['actors']['read']);auth()->login($u);$r->session()->regenerate();$token=bin2hex(random_bytes(24)); + $r->session()->put('auth_version',$u->auth_version);$r->session()->put('company_context',$f['scope']+['token'=>$token,'module_id'=>'purchasing']); + return response()->json(['csrf'=>csrf_token(),'context'=>$token])->header('Cache-Control','no-store'); + }); + $sql=[];$state=[]; + DB::listen(function($event)use(&$sql,&$state){$sql[]=$event->sql;if(!$state&&str_contains($event->sql,'"ps_payments"')){$pdo=$event->connection->getPdo();$state=['isolation'=>$pdo->query('SHOW transaction_isolation')->fetchColumn(),'read_only'=>$pdo->query('SHOW transaction_read_only')->fetchColumn()];}}); + $app->handleRequest(Illuminate\Http\Request::capture()); + $key=$_SERVER['HTTP_X_QA_READ_PROOF']??''; + if(($_SERVER['REQUEST_METHOD']??'')==='GET'&&preg_match('/^[a-z]{1,20}$/D',$key))file_put_contents($s['root'].'/read-http-'.$key.'.json',json_encode(['status'=>http_response_code(),'transaction'=>$state,'queries'=>count($sql),'writer_lock_queries'=>count(array_filter($sql,fn($q)=>str_contains(strtolower($q),'for update')))],JSON_PRETTY_PRINT)); + exit; +} +if($phase==='settlement-read-worker'){ + $input=realpath($argv[3]??''); + if(!$input||!str_starts_with($input,realpath($s['root']).DIRECTORY_SEPARATOR))throw new LogicException('Private worker input required'); + $w=json_decode(file_get_contents($input),true,64,JSON_THROW_ON_ERROR); + if(!in_array($w['job'],['read','legacy','command'],true)||!preg_match('/^settlement_read_[a-z]+_[a-f0-9]{12}$/D',$w['label']))throw new LogicException('Unknown worker'); + DB::select('select set_config(?, ?, false)',['application_name',$w['label']]);DB::statement("SET lock_timeout='40s'");DB::statement("SET statement_timeout='45s'"); + $pid=(int)DB::selectOne('select pg_backend_pid() as pid')->pid;file_put_contents($input.'.started',json_encode(['pid'=>$pid])); + $start=hrtime(true);$out=[]; + try{ + if($w['job']==='command'){ + DB::beginTransaction();try{ + $validator=$enter('validate');$key=(string)Illuminate\Support\Str::uuid();$body=['proposal_id'=>$g['pending_proposal_id'],'decision'=>'confirmed','reason'=>'Current version revalidated after writer release.']; + $engine=$service->engine($validator)->settlements();$a=$engine->command('allocation-decide',$body,$key);$b=$engine->command('allocation-decide',$body,$key); + $out=['success'=>true,'replayed'=>$b['replayed'],'same_result'=>$a['decision_id']===$b['decision_id'], + 'decisions'=>DB::table('ps_allocation_decisions')->where('proposal_id',$g['pending_proposal_id'])->count(), + 'allocations_for_target'=>DB::table('ps_allocations')->where(['payment_id'=>$g['payment_id'],'obligation_id'=>end($g['obligation_ids'])])->count(),'worker_changes_rolled_back'=>true]; + }finally{while(DB::transactionLevel()>0)DB::rollBack();} + }else{ + $sql=[];$state=[]; + DB::listen(function($event)use(&$sql,&$state){$sql[]=$event->sql;if(!$state&&str_contains($event->sql,'"ps_payments"')){$pdo=$event->connection->getPdo();$state=['isolation'=>$pdo->query('SHOW transaction_isolation')->fetchColumn(),'read_only'=>$pdo->query('SHOW transaction_read_only')->fetchColumn()];}}); + if($w['job']==='legacy'){ + $data=$service->engine($u)->settlements()->listing();$original=array_values(array_filter($data['payments'],fn($p)=>$p['id']===$g['payment_id'])); + $out=['success'=>true,'unallocated_minor'=>$original[0]['unallocated_minor'],'transaction'=>$state,'writer_lock_queries'=>count(array_filter($sql,fn($q)=>str_contains(strtolower($q),'for update')))]; + }else{ + $r=Illuminate\Http\Request::create('/api/supplier-payments?'.http_build_query(['payment'=>$g['payment_id'],'source'=>$g['source_ids'][0]]),'GET');$r->setUserResolver(fn()=>$u);$r->setLaravelSession(app('session')->driver()); + $data=app(App\Modules\Purchasing\SupplierPaymentsController::class)->index($r)->getData(true); + $out=['success'=>true,'unallocated_minor'=>$data['payments'][0]['unallocated_minor'],'events_total'=>$data['settlement_pagination']['payment_events']['total'], + 'transaction'=>$state,'writer_lock_queries'=>count(array_filter($sql,fn($q)=>str_contains(strtolower($q),'for update'))),'queries'=>count($sql)]; + } + } + }catch(Throwable $e){$out=['success'=>false,'error_class'=>get_class($e)];} + $out['time_ms']=round((hrtime(true)-$start)/1e6,3);file_put_contents($input.'.result',json_encode($out,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));exit; +} +if($phase==='settlement-read-race'){ + if(is_file($s['root'].'/settlement-read-race.json'))throw new LogicException('Completed race proof preserved'); + $baseline=json_decode(file_get_contents($s['root'].'/settlement-volume.json'),true,64,JSON_THROW_ON_ERROR); + if($fingerprint()!==$baseline['baseline_fingerprint'])throw new LogicException('Existing fixture changed'); + $workers=[];$files=[]; + $launch=function(string $job)use(&$workers,&$files,$s,$file){ + $input=$s['root'].'/read-race-'.$job.'-'.bin2hex(random_bytes(5)).'.json'; + file_put_contents($input,json_encode(['job'=>$job,'label'=>'settlement_read_'.$job.'_'.$s['tag']])); + $log=$input.'.log';$p=proc_open([PHP_BINARY,__DIR__.'/payable-history-sgf-proof.php',$file,'settlement-read-worker',$input],[0=>['file','NUL','r'],1=>['file',$log,'a'],2=>['file',$log,'a']],$pipes,dirname(__DIR__),null,['bypass_shell'=>true]); + if(!is_resource($p))throw new RuntimeException('Could not start owned worker');$workers[$job]=$p;$files[$job]=$input; + }; + $waitResult=function(string $job,int $seconds=15)use(&$files){$until=microtime(true)+$seconds;while(!is_file($files[$job].'.result')&µtime(true)<$until)usleep(20000);if(!is_file($files[$job].'.result'))throw new RuntimeException('Owned worker did not complete: '.$job);return json_decode(file_get_contents($files[$job].'.result'),true,64,JSON_THROW_ON_ERROR);}; + DB::beginTransaction(); + try{ + $parent=(int)DB::selectOne('select pg_backend_pid() as pid')->pid; + DB::table('companies')->where('tenant_id',$scope['tenant_id'])->where('id',$scope['company_id'])->lockForUpdate()->firstOrFail(); + $a=DB::table('ps_allocations')->where('payment_id',$g['payment_id'])->orderBy('id')->skip(1)->first(); + $proposal=$command('prepare','reversal-prepare',['allocation_id'=>$a->id,'source_revision'=>$a->source_revision,'reason'=>'Uncommitted correction for isolated read concurrency.']); + $command('validate','reversal-confirm',['proposal_id'=>$proposal['proposal_id'],'reason'=>'Uncommitted independent review for concurrency.']); + $enter('read'); + $launch('legacy');$launch('command'); + config(['database.connections.read_race_monitor'=>DB::connection()->getConfig()]);$monitor=DB::connection('read_race_monitor'); + $blocked=[];$observed=[];$until=microtime(true)+12; + do{ + $monitor->select('select pg_stat_clear_snapshot()'); + foreach(['legacy','command'] as $job){ + $row=$monitor->selectOne('SELECT pid, wait_event_type, wait_event, query, pg_blocking_pids(pid)::text AS blockers FROM pg_stat_activity WHERE datname=current_database() AND application_name=?',['settlement_read_'.$job.'_'.$s['tag']]); + if($row)$observed[$job]=['pid'=>$row->pid,'wait_type'=>$row->wait_event_type,'wait'=>$row->wait_event,'blockers'=>$row->blockers,'company_statement'=>str_contains($row->query,'"companies"'),'for_update'=>str_contains(strtolower($row->query),'for update')]; + } + foreach($observed as $job=>$row){ + $direct=json_decode(str_replace(['{','}'],['[',']'],$row['blockers']));$reachesParent=in_array($parent,$direct,true); + foreach($observed as $other)if(in_array((int)$other['pid'],$direct,true)&&in_array($parent,json_decode(str_replace(['{','}'],['[',']'],$other['blockers'])),true))$reachesParent=true; + if($row['wait_type']==='Lock'&&$row['company_statement']&&$row['for_update']&&$reachesParent)$blocked[$job]=['blocking_chain_reaches_parent'=>true,'direct_blockers'=>$direct,'statement'=>'companies FOR UPDATE','wait_event'=>$row['wait']]; + } + if(count($blocked)===2)break;usleep(20000); + }while(microtime(true)<$until); + if(count($blocked)!==2){file_put_contents($s['root'].'/read-race-diagnostic-'.time().'.json',json_encode(['parent'=>$parent,'observed'=>$observed,'detected'=>$blocked],JSON_PRETTY_PRINT));throw new RuntimeException('Legacy read and confirmation must both wait on the parent company lock');} + $launch('read');$read=$waitResult('read',10); + if(!$read['success']||$read['unallocated_minor']!==41||$read['events_total']!==9||$read['writer_lock_queries']!==0||$read['transaction']!==['isolation'=>'repeatable read','read_only'=>'on']||DB::transactionLevel()!==1)throw new RuntimeException('New reader did not preserve committed read-only snapshot'); + $stillBlocked=[];foreach(['legacy','command'] as $job)$stillBlocked[$job]=!is_file($files[$job].'.result'); + if(in_array(false,$stillBlocked,true))throw new RuntimeException('Writer lock was not retained during the reader'); + DB::rollBack(); + $legacy=$waitResult('legacy');$confirmed=$waitResult('command'); + if(!$legacy['success']||$legacy['unallocated_minor']!==41||$legacy['writer_lock_queries']<2||!$confirmed['success']||!$confirmed['replayed']||!$confirmed['same_result']||$confirmed['decisions']!==1||$confirmed['allocations_for_target']!==1)throw new RuntimeException('Post-release command/read result differs'); + if($fingerprint()!==$baseline['baseline_fingerprint'])throw new RuntimeException('Race left financial writes behind'); + file_put_contents($s['root'].'/settlement-read-race.json',json_encode(['passed'=>true,'blocker'=>'parent transaction on companies row','waiting'=>$blocked,'reader_completed_before_release'=>true,'uncommitted_reversal_not_seen'=>true,'read'=>$read,'legacy_read_after_release'=>$legacy,'confirmation_after_release'=>$confirmed,'financial_fingerprint_equal'=>true,'not_throughput_capacity'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); + echo "Reader finished before writer release; legacy reader and confirmation waited, then completed with one decision/allocation. All writes rolled back.\n"; + }finally{ + while(DB::transactionLevel()>0)DB::rollBack(); + foreach($workers as $p){$status=proc_get_status($p);if($status['running'])proc_terminate($p);proc_close($p);}DB::purge('read_race_monitor'); + }exit; +} +if($phase==='settlement-read-cases'){require __DIR__.'/settlement-read-cases.php';exit;} +if($phase==='settlement-read-post'){ + if(is_file($s['root'].'/settlement-read-post.json'))throw new LogicException('Completed post-check preserved'); + DB::beginTransaction();DB::statement('SET TRANSACTION READ ONLY');try{ + $baseline=json_decode(file_get_contents($s['root'].'/settlement-volume.json'),true,64,JSON_THROW_ON_ERROR);$hash=$fingerprint(); + if($hash!==$baseline['baseline_fingerprint'])throw new LogicException('Financial facts changed during read-isolation proof'); + file_put_contents($s['root'].'/settlement-read-post.json',json_encode(['passed'=>true,'read_only'=>true,'financial_fingerprint_equal'=>true,'business_fingerprint'=>$hash,'payment_count'=>DB::table('ps_payments')->count(),'pending_decision_absent'=>!DB::table('ps_allocation_decisions')->where('proposal_id',$g['pending_proposal_id'])->exists(),'old_post_file_sha256'=>hash_file('sha256',$s['root'].'/settlement-post.json')],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); + }finally{DB::rollBack();}echo "Financial baseline and original pending decision preserved after concurrency and HTTP.\n";exit; +} +throw new LogicException('Unknown read isolation proof phase'); diff --git a/scripts/sourcing-composition-proof.php b/scripts/sourcing-composition-proof.php new file mode 100644 index 0000000..40c5a45 --- /dev/null +++ b/scripts/sourcing-composition-proof.php @@ -0,0 +1,23 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true);$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.sourcing_verify'=>$s['nativeConnection']]);$db=DB::connection('sourcing_verify');$checks=[];$ok=function($v,$name)use(&$checks,$s){if(!$v)throw new RuntimeException($name);$checks[]=$name;file_put_contents($s['root'].'/sourcing-progress.json',json_encode($checks,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));};$servers=[];$clients=[];$sessions=[]; +try{ + foreach([0,1]as$i){$socket=stream_socket_server('tcp://127.0.0.1:0');$port=(int)substr(strrchr(stream_socket_get_name($socket,false),':'),1);fclose($socket);$server=new Symfony\Component\Process\Process([PHP_BINARY,'-S','127.0.0.1:'.$port,'-t',$s['app'].'/public',dirname(__DIR__).'/scripts/receipt-composition-http.php'],$s['app'],null,null,180);$server->start();$servers[]=$server;for($j=0;$j<80;$j++){if($socket=@fsockopen('127.0.0.1',$port,$errno,$error,.1)){fclose($socket);break;}usleep(50000);}$clients[]=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:'.$port,'http_errors'=>false,'timeout'=>25]);} + $enter=function($role,$i=0,$query=[])use(&$sessions,$clients){$jar=new GuzzleHttp\Cookie\CookieJar;$r=$clients[$i]->get('/qa/enter/'.$role,['cookies'=>$jar,'query'=>$query]);$sessions[$role.$i]=['jar'=>$jar]+json_decode((string)$r->getBody(),true,32,JSON_THROW_ON_ERROR);};$options=function($role,$i=0,$data=null,$headers=[])use(&$sessions){$v=$sessions[$role.$i];$o=['cookies'=>$v['jar'],'headers'=>$headers+['Accept'=>'application/json','X-SGF-Context'=>$v['context'],'X-CSRF-TOKEN'=>$v['csrf']]];if($data!==null)$o['json']=$data;return $o;};$call=function($role,$path,$data=null,$i=0,$headers=[])use($clients,$options,$s){$r=$clients[$i]->request($data===null?'GET':'POST',$path,$options($role,$i,$data,$headers));$text=(string)$r->getBody();if($r->getStatusCode()>=500)file_put_contents($s['root'].'/sourcing-last-500.txt',$text);return ['status'=>$r->getStatusCode(),'data'=>json_decode($text,true),'body'=>$text];};foreach(['actor','issuer','validator',...(($s['requests']??false)?['approver']:[])]as$role)$enter($role);$decisionRole=($s['requests']??false)?'approver':'issuer';$enter('actor',1);$base='/api/purchasing-sourcing';$url=$base.'/requests/'.$n['requisition']; + $fingerprint=function()use($db){$h=hash_init('sha256');foreach(['quotations','quotation_items','proposal_evaluations','purchase_awards','purchase_award_approvals','purchase_orders','budget_entries','audit_logs']as$table){hash_update($h,$table);foreach($db->table($table)->orderBy('id')->get()as$row)hash_update($h,json_encode((array)$row,JSON_THROW_ON_ERROR));}return hash_final($h);}; + $ok($db->table('quotations')->count()===0&&$db->table('proposal_evaluations')->count()===0&&$db->table('purchase_awards')->count()===0,'source starts with no proposal evaluation or adjudication');$r=$call('actor',$base);$ok($r['status']===200&&count($r['data']['data'])===1,'only mapped approved source request is listed');$ok($call('actor','/purchasing/sourcing')['status']===200,'functional sourcing workspace is served');$ok($call('validator',$url)['status']===403,'warehouse cannot access supplier comparison');$ok($call('actor',$base.'/requests/'.$n['foreign_requisition'])['status']===403,'another tenant process is refused');$ok($call('actor',$url,null,0,['X-SGF-Context'=>'old-context'])['status']===409,'stale SGF context is refused'); + $preview=function($role,$action,$data,$key=null)use($call,$url){$state=$call($role,$url);if($state['status']!==200)throw new RuntimeException('Source state unavailable');return $call($role,$url.'/preview',['operation_key'=>$key??(string)Str::uuid(),'revision'=>$state['data']['revision'],'action'=>$action,'data'=>$data]);};$commit=function($role,$cut)use($call,$url){return $call($role,$url.'/confirm',['preview'=>$cut]);}; + $quote=function($i)use($n){return ['supplier_id'=>$n['supplier_ids'][$i],'reference'=>'SGF-Q-'.($i+1),'delivery_days'=>5,'valid_until'=>date('Y-m-d',strtotime('+30 days')),'payment_terms'=>'30 dias no ensaio','no_conflict'=>true,'items'=>[['requisition_item_id'=>$n['line'],'unit_price'=>(string)(100+$i*20),'discount_type'=>'none','discount_value'=>'0']]];};$key=(string)Str::uuid();$data=$quote(0);$before=$fingerprint();$p=$preview('actor','quote',$data,$key);$ok($p['status']===200&&$p['data']['impact']['total_minor']===10000,'original quotation pricing supplies the preview total');$ok($fingerprint()===$before,'preview savepoint commits no proposal evaluation budget or audit records');$cut=$p['data']['preview'];$other=$data;$other['reference']='Other contents';$alternate=$preview('actor','quote',$other,$key)['data']['preview'];$ok($commit('actor',$cut.'tampered')['status']===409,'tampered preview is refused'); + $db->unprepared("CREATE FUNCTION public.sourcing_qa_fail() RETURNS trigger LANGUAGE plpgsql AS \$\$ BEGIN IF NEW.action='sgf.sourcing.command' THEN RAISE EXCEPTION 'synthetic sourcing receipt failure'; END IF; RETURN NEW; END \$\$; CREATE TRIGGER sourcing_qa_fail BEFORE INSERT ON audit_logs FOR EACH ROW EXECUTE FUNCTION public.sourcing_qa_fail()");try{$ok($commit('actor',$cut)['status']===500,'failure to record the command receipt fails the confirmation');$ok($fingerprint()===$before,'native proposal lines and audit roll back with the command receipt');}finally{$db->unprepared('DROP TRIGGER sourcing_qa_fail ON audit_logs; DROP FUNCTION public.sourcing_qa_fail()');} + $responses=GuzzleHttp\Promise\Utils::unwrap([$clients[0]->postAsync($url.'/confirm',$options('actor',0,['preview'=>$cut])),$clients[1]->postAsync($url.'/confirm',$options('actor',1,['preview'=>$cut]))]);$statuses=array_map(fn($r)=>$r->getStatusCode(),$responses);sort($statuses);$ok($statuses===[200,201],'two independent workers recover the same proposal command once');$q1=json_decode((string)$responses[0]->getBody(),true)['quotation_id'];$ok($db->table('quotations')->count()===1&&$db->table('quotation_items')->count()===1,'concurrent repetition creates one proposal and one line');$ok($commit('actor',$alternate)['status']===409,'same operation key with other contents is refused'); + $quotes=[$q1];foreach([1,2]as$i){$p=$preview('actor','quote',$quote($i));$r=$commit('actor',$p['data']['preview']);$ok($r['status']===201,'explicit proposal registered '.($i+1));$quotes[]=$r['data']['quotation_id'];} + $selection=['quotation_id'=>$q1,'justification'=>'Escolha expressa com base na comparação sintética.','delivery_date'=>date('Y-m-d',strtotime('+7 days')),'delivery_location'=>'Armazém QA'];$ok($preview('actor','select',$selection)['status']===422&&$db->table('purchase_awards')->count()===0,'missing evaluations cannot be bypassed to create an award'); + foreach($quotes as$q)foreach(['actor','issuer']as$role){$data=['quotation_id'=>$q,'quality'=>'8','history'=>'5','payment'=>'8','comment'=>'Fundamento individual exclusivamente sintético.','no_conflict'=>true];$p=$preview($role,'evaluate',$data);$ok($p['status']===200,'native evaluation preview available '.$role.'/'.$q);$r=$commit($role,$p['data']['preview']);$ok($r['status']===201,'individual evaluation recorded '.$role.'/'.$q);} + $r=$call('actor',$url);$ok($r['data']['comparison']['ready']===true&&$r['data']['comparison']['top_ids']===[$q1],'original comparison identifies eligible top without choosing it');$duplicate=['quotation_id'=>$q1,'quality'=>'8','history'=>'5','payment'=>'8','comment'=>'Tentativa repetida de outra avaliação.','no_conflict'=>true];$ok($preview('actor','evaluate',$duplicate)['status']===422&&$db->table('proposal_evaluations')->count()===6,'another key cannot create a second evaluation by the same person'); + $p=$preview('actor','select',$selection);$selectCut=$p['data']['preview'];$grant=DB::table('permission_grants')->where($f['scope'])->where('user_id',$f['actor'])->where('permission','purchasing_sourcing.select')->first();DB::table('permission_grants')->where('id',$grant->id)->delete();try{$ok($commit('actor',$selectCut)['status']===403,'selection right is revalidated at confirmation');}finally{DB::table('permission_grants')->insert((array)$grant);}$r=$commit('actor',$selectCut);$ok($r['status']===201&&$r['data']['status']==='pending','chosen proposal starts original distinct award approval');$award=$r['data']['award_id'];$ok($commit('actor',$selectCut)['status']===200&&$db->table('purchase_awards')->count()===1,'selection repetition creates no second adjudication');$ok($preview('actor','quote',$quote(0))['status']===422,'proposal window closes after adjudication');$ok($commit('actor',$cut)['status']===200,'historical proposal receipt remains recoverable after the window closes'); + $decision=['award_id'=>$award,'decision'=>'approved','comment'=>'Conferência independente da base e do valor final.'];$ok($preview('actor','decide',$decision)['status']===403,'award preparer cannot approve their own decision');$p=$preview($decisionRole,'decide',$decision);$r=$commit($decisionRole,$p['data']['preview']);$ok($r['status']===201&&$r['data']['status']==='approved','distinct eligible head approves through original workflow');$ok($commit($decisionRole,$p['data']['preview'])['status']===200&&$db->table('purchase_award_approvals')->where('decision','approved')->count()===1,'approval repetition preserves one recorded decision'); + $orders='/api/purchasing-orders/awards/'.$award;$r=$call('actor',$orders);$ok($r['status']===200&&$r['data']['can_issue']===true,'adjudication created in SGF reaches order workflow without rebinding IDs');$p=$call('actor',$orders.'/preview',['revision'=>$r['data']['revision']]);$r=$call('actor',$orders.'/issue',['preview'=>$p['data']['preview']]);$ok($r['status']===201,'approved SGF adjudication issues one canonical order');$order=$r['data']['order'];$receipts='/api/purchasing-receipts/orders/'.$order['id'];$r=$call('validator',$receipts);$payload=['revision'=>$r['data']['revision'],'idempotency_key'=>(string)Str::uuid(),'delivery_note'=>'SGF-SOURCING-RECEIPT','received_on'=>date('Y-m-d'),'warehouse_id'=>$n['warehouse'],'items'=>[['purchase_order_item_id'=>$order['items'][0]['id'],'received_quantity'=>'1.000','accepted_quantity'=>'1.000','quality_status'=>'compliant','stock_item_id'=>$n['stock'],'notes'=>null]]];$p=$call('validator',$receipts.'/preview',$payload);$r=$call('validator',$receipts.'/confirm',['preview'=>$p['data']['preview']]);$ok($r['status']===201&&count($r['data']['movements'])===1,'warehouse receives the actual order created from SGF sourcing');$r=$call('validator',$receipts);$ok($r['data']['progress']['state']==='complete','proposal-to-adjudication-to-order-to-receipt path completes');$ok($db->table('quotations')->count()===3&&$db->table('proposal_evaluations')->count()===6&&$db->table('purchase_awards')->count()===1&&$db->table('purchase_orders')->count()===1&&$db->table('stock_movements')->count()===1,'complete path leaves exactly the intended business facts');$ok($db->table('invoices')->count()===0&&$db->table('budget_consumptions')->count()===0&&(int)$db->table('budget_entries')->where('tenant_id',$n['tenant'])->sum('committed_minor')===10000,'one source-budget commitment without invoice payment or consumption'); + $h=$call('issuer',$url.'/history?page=1');$ok($h['status']===200&&$h['data']['per_page']===25&&count($h['data']['data'])===25,'full append-only history is paginated on server');$h2=$call('issuer',$url.'/history?page=2');$ids1=array_column($h['data']['data'],'id');$ids2=array_column($h2['data']['data'],'id');$ok($h2['status']===200&&count($ids2)>0&&array_intersect($ids1,$ids2)===[],'history pages are distinct and expose older evidence'); + file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'quotes'=>3,'evaluations'=>6,'awards'=>1,'approved_decisions'=>1,'orders'=>1,'receipts'=>1,'movements'=>1,'commit_minor'=>10000,'whole_selected_path_complete'=>true,'concurrency_statuses'=>$statuses,'preview_persistent_fingerprint_unchanged'=>true,'rollback_recovery'=>true,'original_controllers_and_workflows'=>true,'visual_review'=>false,'deployment_capacity_validated'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." sourcing-to-receipt checks passed.\n"; +}finally{foreach($servers as$i=>$server){$server->stop(2);file_put_contents($s['root'].'/sourcing-http-'.$i.'.log',$server->getOutput()."\n".$server->getErrorOutput());}} diff --git a/scripts/sourcing-demo-smoke.php b/scripts/sourcing-demo-smoke.php new file mode 100644 index 0000000..8e075d9 --- /dev/null +++ b/scripts/sourcing-demo-smoke.php @@ -0,0 +1,5 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);config(['database.connections.sourcing_smoke'=>$s['nativeConnection']]);$db=DB::connection('sourcing_smoke');$checks=[];$ok=function($v,$name)use(&$checks){if(!$v)throw new RuntimeException($name);$checks[]=$name;};$fingerprint=function()use($db){$h=hash_init('sha256');foreach(['quotations','quotation_items','proposal_evaluations','purchase_awards','purchase_award_approvals','purchase_orders','goods_receipts','stock_movements','budget_entries','audit_logs']as$table){hash_update($h,$table);foreach($db->table($table)->orderBy('id')->get()as$row)hash_update($h,json_encode((array)$row,JSON_THROW_ON_ERROR));}return hash_final($h);};$before=$fingerprint();$empty=true;foreach(['quotations','proposal_evaluations','purchase_awards','purchase_orders','goods_receipts','stock_movements']as$table)$empty=$empty&&$db->table($table)->count()===0;$ok($empty,'demo starts without proposals evaluations awards orders receipts or movements');$client=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:8066','http_errors'=>false,'timeout'=>25]); +foreach(['actor','issuer','validator']as$role){$jar=new GuzzleHttp\Cookie\CookieJar;$r=$client->get('/qa/enter/'.$role,['cookies'=>$jar]);$v=json_decode((string)$r->getBody(),true);$options=['cookies'=>$jar,'headers'=>['Accept'=>'application/json','X-SGF-Context'=>$v['context']]];$r=$client->get('/api/purchasing-sourcing/requests/'.$n['requisition'],$options);$d=json_decode((string)$r->getBody(),true);if($role==='actor'){$ok($r->getStatusCode()===200&&$d['capabilities']['quote']===true&&$d['capabilities']['select']===false&&count($d['quotes'])===0,'buyer can prepare but cannot select an incomplete comparison');$r=$client->get('/purchasing/sourcing',$options);$ok($r->getStatusCode()===200&&str_contains((string)$r->getBody(),'sourcing-workspace.mjs'),'sourcing workspace is live');}elseif($role==='issuer')$ok($r->getStatusCode()===200&&$d['capabilities']['quote']===false&&$d['capabilities']['decide']===false,'head can inspect without preparing proposals or deciding a nonexistent award');else{$ok($r->getStatusCode()===403,'warehouse cannot inspect economic sourcing');$r=$client->get('/api/purchasing-receipts',$options);$p=json_decode((string)$r->getBody(),true);$ok($r->getStatusCode()===200&&count($p['data'])===0,'warehouse waits for an actual issued order');}} +$r=$client->get('/sourcing-workspace.mjs');$ok($r->getStatusCode()===200&&hash('sha256',(string)$r->getBody())===hash_file('sha256',$s['app'].'/public/sourcing-workspace.mjs'),'served sourcing script matches delivered source');$ok($db->table('budget_entries')->where('kind','commit')->count()===0,'no initial commitment was created');$ok($fingerprint()===$before,'read-only smoke leaves all business evidence intact');file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'before'=>$before,'after'=>$fingerprint(),'quotes'=>0,'evaluations'=>0,'awards'=>0,'orders'=>0,'receipts'=>0,'movements'=>0,'visual_review'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); diff --git a/scripts/sourcing-guard-proof.php b/scripts/sourcing-guard-proof.php new file mode 100644 index 0000000..58d9e77 --- /dev/null +++ b/scripts/sourcing-guard-proof.php @@ -0,0 +1,3 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$checks=[];$queries=0;DB::listen(function()use(&$queries){$queries++;});$runtime=new App\Modules\Purchasing\ReceiptRuntime;$probe=function($fn,$status,$name)use(&$checks,&$queries){$before=$queries;try{$fn();throw new RuntimeException('Guard did not refuse');}catch(Symfony\Component\HttpKernel\Exception\HttpException $e){if($e->getStatusCode()!==$status||$queries!==$before)throw new RuntimeException($name);$checks[]=$name;}};config(['receipt_qa.sourcing_enabled'=>false]);$probe(fn()=>$runtime->run('purchasing_sourcing.select',fn()=>true),404,'disabled sourcing runtime refuses before SQL');$probe(fn()=>(new App\Modules\Purchasing\SourcingController)->preview(1,new Illuminate\Http\Request,$runtime),404,'disabled sourcing preview refuses before validation or SQL');config(['receipt_qa.sourcing_enabled'=>true]);$app->instance('env','production');$probe(fn()=>$runtime->run('purchasing_sourcing.select',fn()=>true),403,'production cannot activate synthetic sourcing');file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'database_queries'=>0,'business_writes'=>0],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); diff --git a/scripts/sourcing-home-check.mjs b/scripts/sourcing-home-check.mjs new file mode 100644 index 0000000..c4ab074 --- /dev/null +++ b/scripts/sourcing-home-check.mjs @@ -0,0 +1,2 @@ +import fs from 'node:fs';import crypto from 'node:crypto';import assert from 'node:assert/strict';import React from 'react';import {renderToStaticMarkup} from 'react-dom/server';import {createServer} from 'vite'; +const out='docs/proofs/sourcing-home-20261103.json';assert(!fs.existsSync(out));const server=await createServer({configFile:false,server:{middlewareMode:true},appType:'custom'}),checks=[];const check=(v,n)=>{assert(v,n);checks.push(n);};try{const {default:Home}=await server.ssrLoadModule('/resources/js/PurchasingHome.jsx');const context={company:{name:'QA'},unit:{id:7},purchasing:{sourcing:true,orders:true,receipts:true}};const render=(c,rights)=>renderToStaticMarkup(React.createElement(Home,{context:c,can:(p,u)=>rights.includes(p)&&u===7,navigate(){}}));check(render(context,['purchasing_sourcing.view']).includes('href="/purchasing/sourcing"'),'scoped right and capability expose sourcing link');check(!render(context,[]).includes('href="/purchasing/sourcing"'),'absent right hides sourcing link');check(!render({...context,unit:{id:8}},['purchasing_sourcing.view']).includes('href="/purchasing/sourcing"'),'foreign unit right hides sourcing link');check(!render({...context,purchasing:{sourcing:false}},['purchasing_sourcing.view']).includes('href="/purchasing/sourcing"'),'disabled composition hides sourcing link');check(!render({...context,unit:null},['purchasing_sourcing.view']).includes('href="/purchasing/sourcing"'),'unit selection is required');const old=render(context,['purchasing_orders.view','purchasing_receipts.view']);check(old.includes('href="/purchasing/orders"')&&old.includes('href="/purchasing/receipts"'),'order and receipt links remain available');fs.writeFileSync(out,JSON.stringify({passed:true,checks:6,names:checks,source:'resources/js/PurchasingHome.jsx',sha256:crypto.createHash('sha256').update(fs.readFileSync('resources/js/PurchasingHome.jsx')).digest('hex'),visual_review:false},null,2)+'\n');console.log(JSON.stringify({passed:true,checks:6}));}finally{await server.close();} diff --git a/scripts/sourcing-host-setup.php b/scripts/sourcing-host-setup.php new file mode 100644 index 0000000..ab0c7dd --- /dev/null +++ b/scripts/sourcing-host-setup.php @@ -0,0 +1,4 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();App\Modules\Purchasing\BudgetAdapter::guard();$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true);$n=json_decode(file_get_contents($s['root'].'/native-fixture.json'),true);$c=DB::selectOne("SELECT pg_get_constraintdef(oid) definition FROM pg_constraint WHERE conrelid='permission_grants'::regclass AND conname='permission_grants_scope_check'");if(!preg_match('/^CHECK\s*\((.*)\)$/s',$c->definition,$match))throw new LogicException('QA catalogue constraint not found');DB::statement('ALTER TABLE permission_grants DROP CONSTRAINT permission_grants_scope_check');DB::statement("ALTER TABLE permission_grants ADD CONSTRAINT permission_grants_scope_check CHECK (({$match[1]}) OR (unit_id IS NOT NULL AND permission IN ('purchasing_sourcing.view','purchasing_sourcing.prepare','purchasing_sourcing.evaluate','purchasing_sourcing.select','purchasing_sourcing.approve')))"); +foreach(['actor'=>['view','prepare','evaluate','select'],'issuer'=>['view','evaluate','approve']]as$role=>$rights)foreach($rights as$right)DB::table('permission_grants')->insert($f['scope']+['user_id'=>$f[$role],'permission'=>'purchasing_sourcing.'.$right,'created_at'=>now(),'updated_at'=>now()]);$path=$s['root'].'/binding.json';$p=json_decode(file_get_contents($path),true);foreach($p['bindings']as&$b){$b['award_ids']=[];$b['supplier_ids']=$n['supplier_ids'];}unset($b);file_put_contents($path,json_encode($p,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));file_put_contents($s['root'].'/sourcing-baseline.json',json_encode(['passed'=>true,'quotes'=>0,'evaluations'=>0,'awards'=>0,'orders'=>0,'receipts'=>0,'movements'=>0,'initial_reserved_minor'=>($s['requests']??false)?0:10000,'initial_committed_minor'=>0],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); diff --git a/scripts/sourcing-loader-proof.php b/scripts/sourcing-loader-proof.php new file mode 100644 index 0000000..f7b3d87 --- /dev/null +++ b/scripts/sourcing-loader-proof.php @@ -0,0 +1,5 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();$root=$s['root'].'/loader-probes';if(file_exists($root))throw new LogicException('Fresh loader probes required');mkdir($root);mkdir($root.'/app/Fixture',0777,true);$method=new ReflectionMethod(App\Modules\Purchasing\ReceiptRuntime::class,'loadClass');$checks=[];$ok=function($v,$name)use(&$checks){if(!$v)throw new RuntimeException($name);$checks[]=$name;};$refuse=function($fn,$name)use($ok){try{$fn();throw new RuntimeException('Expected refusal');}catch(Symfony\Component\HttpKernel\Exception\HttpException $e){$ok($e->getStatusCode()===503,$name);}}; +$file=$root.'/app/Fixture/Verified.php';file_put_contents($file,"invoke(null,'Tempo\\Purchasing\\Embedded\\Fixture\\Verified',$root,['app/Fixture/Verified.php'=>$pin]);$ok(($GLOBALS['loader_verified']??false)===true,'known dependency is verified before execution'); +$file=$root.'/app/Fixture/Tampered.php';file_put_contents($file,"$method->invoke(null,'Tempo\\Purchasing\\Embedded\\Fixture\\Tampered',$root,['app/Fixture/Tampered.php'=>str_repeat('0',64)]),'altered dependency is refused');$ok(!class_exists('Tempo\\Purchasing\\Embedded\\Fixture\\Tampered',false)&&!isset($GLOBALS['loader_tampered']),'unverified code is never executed'); +$refuse(fn()=>$method->invoke(null,'Tempo\\Purchasing\\Embedded\\Fixture\\Unlisted',$root,[]),'unlisted dependency is refused');$refuse(fn()=>$method->invoke(null,'Tempo\\Purchasing\\Embedded\\..\\Outside',$root,[]),'class path traversal is refused');$method->invoke(null,'Unrelated\\Library\\ClassName',$root,[]);$ok(true,'other namespace loaders remain available');file_put_contents($out,json_encode(['passed'=>true,'checks'=>$checks,'business_writes'=>0,'reference_bundle_modified'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR)); diff --git a/scripts/stock-ledger-demo-check.mjs b/scripts/stock-ledger-demo-check.mjs new file mode 100644 index 0000000..df3e7a3 --- /dev/null +++ b/scripts/stock-ledger-demo-check.mjs @@ -0,0 +1,7 @@ +import fs from 'node:fs';import path from 'node:path';import assert from 'node:assert/strict';import {spawnSync} from 'node:child_process'; +const tag=process.argv[2];if(!/^[a-f0-9]{12}$/.test(tag??''))throw Error('Explicit demo required');const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),root=path.join(run.root,'private/stock-ledger-'+tag),servers=JSON.parse(fs.readFileSync(path.join(root,'demo-servers.json'))),out=path.join(root,'demo-check.json');if(fs.existsSync(out))throw Error('Completed demo check preserved');let checks=0;const check=(v,n)=>{assert(v,n);checks++;}; +const session=base=>{const jar=new Map();return async(url,headers={})=>{const r=await fetch(base+url,{redirect:'manual',headers:{...headers,...(jar.size?{Cookie:[...jar].map(([k,v])=>k+'='+v).join('; ')}:{})}});for(const c of r.headers.getSetCookie()){const first=c.split(';')[0],i=first.indexOf('=');jar.set(first.slice(0,i),first.slice(i+1));}return{status:r.status,body:await r.text(),location:r.headers.get('location')};};}; +const native=session('http://127.0.0.1:'+servers.native.port);let r=await native('/qa/stock');check(r.status===200&&r.body.includes('2UN/100MZN'),'new native QA entry reachable');r=await native('/qa/stock-enter/prepare');const n=JSON.parse(r.body);r=await native('/stock-valuation');check(r.status===200&&r.body.includes('id="rate"')&&r.body.includes('Incompleto'),'frozen bundle workspace begins without rates');r=await native('/api/stock-valuation',{'X-Stock-Context':n.context,Accept:'application/json'});const nd=JSON.parse(r.body);check(r.status===200&&nd.stock.rates.length===0&&nd.ledger.journals.length===0&&nd.stock.physical_balance_milli===1500,'native demo decisions unconsumed'); +const sgf=session('http://127.0.0.1:'+servers.sgf.port);r=await sgf('/qa/stock-observer/reader');const s=JSON.parse(r.body);r=await sgf('/api/stock-valuation-read',{'X-SGF-Context':s.context,Accept:'application/json'});const d=JSON.parse(r.body);check(r.status===200&&d.status==='pending'&&d.unposted_movements===3&&d.physical_quantity_milli===1500&&d.posted_stock_value_minor===0,'SGF observer shows actual quantity and pending valuation, not fictitious current value');check(d.current_source_dependencies_validated===false&&d.operation_executed===false,'SGF remains qualified read-only observer');r=await sgf('/general-ledger/stock-valuation');check(r.status===200&&r.body.includes('Conferência incompleta')&&!r.body.includes('/^[a-f0-9]{12}$/.test(t??'')))throw Error('Two explicit fresh QA identifiers required'); +const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),nativeFile=path.join(run.root,'private/stock-ledger-'+nativeTag+'/settings.json'),observerFile=path.join(run.root,'private/stock-ledger-observer-'+observerTag+'/settings.json'),n=JSON.parse(fs.readFileSync(nativeFile)),o=JSON.parse(fs.readFileSync(observerFile)),php='C:/laragon/tools/sgf-tempo/php-8.4.27/php.exe',hash=f=>crypto.createHash('sha256').update(fs.readFileSync(f)).digest('hex'); +if(o.source.database!==n.database||fs.existsSync(path.join(n.root,'demo-servers.json')))throw Error('Fresh matching source/observer required'); +const bundle=path.join(n.root,'bundle'),files={};fs.mkdirSync(bundle);const copy=(from,to,relative)=>{fs.mkdirSync(path.dirname(to),{recursive:true});fs.copyFileSync(from,to);files[relative]=hash(to);};for(const pkg of ['payables','general-ledger']){copy('packages/'+pkg+'/bootstrap.php',path.join(bundle,pkg,'bootstrap.php'),pkg+'/bootstrap.php');for(const dir of ['src','ui']){const walk=p=>{for(const e of fs.readdirSync(p,{withFileTypes:true})){if(e.isSymbolicLink())throw Error('Bundle link refused');const f=path.join(p,e.name);if(e.isDirectory())walk(f);else{const relative=path.relative('packages',f).replaceAll('\\','/');copy(f,path.join(bundle,relative),relative);}}};walk('packages/'+pkg+'/'+dir);}} +copy('integrations/purchasing/StockValuationAdapter.php',path.join(bundle,'integrations/purchasing/StockValuationAdapter.php'),'integrations/purchasing/StockValuationAdapter.php');fs.writeFileSync(path.join(bundle,'manifest.json'),JSON.stringify({format:'sgf.stock-ledger.qa-runtime.v1',files},null,2)); +n.ledger=path.join(bundle,'general-ledger');n.payables=path.join(bundle,'payables');n.adapter=path.join(bundle,'integrations/purchasing/StockValuationAdapter.php');n.bundle_manifest_sha256=hash(path.join(bundle,'manifest.json'));fs.writeFileSync(nativeFile,JSON.stringify(n,null,2)); +const baseline=spawnSync(php,[path.resolve('scripts/stock-ledger-entry.php'),nativeFile,'demo-baseline'],{encoding:'utf8',windowsHide:true,timeout:30000});fs.writeFileSync(path.join(n.root,'baseline.log'),baseline.stdout+baseline.stderr);if(baseline.status!==0||!fs.existsSync(path.join(n.root,'demo-baseline.json')))throw Error('Fresh baseline failed'); +o.public=path.join(o.storage,'public');fs.mkdirSync(o.public,{recursive:true});fs.writeFileSync(observerFile,JSON.stringify(o,null,2));const build=spawnSync(process.execPath,['node_modules/vite/bin/vite.js','build','--outDir',path.join(o.public,'build'),'--emptyOutDir'],{encoding:'utf8',windowsHide:true,timeout:120000,maxBuffer:2*1024*1024});fs.writeFileSync(path.join(o.root,'build.log'),build.stdout+build.stderr);if(build.status!==0)throw Error('Private SGF asset build failed'); +const free=async start=>{for(let port=start;port{const server=net.createServer();server.once('error',()=>resolve(false));server.listen(port,'127.0.0.1',()=>server.close(()=>resolve(true)));});if(available)return port;}throw Error('No free dedicated proof port');};const nativePort=await free(8060),observerPort=await free(nativePort+1); +const launch=(root,router,port,settings,key,docroot)=>{const log=fs.openSync(path.join(root,'demo-server.log'),'a'),args=['-S','127.0.0.1:'+port,...(docroot?['-t',docroot]:[]),path.resolve(router)],child=spawn(php,args,{cwd:process.cwd(),detached:true,windowsHide:true,stdio:['ignore',log,log],env:{...process.env,[key]:settings}});child.unref();return child.pid;}; +const nativePid=launch(n.root,'scripts/stock-ledger-http-router.php',nativePort,nativeFile,'STOCK_LEDGER_SETTINGS'),observerPid=launch(o.root,'scripts/stock-ledger-observer-router.php',observerPort,observerFile,'STOCK_OBSERVER_SETTINGS',o.public);const servers={native:{port:nativePort,pid:nativePid,entry:`http://127.0.0.1:${nativePort}/qa/stock`},sgf:{port:observerPort,pid:observerPid,entry:`http://127.0.0.1:${observerPort}/qa/stock-observer/reader?open=1`},native_tag:nativeTag,observer_tag:observerTag,bundle_manifest_sha256:n.bundle_manifest_sha256};fs.writeFileSync(path.join(n.root,'demo-servers.json'),JSON.stringify(servers,null,2));console.log(JSON.stringify(servers)); diff --git a/scripts/stock-ledger-entry.php b/scripts/stock-ledger-entry.php new file mode 100644 index 0000000..58f4fd9 --- /dev/null +++ b/scripts/stock-ledger-entry.php @@ -0,0 +1,28 @@ +'testing','APP_DEBUG'=>'false','APP_KEY'=>$s['app_key'],'DB_CONNECTION'=>'pgsql','DB_HOST'=>'127.0.0.1','DB_PORT'=>'55439','DB_DATABASE'=>$s['database'],'DB_USERNAME'=>$s['role'],'DB_PASSWORD'=>$s['password'],'DB_URL'=>'','SESSION_DRIVER'=>'file','SESSION_COOKIE'=>'stock_ledger_'.$s['tag'],'CACHE_STORE'=>'array','QUEUE_CONNECTION'=>'sync','MAIL_MAILER'=>'array','BCRYPT_ROUNDS'=>'4','LARAVEL_STORAGE_PATH'=>$s['storage'],'APP_CONFIG_CACHE'=>$s['storage'].'/cache/config.php','APP_ROUTES_CACHE'=>$s['storage'].'/cache/routes.php','APP_SERVICES_CACHE'=>$s['storage'].'/cache/services.php','APP_PACKAGES_CACHE'=>$s['storage'].'/cache/packages.php','VIEW_COMPILED_PATH'=>$s['storage'].'/framework/views','SGF_ISOLATED_REGRESSION_RUN'=>$s['run'],'COMMON_PAYABLES_PATH'=>dirname(__DIR__).'/packages/payables','COMMON_PAYABLES_ENABLED'=>'true','PAYABLE_SOURCE_INSTANCE'=>'qa-stock-ledger-'.$s['tag']]; +if(isset($s['payables']))$env['COMMON_PAYABLES_PATH']=$s['payables']; +if(isset($s['bundle_manifest_sha256'])){$manifest=$s['root'].'/bundle/manifest.json';if(hash_file('sha256',$manifest)!==$s['bundle_manifest_sha256'])throw new LogicException('Pinned stock bundle manifest changed');$bundle=json_decode(file_get_contents($manifest),true,64,JSON_THROW_ON_ERROR);foreach($bundle['files']as$relative=>$pin){if(!preg_match('~^(general-ledger|payables|integrations)/[a-zA-Z0-9_./-]+$~D',$relative)||str_contains($relative,'..')||hash_file('sha256',$s['root'].'/bundle/'.$relative)!==$pin)throw new LogicException('Pinned stock bundle file changed');}} +foreach($env as$k=>$v){putenv($k.'='.$v);$_ENV[$k]=$_SERVER[$k]=$v;} +require $s['native'].'/vendor/autoload.php';$app=require $s['native'].'/bootstrap/app.php';$app->useStoragePath($s['storage']);$app->addAbsoluteCachePathPrefix('C:');$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); +require_once $s['ledger'].'/bootstrap.php'; +Tempo\Finance\GeneralLedger\LedgerSchema::assertSynthetic(Illuminate\Support\Facades\DB::connection()); +try{ +if($phase==='invoice-native-negative'){require __DIR__.'/invoice-native-negative.php';exit;} +if($phase==='order-native-setup'){require __DIR__.'/order-native-setup.php';exit;} +if($phase==='receipt-native-setup'){require __DIR__.'/receipt-native-setup.php';exit;} +if($phase==='receipt-native-extra'){require __DIR__.'/receipt-native-extra.php';exit;} +if($phase==='period-batches'){require __DIR__.'/stock-period-proof.php';exit;} +if($phase==='period-concurrency'){require __DIR__.'/stock-period-concurrency.php';exit;} +if(in_array($phase,['prefix-context','prefix-context-current'],true)){require __DIR__.'/stock-prefix-context.php';exit;} +if($phase==='prefix-plan'){require __DIR__.'/stock-prefix-plan.php';exit;} +if(in_array($phase,['prefix-review','prefix-review-final','prefix-review-join','prefix-review-cursor','prefix-review-selected','prefix-review-measured','prefix-review-types','prefix-review-safe'],true)){require __DIR__.'/stock-prefix-proof.php';exit;} +if($phase==='access'){ + require $s['native'].'/tests/Support/SupplyFixture.php';$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true,32,JSON_THROW_ON_ERROR); + foreach($f['actors']as$id){if(Illuminate\Support\Facades\DB::table('organization_memberships')->where('user_id',$id)->exists())throw new LogicException('Existing fixture function profile preserved');supplyGrant(App\Models\User::findOrFail($id),['finance']);} + file_put_contents($s['root'].'/access.json',json_encode(['passed'=>true,'qa_finance_function_memberships'=>3,'existing_native_function'=>'finance','real_grants'=>0],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));exit; +} +if($phase==='setup')require __DIR__.'/stock-ledger-setup.php';else require __DIR__.'/stock-ledger-proof.php'; +}catch(Throwable $e){file_put_contents($s['root'].'/failure-'.time().'.json',json_encode(['class'=>get_class($e),'message'=>$e->getMessage(),'file'=>$e->getFile(),'line'=>$e->getLine(),'frames'=>array_map(fn($f)=>array_intersect_key($f,array_flip(['file','line','function'])),$e->getTrace())],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));fwrite(STDERR,get_class($e).': '.$e->getMessage()."\n");exit(1);} diff --git a/scripts/stock-ledger-extra.php b/scripts/stock-ledger-extra.php new file mode 100644 index 0000000..c24b826 --- /dev/null +++ b/scripts/stock-ledger-extra.php @@ -0,0 +1,26 @@ +insert($scope+['user_id'=>$f['actors']['prepare'],'action'=>'general_ledger.validate','person'=>'qa-stock-person-'.$f['actors']['prepare']]); + $rate=DB::table('gl_stock_rates')->first();$refuse(fn()=>$enter('prepare')->stock->command('rate-validate',['rate_id'=>$rate->id,'version'=>$rate->version,'decision'=>'approved','reason'=>'Even with both rights the same person cannot review.'],(string)Str::uuid()),'same-person rate review refused with both actual rights'); + $s2=$scope;$s2['tenant_id']=999999;$p=new StockValuation(DB::connection(),$s2,$f['actors']['read'],'qa',fn()=>null,fn()=>null);$refuse(fn()=>$p->source('stock.receipt',$f['movements'][0]['id']),'another tenant cannot resolve physical source'); + $s2=$scope;$s2['company_id']=999999;$p=new StockValuation(DB::connection(),$s2,$f['actors']['read'],'qa',fn()=>null,fn()=>null);$refuse(fn()=>$p->source('stock.receipt',$f['movements'][0]['id']),'another company cannot resolve mapped book'); +}); +$case(function()use($enter,$f,$scope,$ok){ + $j=(array)DB::table('gl_journals')->orderBy('id')->first();$p=(array)DB::table('gl_proposals')->where('id',$j['proposal_id'])->first();$r=(array)DB::table('gl_reviews')->where('id',$j['review_id'])->first();unset($p['id'],$r['id'],$j['id']);$p['effect_key']=hash('sha256',(string)Str::uuid());$error=null; + try{DB::transaction(function()use($p,$r,$j){$id=DB::table('gl_proposals')->insertGetId($p);$r['proposal_id']=$id;$rid=DB::table('gl_reviews')->insertGetId($r);$j['proposal_id']=$id;$j['review_id']=$rid;$j['effect_key']=$p['effect_key'];DB::table('gl_journals')->insert($j);});}catch(Illuminate\Database\QueryException $e){$error=$e;} + $ok($error&&($error->errorInfo[0]??null)==='23505'&&str_contains($error->getMessage(),'gl_stock_movement_once'),'SQL forbids a second stock journal even with a forged new effect key'); +}); +$case(function()use($enter,$f,$scope,$body,$command,$ok,$refuse){ + Date::setTestNow('2026-10-29 12:30:00');$period=(array)DB::table('gl_periods')->orderByDesc('version')->first();unset($period['id']);$period['version']++;$period['status']='open';$period['reason']='Transaction-only test of typed stock constraints, rolled back.';DB::table('gl_periods')->insert($period); + $r=App\Models\SupplyRecord::findOrFail($f['return_proposal']);$d=$r->data;$d['operation_key']=(string)Str::uuid();$d['quantity_milli']=250;$d['reason']='Actual quarter unit returned solely inside rollback constraint proof.';$u=App\Models\User::findOrFail($f['physical_actors']['issuer']);auth()->setUser($u);$p=app(App\Services\WarehouseReturns::class)->prepare($u,$d);$u=App\Models\User::findOrFail($f['physical_actors']['receiver']);auth()->setUser($u);$v=app(App\Services\WarehouseReturns::class)->confirm($u,$p['id'],['version'=>1,'received_in_warehouse'=>true,'reason'=>'Distinct physical return in transaction-only proof.']); + $m=['id'=>$v['movement_id'],'movement_type'=>'workshop_return_in']; + $fake=function($role)use($enter,$scope,$f){$c=$enter($role);$auth=(new ReflectionProperty($c,'authorize'))->getValue($c);$read=(new ReflectionProperty($c,'readAuthorize'))->getValue($c);return new PayableJournal(DB::connection(),$scope,$f['actors'][$role],'qa-stock-person-'.$f['actors'][$role],$auth,$read,fn()=>throw new DomainException('No supplier'),null,function($kind,$id)use($c){$source=$c->stock->source($kind,$id);$source['principal_minor']++;return$source;});}; + $p=$fake('prepare')->command('effect-prepare',$body($m),(string)Str::uuid());$fake('validate')->command('validate',['proposal_id'=>$p['proposal_id'],'revision'=>$p['revision'],'decision'=>'approved','reason'=>'Adversarial source mutation tests SQL independently of PHP.'],(string)Str::uuid());$count=DB::table('gl_journals')->count();$error=null; + try{DB::transaction(function()use($fake,$p){$fake('prepare')->command('post',['proposal_id'=>$p['proposal_id'],'revision'=>$p['revision'],'reason'=>'Forged extra cent must be refused by typed SQL source guard.'],(string)Str::uuid());DB::statement('SET CONSTRAINTS gl_stock_journal IMMEDIATE');});}catch(Illuminate\Database\QueryException $e){$error=$e;} + $ok($error&&($error->errorInfo[0]??null)==='23514'&&str_contains($error->getMessage(),'GL_STOCK_JOURNAL_SOURCE_OR_LINES')&&DB::table('gl_journals')->count()===$count,'SQL rejects amount forged independently of reviewed PHP source'); + $p=$command('prepare','effect-prepare',$body($m));DB::table('pa_access')->insert($scope+['user_id'=>$f['actors']['prepare'],'action'=>'general_ledger.validate','person'=>'qa-stock-person-'.$f['actors']['prepare']]);$refuse(fn()=>$command('prepare','validate',['proposal_id'=>$p['proposal_id'],'revision'=>$p['revision'],'decision'=>'approved','reason'=>'Both rights must not bypass distinct journal review.']),'same-person journal review refused with both actual rights'); +}); +file_put_contents($s['root'].'/extra.json',json_encode(['passed'=>true,'checks'=>$checks,'all_extra_physical_and_sql_changes_rolled_back'=>true,'existing_closed_book_preserved'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." additional isolation, identity and typed SQL checks passed.\n"; diff --git a/scripts/stock-ledger-http-proof.php b/scripts/stock-ledger-http-proof.php new file mode 100644 index 0000000..0af5e38 --- /dev/null +++ b/scripts/stock-ledger-http-proof.php @@ -0,0 +1,24 @@ +exists()||DB::table('gl_stock_rates')->exists())throw new LogicException('New HTTP fixture only');$before=$fingerprint(); +$socket=stream_socket_server('tcp://127.0.0.1:0');$port=(int)substr(strrchr(stream_socket_get_name($socket,false),':'),1);fclose($socket); +$server=new Symfony\Component\Process\Process([PHP_BINARY,'-S','127.0.0.1:'.$port,__DIR__.'/stock-ledger-http-router.php'],dirname(__DIR__),['STOCK_LEDGER_SETTINGS'=>$s['root'].'/settings.json'],null,90);$server->start(); +try{ +for($i=0;$i<80;$i++){if($sock=@fsockopen('127.0.0.1',$port,$e,$m,.1)){fclose($sock);break;}usleep(50000);} +$client=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:'.$port,'http_errors'=>false,'timeout'=>15]);$sessions=[]; +foreach(['prepare','validate','read']as$role){$jar=new GuzzleHttp\Cookie\CookieJar();$r=$client->get('/qa/stock-enter/'.$role,['cookies'=>$jar]);$ok($r->getStatusCode()===200,'native QA entry '.$role);$sessions[$role]=['jar'=>$jar]+json_decode((string)$r->getBody(),true,32,JSON_THROW_ON_ERROR);} +$call=function($role,$url,$body=null,$key=null,$overrides=[])use($client,&$sessions){$v=$sessions[$role];$headers=array_replace(['Accept'=>'application/json','X-CSRF-TOKEN'=>$v['csrf'],'X-Stock-Context'=>$v['context'],'Idempotency-Key'=>$key??(string)Str::uuid()],$overrides);$options=['cookies'=>$v['jar'],'headers'=>$headers];if($body!==null)$options['json']=$body;$r=$client->request($body===null?'GET':'POST',$url,$options);$text=(string)$r->getBody();return ['status'=>$r->getStatusCode(),'data'=>json_decode($text,true),'body'=>$text,'cache'=>$r->getHeaderLine('Cache-Control')];}; +$r=$call('prepare','/stock-valuation');$ok($r['status']===200&&str_contains($r['body'],'id="rate"')&&str_contains($r['body'],'Incompleto'),'open UI presents rate and incomplete amounts');file_put_contents($s['root'].'/http-open.html',$r['body']); +$ok($call('read','/api/stock-valuation?per_page=100')['data']['stock']['pagination']['total']===3,'API server page100 has three actual movements');$ok($call('read','/api/stock-valuation?unknown=1')['status']===422,'unknown read parameter refused');$ok($call('read','/api/stock-valuation',null,null,['X-Stock-Context'=>'stale'])['status']===409,'stale context refused'); +$d=['book_id'=>$f['book_id'],'version'=>0,'unit_minor'=>5000,'reason'=>'Explicit selected synthetic50 per UN through HTTP.'];$ok($call('prepare','/api/stock-valuation/rate-prepare',$d,null,['X-CSRF-TOKEN'=>''])['status']===419,'CSRF retained');$ok($call('read','/api/stock-valuation/rate-prepare',$d)['status']===403,'read profile cannot prepare rate');$key=(string)Str::uuid();$r=$call('prepare','/api/stock-valuation/rate-prepare',$d,$key);$ok($r['status']===200,'rate proposal through HTTP');$rate=$r['data'];$ok($call('prepare','/api/stock-valuation/rate-prepare',$d,$key)['data']['rate_id']===$rate['rate_id'],'rate exact retry same id'); +$receipt=$call('prepare','/api/stock-valuation/receipts/rate/'.$key);$ok($receipt['status']===200&&$receipt['data']['operation_executed']===false,'rate receipt recovery does not execute');$ok($call('read','/api/stock-valuation/receipts/rate/'.$key)['status']===404,'another actor cannot read rate receipt'); +$r=$call('validate','/api/stock-valuation/rate-validate',['rate_id'=>$rate['rate_id'],'version'=>1,'decision'=>'approved','reason'=>'Distinct actual HTTP rate review.']);$ok($r['status']===200,'rate approval through HTTP'); +foreach($f['movements']as$m){$r=$call('prepare','/api/stock-valuation/effect-prepare',$body($m));$ok($r['status']===200,'capture actual stock movement '.$m['id']);$p=$r['data'];$preview=$call('validate','/stock-valuation');$ok($preview['status']===200&&str_contains($preview['body'],$p['revision'])&&str_contains($preview['body'],'Fotografia completa'),'review UI shows exact impact revision and dependencies');file_put_contents($s['root'].'/http-review-'.$m['id'].'.html',$preview['body']);$r=$call('validate','/api/stock-valuation/validate',['proposal_id'=>$p['proposal_id'],'revision'=>$p['revision'],'decision'=>'approved','reason'=>'Distinct HTTP review of the actual two-line impact.']);$ok($r['status']===200,'independent HTTP journal review '.$m['id']);$d=['proposal_id'=>$p['proposal_id'],'revision'=>$p['revision'],'reason'=>'Apply only selected physical value through the common writer.'];$key=(string)Str::uuid();$r=$call('prepare','/api/stock-valuation/post',$d,$key);$ok($r['status']===200,'HTTP post selected stock movement '.$m['id']);$ok($call('prepare','/api/stock-valuation/post',$d,$key)['data']['journal_id']===$r['data']['journal_id'],'HTTP retry one journal '.$m['id']);} +$r=$call('prepare','/api/stock-valuation/receipts/ledger/'.$key);$ok($r['status']===200&&$r['data']['operation_executed']===false,'journal receipt recovery does not execute');$ok($call('read','/api/stock-valuation/receipts/ledger/'.$key)['status']===404,'another actor cannot read journal receipt'); +$r=$call('read','/stock-valuation/reports/trial-balance?from_on=2026-10-01&to_on=2026-10-31');$ok($r['status']===200&&str_contains($r['body'],'175,00'),'same common balancete rendered');$r=$call('read','/stock-valuation/reports/account-ledger?from_on=2026-10-01&to_on=2026-10-31&account_id='.$f['accounts']['QA-STOCK']);$ok($r['status']===200&&str_contains($r['body'],'75,00'),'same common stock account ledger rendered'); +$p=$call('prepare','/api/stock-valuation/period-prepare',['period_key'=>'QA-2026-10','reason'=>'Complete HTTP stock and journal period conference.']);$ok($p['status']===200,'prepare period through HTTP');$p=$p['data'];$ok($call('validate','/api/stock-valuation/period-validate',['check_id'=>$p['check_id'],'revision'=>$p['revision'],'decision'=>'approved','reason'=>'Distinct HTTP complete period review.'])['status']===200,'validate period through HTTP');$d=['check_id'=>$p['check_id'],'revision'=>$p['revision'],'reason'=>'Explicit HTTP confirmation of synthetic stock period close.'];$key=(string)Str::uuid();$r=$call('prepare','/api/stock-valuation/period-close',$d,$key);$ok($r['status']===200,'close period through HTTP');$ok($call('prepare','/api/stock-valuation/period-close',$d,$key)['data']['closure_id']===$r['data']['closure_id'],'HTTP close retry same receipt'); +$r=$call('prepare','/stock-valuation');$ok($r['status']===200&&!str_contains($r['body'],'class="command"')&&!str_contains($r['body'],'id="rate"'),'closed workspace has no mutation forms');file_put_contents($s['root'].'/http-closed.html',$r['body']); +$anonymous=$client->get('/api/stock-valuation',['headers'=>['Accept'=>'application/json']]);$ok($anonymous->getStatusCode()===401,'anonymous API refused');$ok(DB::table('gl_journals')->count()===3&&DB::table('gl_lines')->count()===6&&DB::table('gl_period_closures')->count()===1&&$fingerprint()===$before,'HTTP cycle exact totals preserves physical budget financial and grants'); +file_put_contents($s['root'].'/http-proof.json',json_encode(['passed'=>true,'checks'=>$checks,'actual_http'=>true,'journals'=>3,'lines'=>6,'closures'=>1,'physical_financial_rights_unchanged'=>true,'visual_review'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." actual HTTP stock cycle checks passed.\n"; +}finally{$server->stop(2);file_put_contents($s['root'].'/http-server.log',$server->getOutput()."\n".$server->getErrorOutput());} diff --git a/scripts/stock-ledger-http-router.php b/scripts/stock-ledger-http-router.php new file mode 100644 index 0000000..52eabe4 --- /dev/null +++ b/scripts/stock-ledger-http-router.php @@ -0,0 +1,2 @@ +instance('env','payable-testing'); +$actor=function(Request $r)use($s){abort_unless($r->user() instanceof App\Models\User&&$r->session()->get('stock_ledger_qa')===$s['tag'],403);return $r->user();}; +$context=function(Request $r){abort_unless(hash_equals((string)$r->session()->get('stock_ledger_context'),(string)$r->header('X-Stock-Context')),409,'O contexto da conferência mudou.');}; +$respond=function(callable $work){try{return response()->json($work())->header('Cache-Control','no-store');}catch(InvalidArgumentException $e){abort(422,$e->getMessage());}catch(DomainException $e){abort(409,$e->getMessage());}catch(Illuminate\Database\QueryException $e){if(($e->errorInfo[0]??null)==='55P03')return response()->json(['code'=>'stock_valuation_busy','message'=>'Conferência ocupada; volte a conferir antes de repetir.'],423)->header('Cache-Control','no-store');throw$e;}}; +$read=function(callable $work){return DB::transaction(function()use($work){if(DB::transactionLevel()===1)DB::statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY');return $work();});}; +Route::middleware('web')->get('/qa/stock',fn()=>response('Valorização QA

Stock → valorização → diário QA

Entrada2UN/100MZN, saída1UN/50, devolução0,5UN/25. Taxa50/UN e revisão distinta; nenhuma operação real.

Preparar · Rever · Consultar

')->header('Cache-Control','no-store')); +Route::middleware('web')->get('/qa/stock-enter/{role}',function(Request $r,string $role)use($f,$s){abort_unless(isset($f['actors'][$role]),404);auth()->login(App\Models\User::findOrFail($f['actors'][$role]));$r->session()->regenerate();$token=bin2hex(random_bytes(24));$r->session()->put('stock_ledger_qa',$s['tag']);$r->session()->put('stock_ledger_context',$token);if($r->query('open')==='1')return redirect('/stock-valuation');return response()->json(['csrf'=>csrf_token(),'context'=>$token])->header('Cache-Control','no-store');}); +Route::middleware(['web','auth'])->group(function()use($actor,$context,$respond,$read,$f){ + $view=function(Request $r)use($actor,$f){$u=$actor($r);$c=Tempo\Integration\Purchasing\StockValuationAdapter::for($u);$d=$r->validate(['book_id'=>'sometimes|integer|min:1','page'=>'sometimes|integer|min:1|max:100000','per_page'=>'sometimes|integer|in:25,100']);abort_if(array_diff(array_keys($r->query()),array_keys($d))!==[],422);$page=(int)($d['page']??1);$stock=$c->stock->page((int)($d['book_id']??$f['book_id']),$page,(int)($d['per_page']??25));$scope=$f['scope'];$can=DB::table('pa_access')->where($scope)->where('user_id',$u->id)->where('action','like','general_ledger.%')->pluck('action')->map(fn($v)=>substr($v,15))->all();return [['stock'=>$stock,'ledger'=>$c->engine()->listing(['page'=>$page]),'cycle'=>$c->engine()->cycleListing($page)],['host'=>'Livro físico nativo QA','csrf'=>csrf_token(),'context'=>$r->session()->get('stock_ledger_context'),'actor_id'=>$u->id,'can'=>$can,'return_url'=>'/qa/stock','stock_account_id'=>$f['accounts']['QA-STOCK']]];}; + Route::get('/stock-valuation',function(Request $r)use($read,$view){[$data,$settings]=$read(fn()=>$view($r));return response(StockWorkspace::render($data,$settings))->header('Cache-Control','no-store');}); + Route::get('/api/stock-valuation',function(Request $r)use($context,$respond,$read,$view){$context($r);return $respond(fn()=>$read(fn()=>$view($r)[0]));}); + Route::get('/api/stock-valuation/receipts/{domain}/{key}',function(Request $r,string $domain,string $key)use($actor,$context,$respond,$read){$context($r);abort_if($r->query()!==[]||!in_array($domain,['ledger','rate'],true),422);return $respond(fn()=>$read(function()use($r,$actor,$domain,$key){$c=Tempo\Integration\Purchasing\StockValuationAdapter::for($actor($r));$value=$domain==='rate'?$c->stock->receipt($key):$c->engine()->receipt($key);abort_unless($value!==null,404);return$value;}));}); + Route::post('/api/stock-valuation/{action}',function(Request $r,string $action)use($actor,$context,$respond){$context($r);abort_unless(in_array($action,['rate-prepare','rate-validate','effect-prepare','validate','post','period-prepare','period-validate','period-close'],true),422);return $respond(function()use($actor,$r,$action){$c=Tempo\Integration\Purchasing\StockValuationAdapter::for($actor($r));$key=(string)$r->header('Idempotency-Key');return str_starts_with($action,'rate-')?$c->stock->command($action,$r->all(),$key):$c->engine()->command($action,$r->all(),$key);});}); + $report=function(Request $r,string $kind)use($actor,$read){abort_unless(in_array($kind,['trial-balance','account-ledger'],true),404);$d=$r->validate(['from_on'=>'required|date_format:Y-m-d','to_on'=>'required|date_format:Y-m-d','account_id'=>'sometimes|integer|min:1','page'=>'sometimes|integer|min:1|max:100000','per_page'=>'sometimes|integer|in:25,100']);abort_if(array_diff(array_keys($r->query()),array_keys($d))!==[],422);$data=$read(function()use($actor,$r,$kind,$d){$engine=Tempo\Integration\Purchasing\StockValuationAdapter::for($actor($r))->engine();return $kind==='trial-balance'?$engine->trialBalance($d):$engine->accountLedger($d);});return response(ReportsWorkspace::render($data,['host'=>'Stock valorizado QA','return_url'=>'/stock-valuation']))->header('Cache-Control','no-store');}; + Route::get('/stock-valuation/reports/{kind}',$report);Route::get('/general-ledger/{kind}',$report)->whereIn('kind',['trial-balance','account-ledger']); +}); +$app->handleRequest(Request::capture());exit; diff --git a/scripts/stock-ledger-menu-final.mjs b/scripts/stock-ledger-menu-final.mjs new file mode 100644 index 0000000..819bb86 --- /dev/null +++ b/scripts/stock-ledger-menu-final.mjs @@ -0,0 +1,3 @@ +import fs from 'node:fs';import path from 'node:path';import assert from 'node:assert/strict';import React from 'react';import {renderToStaticMarkup} from 'react-dom/server';import {createServer} from 'vite'; +const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),out='docs/proofs/stock-ledger-menu-final-20261103.json';if(fs.existsSync(out))throw Error('Completed proof preserved');const server=await createServer({configFile:false,cacheDir:path.join(run.root,'private/stock-menu-final-vite-cache'),optimizeDeps:{noDiscovery:true,include:[]},server:{middlewareMode:true},appType:'custom'});let checks=0; +try{const {default:Menu}=await server.ssrLoadModule('/resources/js/AccountingMenuWorkspace.jsx');const render=(flag,stock=true,gl=true)=>renderToStaticMarkup(React.createElement(Menu,{section:'accounting_panel',context:{token:'qa',company:{name:'QA'},unit:{id:2,name:'QA'},accounting:{stock_valuation_read:flag}},can:(p,u)=>p==='company.view'||(u===2&&((p==='stock.view'&&stock)||(p==='general_ledger.view'&&gl))),navigate(){}}));const check=(v,n)=>{assert(v,n);checks++;};check(render(true).includes('href="/general-ledger/stock-valuation"'),'configured observer entry visible');check(!render(true).includes('href="/general-ledger"'),'observer composition does not advertise unavailable local writer');check(render(false).includes('href="/general-ledger"'),'prior local writer entry preserved outside observer composition');check(!render(true,false).includes('href="/general-ledger/stock-valuation"'),'stock right required');check(!render(true,true,false).includes('href="/general-ledger/stock-valuation"'),'ledger right required');fs.writeFileSync(out,JSON.stringify({passed:true,checks,react_static_render:true,actual_browser:false,existing_other_composition_route_preserved:true},null,2));console.log(JSON.stringify({passed:true,checks}));}finally{await server.close();} diff --git a/scripts/stock-ledger-observer-entry.php b/scripts/stock-ledger-observer-entry.php new file mode 100644 index 0000000..4c5e6dd --- /dev/null +++ b/scripts/stock-ledger-observer-entry.php @@ -0,0 +1,17 @@ +'budget-testing','APP_DEBUG'=>'false','APP_KEY'=>$s['app_key'],'DB_CONNECTION'=>'pgsql','DB_HOST'=>'127.0.0.1','DB_PORT'=>'55439','DB_DATABASE'=>$s['database'],'DB_USERNAME'=>$s['role'],'DB_PASSWORD'=>$s['password'],'DB_URL'=>'','SESSION_DRIVER'=>'file','SESSION_COOKIE'=>'stock_observer_'.$s['tag'],'CACHE_STORE'=>'array','QUEUE_CONNECTION'=>'sync','BCRYPT_ROUNDS'=>'4','APP_CONFIG_CACHE'=>$s['storage'].'/cache/config.php','APP_ROUTES_CACHE'=>$s['storage'].'/cache/routes.php','APP_SERVICES_CACHE'=>$s['storage'].'/cache/services.php','APP_PACKAGES_CACHE'=>$s['storage'].'/cache/packages.php','VIEW_COMPILED_PATH'=>$s['storage'].'/framework/views','SGF_ISOLATED_REGRESSION_RUN'=>$s['run']];foreach($env as$k=>$v){putenv($k.'='.$v);$_ENV[$k]=$_SERVER[$k]=$v;} +require dirname(__DIR__).'/vendor/autoload.php';$app=require dirname(__DIR__).'/bootstrap/app.php';$app->useStoragePath($s['storage']);$app->addAbsoluteCachePathPrefix('C:');$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();if(isset($s['public'])){$app->usePublicPath($s['public']);app(Illuminate\Foundation\Vite::class)->useHotFile($s['storage'].'/no-hot');} +try{ +if($phase==='setup'){ + if(Illuminate\Support\Facades\DB::getSchemaBuilder()->hasTable('users'))throw new LogicException('Fresh observer base required');require dirname(__DIR__).'/packages/budget-control/tests/sgf-schema.php';require dirname(__DIR__).'/packages/budget-control/tests/host-support.php';$f=budgetQaFixture('sgf'); + // Remove only fixture-created budget grants before narrowing the check. + Illuminate\Support\Facades\DB::table('permission_grants')->where('permission','like','purchasing_budget.%')->delete(); + Illuminate\Support\Facades\DB::statement('ALTER TABLE permission_grants DROP CONSTRAINT permission_grants_scope_check');Illuminate\Support\Facades\DB::statement("ALTER TABLE permission_grants ADD CONSTRAINT permission_grants_scope_check CHECK ((unit_id IS NULL AND permission='company.view') OR (unit_id IS NOT NULL AND permission IN('unit.view','general_ledger.view','stock.view'))) "); + foreach([$f['actor']=>['general_ledger.view','stock.view'],$f['validator']=>['general_ledger.view']]as$id=>$rights)foreach($rights as$p)Illuminate\Support\Facades\DB::table('permission_grants')->insert($f['scope']+['user_id'=>$id,'permission'=>$p,'created_at'=>now(),'updated_at'=>now()]); + $native=json_decode(file_get_contents($s['native_root'].'/fixture.json'),true,32,JSON_THROW_ON_ERROR);$f['native_scope']=$native['scope'];$f['book_id']=$native['book_id'];file_put_contents($s['root'].'/fixture.json',json_encode($f,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));file_put_contents($s['root'].'/setup.json',json_encode(['passed'=>true,'new_sgf_identity_fixture'=>true,'no_sgf_physical_or_ledger_book'=>true,'native_scope_explicit'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));exit; +} +$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true,32,JSON_THROW_ON_ERROR);$key=$f['tenant'].':'.$f['company'].':'.$f['unit'];config(['database.connections.stock_valuation_source'=>$s['source'],'stock_ledger.read_sources.'.$key=>['connection'=>'stock_valuation_source','native_scope'=>$f['native_scope'],'book_id'=>$f['book_id']],'modules.companies.'.$f['tenant'].':'.$f['company']=>['contracted'=>['stock','accounting'],'enabled'=>['stock','accounting']]]); +if($phase==='http')require __DIR__.'/stock-ledger-observer-http.php';elseif($phase==='proof')require __DIR__.'/stock-ledger-observer-proof.php';elseif($phase==='proof-final')require __DIR__.'/stock-ledger-observer-final.php';else throw new LogicException('Unknown observer phase'); +}catch(Throwable $e){file_put_contents($s['root'].'/failure-'.time().'.json',json_encode(['class'=>get_class($e),'message'=>$e->getMessage(),'file'=>$e->getFile(),'line'=>$e->getLine()],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));fwrite(STDERR,get_class($e).': '.$e->getMessage()."\n");exit(1);} diff --git a/scripts/stock-ledger-observer-final.php b/scripts/stock-ledger-observer-final.php new file mode 100644 index 0000000..dd19f66 --- /dev/null +++ b/scripts/stock-ledger-observer-final.php @@ -0,0 +1,11 @@ +array_replace($s['source'],['username'=>$native['role'],'password'=>$native['password']])]);$writer=DB::connection('qa_native_writer');$book=$writer->table('gl_stock_books')->where('id',$f['book_id'])->first();$item=(array)$writer->table('stock_items')->where('id',$book->stock_item_id)->first();$checks=[];$ok=function($v,$name)use(&$checks){if(!$v)throw new RuntimeException($name);$checks[]=$name;}; +$hash=function()use($writer){$h=hash_init('sha256');foreach(['stock_items','warehouses','stock_movements','gl_journals','gl_lines','gl_stock_rates','gl_stock_rate_reviews']as$t){hash_update($h,$t);foreach($writer->table($t)->orderBy('id')->cursor()as$r)hash_update($h,json_encode($r,JSON_THROW_ON_ERROR));}return hash_final($h);};$before=$hash(); +$socket=stream_socket_server('tcp://127.0.0.1:0');$port=(int)substr(strrchr(stream_socket_get_name($socket,false),':'),1);fclose($socket);$server=new Symfony\Component\Process\Process([PHP_BINARY,'-S','127.0.0.1:'.$port,__DIR__.'/stock-ledger-observer-router.php'],dirname(__DIR__),['STOCK_OBSERVER_SETTINGS'=>$s['root'].'/settings.json'],null,45);$server->start(); +try{for($i=0;$i<80;$i++){if($sock=@fsockopen('127.0.0.1',$port,$e,$m,.1)){fclose($sock);break;}usleep(50000);}$jar=new GuzzleHttp\Cookie\CookieJar();$client=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:'.$port,'cookies'=>$jar,'http_errors'=>false,'timeout'=>15]);$entry=json_decode((string)$client->get('/qa/stock-observer/reader')->getBody(),true,32,JSON_THROW_ON_ERROR);$r=$client->get('/api/stock-valuation-read',['headers'=>['X-SGF-Context'=>$entry['context'],'Accept'=>'application/json']]);$data=json_decode((string)$r->getBody(),true,64,JSON_THROW_ON_ERROR);$ok($r->getStatusCode()===200&&$data['reconciliation_scope']==='physical_movement_coverage_and_rate_ids_only'&&$data['current_source_dependencies_validated']===false,'observer qualifies its reconciliation scope'); +try{$writer->table('stock_items')->where('id',$item['id'])->update(['unit'=>'KG']);$r=$client->get('/api/stock-valuation-read',['headers'=>['X-SGF-Context'=>$entry['context'],'Accept'=>'application/json']]);$ok($r->getStatusCode()===503,'changed native unit refused before presenting stock value');}finally{$writer->table('stock_items')->where('id',$item['id'])->update(['unit'=>$item['unit']]);} +$r=$client->get('/general-ledger/stock-valuation');$ok($r->getStatusCode()===200&&str_contains((string)$r->getBody(),'restantes dependências'),'restored unit recovers and HTML states source conference limitation');$ok($before===$hash(),'all native metadata movements rates and journals exactly restored'); +file_put_contents($s['root'].'/proof-final.json',json_encode(['passed'=>true,'checks'=>$checks,'synthetic_metadata_probe_restored'=>true,'actual_http'=>true,'not_full_source_revalidation'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." observer final metadata/qualification checks passed.\n"; +}finally{$server->stop(2);file_put_contents($s['root'].'/http-final.log',$server->getOutput()."\n".$server->getErrorOutput());} diff --git a/scripts/stock-ledger-observer-http.php b/scripts/stock-ledger-observer-http.php new file mode 100644 index 0000000..1f13dac --- /dev/null +++ b/scripts/stock-ledger-observer-http.php @@ -0,0 +1,8 @@ +get('/qa/stock-observer/{role}',function(Request $r,string $role)use($f){abort_unless(in_array($role,['reader','limited','foreign-unit','foreign-company'],true),404);$id=$role==='limited'?$f['validator']:$f['actor'];$u=App\Models\User::findOrFail($id);auth()->login($u);$r->session()->put('auth_version',$u->auth_version);$token=bin2hex(random_bytes(24));$selection=$f['scope']+['token'=>$token,'module_id'=>$r->query('module','accounting')];if($role==='foreign-unit')$selection['unit_id']=1;if($role==='foreign-company')$selection['company_id']=1;$r->session()->put('company_context',$selection);if($r->query('open')==='1')return redirect('/general-ledger/stock-valuation');return response()->json(['csrf'=>csrf_token(),'context'=>$token]);}); +if(($_SERVER['HTTP_X_QA_SOURCE']??'')==='missing')config(['stock_ledger.read_sources'=>[]]); +if(($_SERVER['HTTP_X_QA_SOURCE']??'')==='wrong-scope')config(['stock_ledger.read_sources.'.$key.'.native_scope'=>['tenant_id'=>999999,'company_id'=>0,'unit_id'=>0]]); +if(($_SERVER['HTTP_X_QA_SOURCE']??'')==='wrong-role')config(['database.connections.stock_valuation_source.username'=>'unapproved_role']); +$app->handleRequest(Request::capture());exit; diff --git a/scripts/stock-ledger-observer-proof.php b/scripts/stock-ledger-observer-proof.php new file mode 100644 index 0000000..922d7fb --- /dev/null +++ b/scripts/stock-ledger-observer-proof.php @@ -0,0 +1,20 @@ +table($t)->orderBy('id')->cursor()as$r)hash_update($h,json_encode($r,JSON_THROW_ON_ERROR));}return hash_final($h);};$before=$fingerprint();$grants=DB::table('permission_grants')->orderBy('id')->get()->toJson(); +$socket=stream_socket_server('tcp://127.0.0.1:0');$port=(int)substr(strrchr(stream_socket_get_name($socket,false),':'),1);fclose($socket);$server=new Symfony\Component\Process\Process([PHP_BINARY,'-S','127.0.0.1:'.$port,__DIR__.'/stock-ledger-observer-router.php'],dirname(__DIR__),['STOCK_OBSERVER_SETTINGS'=>$s['root'].'/settings.json'],null,60);$server->start(); +try{for($i=0;$i<80;$i++){if($sock=@fsockopen('127.0.0.1',$port,$e,$m,.1)){fclose($sock);break;}usleep(50000);} +$client=new GuzzleHttp\Client(['base_uri'=>'http://127.0.0.1:'.$port,'http_errors'=>false,'timeout'=>15]);$sessions=[];foreach(['reader','limited','foreign-unit','foreign-company']as$role){$jar=new GuzzleHttp\Cookie\CookieJar();$r=$client->get('/qa/stock-observer/'.$role,['cookies'=>$jar]);$ok($r->getStatusCode()===200,'SGF QA session '.$role);$sessions[$role]=['jar'=>$jar]+json_decode((string)$r->getBody(),true,32,JSON_THROW_ON_ERROR);} +$call=function($role,$url,$extra=[])use($client,&$sessions){$v=$sessions[$role];$r=$client->get($url,['cookies'=>$v['jar'],'headers'=>array_replace(['Accept'=>'application/json','X-SGF-Context'=>$v['context']],$extra)]);$text=(string)$r->getBody();return ['status'=>$r->getStatusCode(),'data'=>json_decode($text,true),'body'=>$text,'cache'=>$r->getHeaderLine('Cache-Control')];}; +$r=$call('reader','/api/stock-valuation-read?per_page=100');$ok($r['status']===200,'SGF reads canonical source with explicit dual rights');$d=$r['data'];$ok($d['physical_quantity_milli']===1500&&$d['posted_stock_value_minor']===7500&&$d['pagination']['total']===3&&$d['status']==='reconciled','SGF sees actual1.5UN and posted75 from same native book');$ok($d['operation_executed']===false&&$d['source_identity']['role']===$s['source']['username']&&count($d['lines'])===6,'read-only canonical source identity and six lines');$ok(str_contains($r['cache'],'no-store'),'SGF response no-store'); +$ok($call('reader','/api/stock-valuation-read?page=2')['data']['journals']===[],'SGF server pagination boundary');$ok($call('reader','/api/stock-valuation-read?per_page=26')['status']===422,'SGF invalid page size refused');$ok($call('reader','/api/stock-valuation-read?tenant_id=999')['status']===422,'SGF protected scope parameter refused');$ok($call('reader','/api/stock-valuation-read', ['X-SGF-Context'=>'stale'])['status']===409,'SGF stale tab refused'); +$ok($call('limited','/api/stock-valuation-read')['status']===403,'general ledger view alone cannot read stock evidence');$ok($call('foreign-unit','/api/stock-valuation-read')['status']===403,'foreign SGF unit refused');$ok($call('foreign-company','/api/stock-valuation-read')['status']===403,'foreign SGF company refused'); +$ok($call('reader','/api/stock-valuation-read',['X-QA-Source'=>'missing'])['status']===503,'missing binding is unavailable not zero');$ok($call('reader','/api/stock-valuation-read',['X-QA-Source'=>'wrong-scope'])['status']===503,'native scope mismatch refused');$ok($call('reader','/api/stock-valuation-read',['X-QA-Source'=>'wrong-role'])['status']===403,'unapproved native role refused'); +$r=$call('reader','/general-ledger/stock-valuation');$ok($r['status']===200&&str_contains($r['body'],'75,00')&&str_contains($r['body'],'1500')&&!str_contains($r['body'],'where($f['scope'])->where(['user_id'=>$f['actor'],'permission'=>'stock.view'])->first();DB::table('permission_grants')->where('id',$grant['id'])->delete();try{$ok($call('reader','/api/stock-valuation-read')['status']===403,'revoked stock view refused on next request');}finally{DB::table('permission_grants')->insert($grant);} +$error=null;try{$source->delete('DELETE FROM gl_journals WHERE false');}catch(Illuminate\Database\QueryException $e){$error=$e;}$ok($error&&in_array($error->errorInfo[0]??null,['25006','42501'],true),'source SQL role cannot write'); +$ok($before===$fingerprint()&&DB::table('permission_grants')->orderBy('id')->get()->toJson()===$grants&&!DB::getSchemaBuilder()->hasTable('gl_journals')&&!DB::getSchemaBuilder()->hasTable('stock_movements'),'source and SGF grants unchanged; no copied physical or ledger book'); +file_put_contents($s['root'].'/proof.json',json_encode(['passed'=>true,'checks'=>$checks,'actual_sgf_http'=>true,'physical_quantity_milli'=>1500,'posted_stock_minor'=>7500,'source_journals'=>3,'source_lines'=>6,'source_and_grants_unchanged'=>true,'select_only_source'=>true,'no_local_book_copy'=>true,'visual_review'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." SGF canonical stock valuation observer checks passed.\n"; +}finally{$server->stop(2);file_put_contents($s['root'].'/http.log',$server->getOutput()."\n".$server->getErrorOutput());} diff --git a/scripts/stock-ledger-observer-router.php b/scripts/stock-ledger-observer-router.php new file mode 100644 index 0000000..4db5524 --- /dev/null +++ b/scripts/stock-ledger-observer-router.php @@ -0,0 +1,3 @@ +{const r=spawnSync('C:/Program Files/PostgreSQL/17/bin/psql.exe',['-h','127.0.0.1','-p','55439','-U','sgf_regression_owner','-d',db,'-Atq','-v','ON_ERROR_STOP=1'],{input,encoding:'utf8',windowsHide:true,env:{...process.env,PGPASSWORD:admin}});if(r.status!==0)throw Error('Observer QA provisioning failed; preserve state');return r.stdout.trim();};if(pg("SELECT current_setting('cluster_name')")!==n.cluster)throw Error('Wrong physical cluster'); +pg(`CREATE ROLE ${role} LOGIN PASSWORD '${password}' NOSUPERUSER NOCREATEDB NOCREATEROLE NOREPLICATION NOBYPASSRLS; CREATE DATABASE ${database} OWNER ${role}; REVOKE ALL ON DATABASE ${database} FROM PUBLIC; +CREATE ROLE ${reader} LOGIN PASSWORD '${readPassword}' NOSUPERUSER NOCREATEDB NOCREATEROLE NOREPLICATION NOBYPASSRLS; ALTER ROLE ${reader} SET default_transaction_read_only=on; GRANT CONNECT ON DATABASE ${n.database} TO ${reader};`); +pg(`GRANT USAGE ON SCHEMA public TO ${reader}; GRANT SELECT ON stock_movements,stock_items,warehouses,gl_stock_books,gl_stock_rates,gl_stock_rate_reviews,gl_journals,gl_lines,gl_accounts TO ${reader};`,n.database); +const storage=path.join(root,'storage');for(const d of ['framework/cache/data','framework/sessions','framework/views','logs','cache'])fs.mkdirSync(path.join(storage,d),{recursive:true}); +const connection={driver:'pgsql',host:'127.0.0.1',port:55439,database:n.database,username:reader,password:readPassword,charset:'utf8',prefix:'',search_path:'public',sslmode:'prefer',url:null}; +fs.writeFileSync(path.join(root,'settings.json'),JSON.stringify({tag,root,database,role,password,storage,run:state.id,cluster:n.cluster,app_key:'base64:'+crypto.randomBytes(32).toString('base64'),source:connection,native_root:n.root},null,2)); +for(const phase of process.argv[3]==='prepare-only'?['setup']:['setup','proof']){const r=spawnSync('C:/laragon/tools/sgf-tempo/php-8.4.27/php.exe',[path.resolve('scripts/stock-ledger-observer-entry.php'),path.join(root,'settings.json'),phase],{encoding:'utf8',windowsHide:true,timeout:60000,maxBuffer:1024*1024});fs.writeFileSync(path.join(root,phase+'.log'),r.stdout+'\n'+r.stderr);console.log(JSON.stringify({tag,phase,exit_code:r.status,proof_present:fs.existsSync(path.join(root,phase+'.json'))}));if(r.status!==0||!fs.existsSync(path.join(root,phase+'.json'))){process.exitCode=1;break;}} diff --git a/scripts/stock-ledger-order-guard.php b/scripts/stock-ledger-order-guard.php new file mode 100644 index 0000000..f87625e --- /dev/null +++ b/scripts/stock-ledger-order-guard.php @@ -0,0 +1,11 @@ +stock->source('stock.receipt',$f['movements'][0]['id']);$m=$f['movements'][1];$source=array_replace($source,['effect_type'=>'stock.issue','source_id'=>$m['id'],'obligation_id'=>$m['id'],'stock_movement_id'=>$m['id'],'stock_quantity_milli'=>-1000,'principal_minor'=>5000]); + $fake=function($role)use($enter,$f,$scope,$source){$c=$enter($role);return new PayableJournal(DB::connection(),$scope,$f['actors'][$role],'qa-stock-person-'.$f['actors'][$role],(new ReflectionProperty($c,'authorize'))->getValue($c),(new ReflectionProperty($c,'readAuthorize'))->getValue($c),fn()=>throw new DomainException('No supplier'),null,fn()=>$source);}; + $p=$fake('prepare')->command('effect-prepare',['effect_type'=>'stock.issue','source_id'=>$m['id'],'journal_on'=>'2026-10-29','period_key'=>'QA-2026-10','rule_key'=>'stock.issue','reason'=>'Independent SQL order guard probe, no prior receipt journal.'],(string)Str::uuid());$fake('validate')->command('validate',['proposal_id'=>$p['proposal_id'],'revision'=>$p['revision'],'decision'=>'approved','reason'=>'Adversarial supplied PHP source cannot bypass SQL dependencies.'],(string)Str::uuid());$error=null; + try{DB::transaction(function()use($fake,$p){$fake('prepare')->command('post',['proposal_id'=>$p['proposal_id'],'revision'=>$p['revision'],'reason'=>'Correct amount but absent predecessor must be refused by SQL.'],(string)Str::uuid());DB::statement('SET CONSTRAINTS gl_stock_journal IMMEDIATE');});}catch(Illuminate\Database\QueryException $e){$error=$e;} + $ok($error&&($error->errorInfo[0]??null)==='23514'&&str_contains($error->getMessage(),'GL_STOCK_JOURNAL_SOURCE_OR_LINES'),'SQL independently refuses issue before receipt valuation');$ok(DB::table('gl_journals')->count()===0&&DB::table('gl_lines')->count()===0,'failed order guard leaves no partial journal'); +});file_put_contents($s['root'].'/order-guard.json',json_encode(['passed'=>true,'checks'=>$checks,'all_changes_rolled_back'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." independent SQL predecessor checks passed.\n"; diff --git a/scripts/stock-ledger-proof.php b/scripts/stock-ledger-proof.php new file mode 100644 index 0000000..f75c315 --- /dev/null +++ b/scripts/stock-ledger-proof.php @@ -0,0 +1,48 @@ +true,'stock_returns.enabled'=>true]); +$f=json_decode(file_get_contents($s['root'].'/fixture.json'),true,64,JSON_THROW_ON_ERROR);$scope=$f['scope']; +$enter=function(string $role)use($f){$u=User::findOrFail($f['actors'][$role]);auth()->setUser($u);return StockValuationAdapter::for($u);}; +$command=fn($role,$action,$body,$key=null,$fault=null)=>$enter($role)->engine($fault)->command($action,$body,$key??(string)Str::uuid()); +$rate=function()use($enter,$f){$r=$enter('prepare')->stock->command('rate-prepare',['book_id'=>$f['book_id'],'version'=>0,'unit_minor'=>5000,'reason'=>'Synthetic50MZN per UN, no real valuation policy.'],(string)Str::uuid());$enter('validate')->stock->command('rate-validate',['rate_id'=>$r['rate_id'],'version'=>$r['version'],'decision'=>'approved','reason'=>'Distinct review of selected synthetic50MZN/UN.'],(string)Str::uuid());return $r;}; +$body=fn($m)=>['effect_type'=>StockValuation::TYPES[$m['movement_type']],'source_id'=>$m['id'],'journal_on'=>'2026-10-29','period_key'=>'QA-2026-10','rule_key'=>StockValuation::TYPES[$m['movement_type']],'reason'=>'Explicit individual selected physical movement valuation.']; +$post=function($m)use($command,$body){$p=$command('prepare','effect-prepare',$body($m));$command('validate','validate',['proposal_id'=>$p['proposal_id'],'revision'=>$p['revision'],'decision'=>'approved','reason'=>'Distinct exact physical origin/rate/two-line impact review.']);$d=['proposal_id'=>$p['proposal_id'],'revision'=>$p['revision'],'reason'=>'Apply reviewed stock valuation once without moving quantities.'];return [$command('prepare','post',$d),$d,$p];}; +$fingerprint=function(){ $h=hash_init('sha256');foreach(['stock_movements','stock_operations','goods_receipts','goods_receipt_items','warehouse_request_events','supply_records','pa_access','pa_obligations','pa_commands','budget_entries','budget_consumptions']as$t){hash_update($h,$t);foreach(DB::table($t)->orderBy('id')->cursor()as$r)hash_update($h,Tempo\Finance\Payables\Payables::canonical((array)$r));}return hash_final($h);}; +$checks=[];$ok=function(bool $v,string $name)use(&$checks){if(!$v)throw new RuntimeException($name);$checks[]=$name;}; +$refuse=function(callable $fn,string $name)use($ok){try{$fn();}catch(DomainException|InvalidArgumentException|Symfony\Component\HttpKernel\Exception\HttpExceptionInterface $e){$ok(true,$name);return;}throw new RuntimeException('Expected refusal: '.$name);}; +$case=function(callable $fn)use($fingerprint,$ok){$before=$fingerprint();$level=DB::transactionLevel();DB::beginTransaction();try{$fn();}finally{while(DB::transactionLevel()>$level)DB::rollBack();}$ok($fingerprint()===$before,'case rollback preserves physical/financial/rights fingerprint');}; +if($phase==='contract'){ + $out=$s['root'].'/contract.json';if(file_exists($out))throw new LogicException('Completed contract proof preserved');$sql=[];foreach(['gl_assert_balanced','gl_stock_journal_assert','gl_stock_scope']as$name)$sql[$name]=DB::selectOne('SELECT pg_get_functiondef(?::regprocedure) definition',[$name.'('.($name==='gl_assert_balanced'?'bigint':'').')'])->definition;if(!str_contains($sql['gl_stock_journal_assert'],'pm.idindexdef;file_put_contents($out,json_encode(['passed'=>true,'sql_contract_sha256'=>hash('sha256',Tempo\Finance\Payables\Payables::canonical($sql)),'predecessor_required'=>true,'source_class_sha256'=>hash_file('sha256',(new ReflectionClass(StockValuation::class))->getFileName()),'read_only_checks'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));exit; +} +if(in_array($phase,['demo-baseline','demo-preservation'],true)){ + $out=$s['root'].'/'.$phase.'.json';if(file_exists($out))throw new LogicException('Completed demo proof preserved');$current=['physical_financial_rights_hash'=>$fingerprint(),'stock_mapping_hash'=>hash('sha256',DB::table('gl_stock_books')->orderBy('id')->get()->toJson()),'rates'=>DB::table('gl_stock_rates')->count(),'journals'=>DB::table('gl_journals')->count(),'closures'=>DB::table('gl_period_closures')->count()];if($current['rates']!==0||$current['journals']!==0||$current['closures']!==0)throw new LogicException('New demo must keep individual decisions pending; no reset');if($phase==='demo-preservation'&&$current!==json_decode(file_get_contents($s['root'].'/demo-baseline.json'),true)['state'])throw new LogicException('Demo changed; no reset');file_put_contents($out,json_encode(['passed'=>true,'state'=>$current,'no_reset'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));exit; +} +if($phase==='cases'){ + if(file_exists($s['root'].'/cases.json'))throw new LogicException('Completed proof preserved'); + $case(function()use($enter,$body,$f,$refuse,$ok,$command){$page=$enter('read')->stock->page($f['book_id']);$ok(count($page['rows'])===3&&count(array_filter($page['rows'],fn($r)=>$r['source']===null))===3,'missing rate visible; no invented values');$refuse(fn()=>$command('prepare','effect-prepare',$body($f['movements'][0])),'missing rate cannot capture');$refuse(fn()=>$command('prepare','period-prepare',['period_key'=>'QA-2026-10','reason'=>'No rate must block the period conference.']),'unvalued movements block close conference');}); + $case(function()use($enter,$f,$refuse,$ok){$d=['book_id'=>$f['book_id'],'version'=>0,'unit_minor'=>5000,'reason'=>'Synthetic rate prepared for distinct review.'];$k=(string)Str::uuid();$a=$enter('prepare')->stock->command('rate-prepare',$d,$k);$r=$enter('prepare')->stock->command('rate-prepare',$d,$k);$ok($r['replayed']&&$r['rate_id']===$a['rate_id'],'rate replay no duplication');$refuse(fn()=>$enter('prepare')->stock->command('rate-prepare',array_replace($d,['unit_minor'=>5100]),$k),'changed rate replay refused');$v=['rate_id'=>$a['rate_id'],'version'=>1,'decision'=>'approved','reason'=>'Distinct review is obligatory for rate.'];$refuse(fn()=>$enter('prepare')->stock->command('rate-validate',$v,(string)Str::uuid()),'rate self review refused');$key=(string)Str::uuid();$enter('validate')->stock->command('rate-validate',$v,$key);$ok($enter('validate')->stock->command('rate-validate',$v,$key)['replayed'],'rate review replay unique');$refuse(fn()=>$enter('read')->stock->command('rate-prepare',$d,(string)Str::uuid()),'read actor cannot prepare rate');}); + $case(function()use($rate,$enter,$f,$ok,$refuse,$body,$command,$post){$rate();$refuse(fn()=>$command('prepare','effect-prepare',$body($f['movements'][1])),'issue cannot precede valued receipt');$refuse(fn()=>$command('prepare','effect-prepare',$body($f['movements'][2])),'return cannot precede valued issue');$amounts=[];foreach($f['movements']as$m){$amounts[]=$enter('read')->stock->source(StockValuation::TYPES[$m['movement_type']],$m['id'])['principal_minor'];$post($m);}$ok($amounts===[10000,5000,2500],'actual2/-1/+0.5 at50 gives100/50/25');$ok($enter('read')->stock->page($f['book_id'],2)['rows']===[],'server pagination boundary');$refuse(fn()=>$enter('read')->stock->page($f['book_id'],1,26),'unsupported page size refused');$refuse(fn()=>$enter('read')->stock->source('stock.issue',$f['movements'][0]['id']),'wrong physical effect type refused');$refuse(fn()=>$command('prepare','effect-prepare',array_replace($body($f['movements'][0]),['journal_on'=>'2026-10-28'])),'journal date must match physical date');$s2=$f['scope'];$s2['unit_id']=99;$u=User::findOrFail($f['actors']['read']);auth()->setUser($u);$provider=new StockValuation(DB::connection(),$s2,$u->id,'qa',fn()=>null,fn()=>null);$refuse(fn()=>$provider->source('stock.receipt',$f['movements'][0]['id']),'other unit cannot read mapped movement');}); + $case(function()use($rate,$enter,$f,$body,$command,$refuse,$ok){$rate();$p=$command('prepare','effect-prepare',$body($f['movements'][0]));$r=$enter('prepare')->stock->command('rate-prepare',['book_id'=>$f['book_id'],'version'=>1,'unit_minor'=>5000,'reason'=>'New explicit same-value rate version for stale review proof.'],(string)Str::uuid());$enter('validate')->stock->command('rate-validate',['rate_id'=>$r['rate_id'],'version'=>2,'decision'=>'approved','reason'=>'Distinct same-value successor review for stale version proof.'],(string)Str::uuid());$refuse(fn()=>$command('validate','validate',['proposal_id'=>$p['proposal_id'],'revision'=>$p['revision'],'decision'=>'approved','reason'=>'Old source capture must be refused.']),'same-value rate successor invalidates old capture');$p2=$command('prepare','effect-prepare',$body($f['movements'][0]));$ok($p2['revision']!==$p['revision'],'new capture after rate version change');}); + $case(function()use($rate,$f,$body,$command,$refuse,$ok){$rate();$p=$command('prepare','effect-prepare',$body($f['movements'][0]));$command('validate','validate',['proposal_id'=>$p['proposal_id'],'revision'=>$p['revision'],'decision'=>'approved','reason'=>'Independent review before rollback injection.']);$d=['proposal_id'=>$p['proposal_id'],'revision'=>$p['revision'],'reason'=>'Test fault recovery of original reviewed stock value.'];$key=(string)Str::uuid();try{$command('prepare','post',$d,$key,fn($at)=>$at==='after_header'?throw new RuntimeException('QA-STOCK-FAULT'):null);throw new RuntimeException('Fault missing');}catch(RuntimeException $e){if($e->getMessage()!=='QA-STOCK-FAULT')throw$e;}$ok(DB::table('gl_journals')->count()===0&&DB::table('gl_lines')->count()===0&&!DB::table('gl_commands')->where('command_key',$key)->exists(),'fault rolls back header lines and receipt');$j=$command('prepare','post',$d,$key);$ok($command('prepare','post',$d,$key)['journal_id']===$j['journal_id']&&$command('prepare','post',$d)['journal_id']===$j['journal_id'],'exact and other-key retry one journal');$refuse(fn()=>$command('prepare','correct-prepare',['journal_id'=>$j['journal_id'],'journal_on'=>'2026-10-29','period_key'=>'QA-2026-10','reason'=>'Stock correction remains explicitly excluded.']),'stock correction excluded');}); + $case(function()use($rate,$enter,$f,$body,$command,$refuse){$rate();$p=$command('prepare','effect-prepare',$body($f['movements'][0]));$r=App\Models\SupplyRecord::findOrFail($f['return_proposal']);$d=$r->data;$d['operation_key']=(string)Str::uuid();$d['quantity_milli']=250;$d['reason']='Explicit additional unused quarter unit for version invalidation.';$u=User::findOrFail($f['physical_actors']['issuer']);auth()->setUser($u);$p2=app(App\Services\WarehouseReturns::class)->prepare($u,$d);$u=User::findOrFail($f['physical_actors']['receiver']);auth()->setUser($u);app(App\Services\WarehouseReturns::class)->confirm($u,$p2['id'],['version'=>1,'received_in_warehouse'=>true,'reason'=>'Independent actual receipt for physical revision proof.']);$refuse(fn()=>$command('validate','validate',['proposal_id'=>$p['proposal_id'],'revision'=>$p['revision'],'decision'=>'approved','reason'=>'Old physical book conference must be refused.']),'actual later physical movement invalidates pending capture');}); + $case(function()use($rate,$f,$post,$enter,$command,$refuse){$rate();[$j,$d]=$post($f['movements'][0]);DB::table('pa_access')->where($f['scope'])->where('user_id',$f['actors']['prepare'])->where('action','general_ledger.post')->delete();$refuse(fn()=>$command('prepare','post',$d),'revoked post right refused before existing effect replay');$refuse(fn()=>$enter('prepare')->stock->command('rate-prepare',['book_id'=>$f['book_id'],'version'=>1,'unit_minor'=>5100,'reason'=>'No correction of already posted stock valuation.'],(string)Str::uuid()),'rate correction after posting excluded');}); + file_put_contents($s['root'].'/cases.json',json_encode(['passed'=>true,'checks'=>$checks,'all_cases_rolled_back'=>true,'no_persistent_journals'=>DB::table('gl_journals')->count()===0],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo count($checks)." stock source/rate/writer checks passed.\n";exit; +} +if($phase==='workflow'){ + if(file_exists($s['root'].'/workflow.json'))throw new LogicException('Completed workflow preserved');$before=$fingerprint();if(!DB::table('gl_stock_rates')->exists())$rate();foreach($f['movements']as$m)if(!DB::table('gl_journals')->where('snapshot->source->stock_movement_id',$m['id'])->exists())$post($m); + $report=$enter('read')->engine()->trialBalance(['from_on'=>'2026-10-01','to_on'=>'2026-10-31']);$stock=$enter('read')->engine()->accountLedger(['from_on'=>'2026-10-01','to_on'=>'2026-10-31','account_id'=>$f['accounts']['QA-STOCK']]);$cost=$enter('read')->engine()->accountLedger(['from_on'=>'2026-10-01','to_on'=>'2026-10-31','account_id'=>$f['accounts']['QA-CONSUMO-STOCK']]); + $ok($report['totals']['debit_minor']===17500&&$report['totals']['credit_minor']===17500&&$stock['closing_net_minor']===7500&&$cost['closing_net_minor']===2500,'same core reports gross175 stock75 consumption25'); + $p=$command('prepare','period-prepare',['period_key'=>'QA-2026-10','reason'=>'Complete selected physical and valuation period conference.']);$command('validate','period-validate',['check_id'=>$p['check_id'],'revision'=>$p['revision'],'decision'=>'approved','reason'=>'Distinct physical quantities rates stock and journal conference.']);$key=(string)Str::uuid();$d=['check_id'=>$p['check_id'],'revision'=>$p['revision'],'reason'=>'Close only the reviewed synthetic stock period.'];$closed=$command('prepare','period-close',$d,$key);$ok($command('prepare','period-close',$d,$key)['closure_id']===$closed['closure_id'],'period close replay unique'); + $ok(DB::table('gl_journals')->count()===3&&DB::table('gl_lines')->count()===6&&DB::table('gl_period_closures')->count()===1,'three journals six lines one close');DB::select('SELECT gl_assert_balanced(id) FROM gl_journals');$ok($fingerprint()===$before,'valuation leaves physical financial budget and grants intact'); + file_put_contents($s['root'].'/workflow.json',json_encode(['passed'=>true,'checks'=>$checks,'journals'=>3,'lines'=>6,'gross_minor'=>17500,'stock_minor'=>7500,'consumption_minor'=>2500,'physical_quantity_milli'=>1500,'closures'=>1,'physical_financial_rights_fingerprint_unchanged'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo "Three journals/six lines; stock75 and consumption25, physical1.5UN; reviewed close once.\n";exit; +} +if(in_array($phase,['race','worker'],true)){require __DIR__.'/stock-ledger-race.php';exit;} +if($phase==='extra'){require __DIR__.'/stock-ledger-extra.php';exit;} +if($phase==='order-guard'){require __DIR__.'/stock-ledger-order-guard.php';exit;} +if($phase==='http-proof'){require __DIR__.'/stock-ledger-http-proof.php';exit;} +if($phase==='http'){require __DIR__.'/stock-ledger-http.php';exit;} +throw new LogicException('Unknown stock proof phase'); diff --git a/scripts/stock-ledger-race.php b/scripts/stock-ledger-race.php new file mode 100644 index 0000000..5b5a549 --- /dev/null +++ b/scripts/stock-ledger-race.php @@ -0,0 +1,31 @@ +200,'result'=>$r];}catch(DomainException $e){$out=['status'=>409,'message'=>$e->getMessage()];} + file_put_contents($file.'.result.json',json_encode($out,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));exit; +} +if(file_exists($s['root'].'/race.json')||DB::table('gl_journals')->exists()||DB::table('gl_stock_rates')->exists())throw new LogicException('Fresh race phase only; completed state preserved'); +$before=$fingerprint();$rate();$results=[]; +$prepare=function($m)use($command,$body){$p=$command('prepare','effect-prepare',$body($m));$command('validate','validate',['proposal_id'=>$p['proposal_id'],'revision'=>$p['revision'],'decision'=>'approved','reason'=>'Distinct source conference before controlled concurrent application.']);return ['proposal_id'=>$p['proposal_id'],'revision'=>$p['revision'],'reason'=>'One reviewed application after deliberate lock release.'];}; +foreach(['same_key_commit','period_changed_then_refuse']as$index=>$scenario){ + $d=$prepare($f['movements'][$index]);$key=(string)Str::uuid();$input=$s['root'].'/race-'.$scenario.'.json';$application='stock_ledger_'.$s['tag'].'_'.$index; + file_put_contents($input,json_encode(['body'=>$d,'key'=>$key,'application'=>$application],JSON_THROW_ON_ERROR));$process=null;DB::beginTransaction(); + try{ + DB::table('tenants')->where('id',$scope['tenant_id'])->lockForUpdate()->firstOrFail(); + if($index===0)$winner=$command('prepare','post',$d,$key);else{ $period=(array)DB::table('gl_periods')->orderByDesc('version')->first();unset($period['id']);$period['version']=2;$period['reason']='Explicit same-period new version during pending confirmation.';DB::table('gl_periods')->insert($period);} + // Settings path is fixed to this run, never the worker input path. + $process=new Symfony\Component\Process\Process([PHP_BINARY,__DIR__.'/stock-ledger-entry.php',$s['root'].'/settings.json','worker',$input],dirname(__DIR__),null,null,30);$process->start(); + $parent=(int)DB::selectOne('SELECT pg_backend_pid() pid')->pid;$wait=null;$deadline=microtime(true)+10; + do{DB::select('SELECT pg_stat_clear_snapshot()');$wait=DB::selectOne("SELECT wait_event,to_json(pg_blocking_pids(pid)) blockers FROM pg_stat_activity WHERE application_name=? AND wait_event_type='Lock'",[$application]);if(!$wait)usleep(25000);}while(!$wait&µtime(true)<$deadline); + if(!$wait||!in_array($parent,json_decode($wait->blockers,true),true))throw new RuntimeException('Expected physical company lock was not observed');DB::commit();$process->wait();file_put_contents($s['root'].'/race-'.$scenario.'.log',$process->getOutput().$process->getErrorOutput()); + if(!$process->isSuccessful()||!file_exists($input.'.result.json'))throw new RuntimeException('Concurrent worker incomplete');$r=json_decode(file_get_contents($input.'.result.json'),true,32,JSON_THROW_ON_ERROR); + if($index===0){$ok($r['status']===200&&$r['result']['replayed']&&$r['result']['journal_id']===$winner['journal_id'],'released same-key confirmation returns original journal without duplication');} + else{$ok($r['status']===409&&!DB::table('gl_commands')->where('command_key',$key)->exists(),'released worker rechecks changed period and refuses stale capture without receipt');} + $results[]=['scenario'=>$scenario,'observed_wait'=>$wait->wait_event,'blocker_observed'=>true,'status'=>$r['status'],'journals_after'=>DB::table('gl_journals')->count()]; + }finally{while(DB::transactionLevel()>0)DB::rollBack();if($process&&$process->isRunning())$process->stop(1);} +} +$ok(DB::table('gl_journals')->count()===1&&DB::table('gl_lines')->count()===2&&$before===$fingerprint(),'two workers leave one journal and original physical/financial/rights state'); +file_put_contents($s['root'].'/race.json',json_encode(['passed'=>true,'checks'=>$checks,'workers'=>$results,'source_fingerprint_unchanged'=>true,'not_throughput_measurement'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo "Physical company lock observed; released replay200 and stale-period409, one journal.\n"; diff --git a/scripts/stock-ledger-run.mjs b/scripts/stock-ledger-run.mjs new file mode 100644 index 0000000..cff888e --- /dev/null +++ b/scripts/stock-ledger-run.mjs @@ -0,0 +1,16 @@ +import fs from 'node:fs';import path from 'node:path';import crypto from 'node:crypto';import {spawnSync} from 'node:child_process'; +const state=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),php='C:/laragon/tools/sgf-tempo/php-8.4.27/php.exe'; +if(state.port!==55439||!/^[a-f0-9]{12}$/.test(state.id)||path.resolve(state.root)!==path.resolve('C:/laragon/data/sgf-tempo/run/modular-regression-'+state.id))throw Error('Owned QA cluster only'); +const resume=process.argv[2]&&process.argv[2]!=='new'?process.argv[2]:null;if(resume&&!/^[a-f0-9]{12}$/.test(resume))throw Error('Bad identifier'); +const tag=resume??crypto.randomBytes(6).toString('hex'),root=path.join(state.root,'private/stock-ledger-'+tag),settings=path.join(root,'settings.json'); +if(!resume){ + fs.mkdirSync(root);const admin=fs.readFileSync(path.join(state.root,'private/admin-password.txt'),'utf8').trim(); + const pg=input=>{const r=spawnSync('C:/Program Files/PostgreSQL/17/bin/psql.exe',['-h','127.0.0.1','-p','55439','-U','sgf_regression_owner','-d','postgres','-Atq','-v','ON_ERROR_STOP=1'],{input,encoding:'utf8',windowsHide:true,env:{...process.env,PGPASSWORD:admin}});if(r.status!==0)throw Error('QA provisioning failed; preserve private diagnostics without resetting');return r.stdout.trim();}; + if(pg("SELECT current_setting('cluster_name')")!=='sgf_modular_regression_'+state.id)throw Error('Wrong physical cluster'); + const database='compras_receipts_test_'+tag,role='payable_history_native_'+tag,password=crypto.randomBytes(32).toString('hex');pg(`CREATE ROLE ${role} LOGIN PASSWORD '${password}' NOSUPERUSER NOCREATEDB NOCREATEROLE NOREPLICATION NOBYPASSRLS; CREATE DATABASE ${database} OWNER ${role}; REVOKE ALL ON DATABASE ${database} FROM PUBLIC;`); + const storage=path.join(root,'storage');for(const d of ['framework/cache/data','framework/views','framework/sessions','logs','cache'])fs.mkdirSync(path.join(storage,d),{recursive:true}); + fs.writeFileSync(settings,JSON.stringify({tag,root,database,role,password,storage,native:path.resolve('../compras'),ledger:path.resolve('packages/general-ledger'),cluster:'sgf_modular_regression_'+state.id,run:state.id,app_key:'base64:'+crypto.randomBytes(32).toString('base64')},null,2)); + const fixture=fs.readFileSync('../compras/tests/Support/ReceiptFixture.php','utf8').replace('function receiptFixture(','function stockValuationFixture(').replace('function receiptPayload(','function stockValuationPayload(').replaceAll("'cx'","'UN'"); + fs.writeFileSync(path.join(root,'StockReceiptFixture.php'),fixture); +} +const phases=process.argv[3]?.split(',')??['setup'];for(const phase of phases){if(!['setup','access','contract','cases','order-guard','extra','workflow','race','worker','http-proof','demo-baseline','demo-preservation'].includes(phase))throw Error('Unknown stock phase');if(fs.existsSync(path.join(root,phase+'.json')))throw Error('Completed proof preserved');const r=spawnSync(php,[path.resolve('scripts/stock-ledger-entry.php'),settings,phase],{encoding:'utf8',windowsHide:true,timeout:120000,maxBuffer:1024*1024});fs.writeFileSync(path.join(root,phase+'-'+Date.now()+'.log'),r.stdout+'\n'+r.stderr);console.log(JSON.stringify({tag,phase,exit_code:r.status,proof_present:fs.existsSync(path.join(root,phase+'.json'))}));if(r.status!==0||!fs.existsSync(path.join(root,phase+'.json'))){process.exitCode=1;break;}} diff --git a/scripts/stock-ledger-setup.php b/scripts/stock-ledger-setup.php new file mode 100644 index 0000000..748f7e4 --- /dev/null +++ b/scripts/stock-ledger-setup.php @@ -0,0 +1,30 @@ +hasTable('users'))throw new LogicException('Fresh QA database required; no reset'); +Artisan::call('migrate',['--force'=>true]);Date::setTestNow('2026-10-29 12:00:00');config(['stock_returns.enabled'=>true]); +require $s['root'].'/StockReceiptFixture.php';require $s['native'].'/tests/Support/SupplyFixture.php'; +$f=stockValuationFixture('2.000'); +$reviewer=User::factory()->create(['tenant_id'=>$f['tenant']->id,'department_id'=>$f['issuer']->department_id]); +supplyGrant($f['issuer'],['warehouse_request_prepare','warehouse_return_prepare','warehouse_return_read','warehouse_return_confirm','warehouse']);supplyGrant($reviewer,['warehouse_request_review']);supplyGrant($f['receiver'],['warehouse','warehouse_request_deliver','warehouse_return_read','warehouse_return_confirm']); +auth()->setUser($f['receiver']);$receipt=app(ReceiptWorkflow::class)->confirm($f['receiver'],$f['order'],stockValuationPayload($f,'2.000')); +auth()->setUser($f['issuer']);$request=app(WarehouseRequests::class)->draft($f['issuer'],['operation_key'=>(string)Str::uuid(),'warehouse_id'=>$f['warehouse']->id,'cost_center_id'=>$f['r']->cost_center_id,'destination'=>'Synthetic selected material use','reason'=>'Explicit selected QA valuation physical source.','priority'=>'normal','lines'=>[['stock_item_id'=>$f['stock']->id,'quantity'=>'1.000','use'=>'internal','equipment_id'=>null]]]); +$command=function($actor,$action,$extra)use($request){auth()->setUser($actor);return app(WarehouseFulfilment::class)->command($actor,$request->id,['operation_key'=>(string)Str::uuid(),'version'=>app(WarehouseFulfilment::class)->progress($request)['version'],'action'=>$action,'reason'=>'Explicit isolated physical workflow.']+$extra);}; +$command($f['issuer'],'submit',['partial_allowed'=>false]);$command($reviewer,'authorize',['partial_allowed'=>false]);$delivery=$command($f['receiver'],'deliver',['lines'=>[['index'=>0,'quantity'=>'1.000']]]);$command($f['issuer'],'receive',['delivery_event_id'=>$delivery->id]); +$d=['operation_key'=>(string)Str::uuid(),'delivery_event_id'=>$delivery->id,'line_index'=>0,'quantity_milli'=>500,'declared_unused'=>true,'evidence'=>'Unused selected half unit physically returned to original warehouse.','reason'=>'Explicit unused material declaration for QA valuation.']; +auth()->setUser($f['issuer']);$p=app(WarehouseReturns::class)->prepare($f['issuer'],$d);auth()->setUser($f['receiver']);$returned=app(WarehouseReturns::class)->confirm($f['receiver'],$p['id'],['version'=>1,'received_in_warehouse'=>true,'reason'=>'Distinct physical receipt of selected unused half unit.']); +if(DB::table('stock_movements')->count()!==3||(int)DB::table('stock_movements')->sum('quantity_milli')!==1500)throw new LogicException('Expected actual receipt2/issue1/return0.5'); +$app->instance('env','payable-testing'); +LedgerSchema::install(DB::connection());CycleSchema::install(DB::connection());StockSchema::install(DB::connection()); +if(!DB::getSchemaBuilder()->hasTable('ps_payments'))Tempo\Finance\Payables\SettlementSchema::install();if(!DB::getSchemaBuilder()->hasTable('ps_reversals'))Tempo\Finance\Payables\ReversalSchema::install(); +$scope=['tenant_id'=>$f['tenant']->id,'company_id'=>0,'unit_id'=>0];$actors=[]; +foreach(['prepare','validate','read']as$role){$u=User::factory()->create(['tenant_id'=>$f['tenant']->id,'department_id'=>$f['issuer']->department_id,'purchasing_role'=>App\Enums\PurchasingRole::Finance]);supplyGrant($u,['finance']);$actors[$role]=$u->id;foreach(match($role){'prepare'=>['view','prepare','post','period_prepare','period_close'],'validate'=>['view','validate','period_validate'],default=>['view']}as$a)DB::table('pa_access')->insert($scope+['user_id'=>$u->id,'action'=>'general_ledger.'.$a,'person'=>'qa-stock-person-'.$u->id]);} +$meta=['created_by'=>$actors['prepare'],'reason'=>'Authorised isolated stock valuation composition.','created_at'=>now()];$accounts=[];foreach(['QA-STOCK','QA-COMPENSACAO-STOCK','QA-CONSUMO-STOCK']as$code)$accounts[$code]=DB::table('gl_accounts')->insertGetId($scope+['code'=>$code,'label'=>'Artificial '.$code,'is_movement'=>true,'currency'=>'MZN']); +DB::table('gl_periods')->insert($scope+$meta+['period_key'=>'QA-2026-10','version'=>1,'starts_on'=>'2026-10-01','ends_on'=>'2026-10-31','status'=>'open']); +foreach(['stock.receipt'=>['QA-STOCK','QA-COMPENSACAO-STOCK'],'stock.issue'=>['QA-CONSUMO-STOCK','QA-STOCK'],'stock.return'=>['QA-STOCK','QA-CONSUMO-STOCK']]as$type=>[$debit,$credit])DB::table('gl_rules')->insert($scope+$meta+['rule_key'=>$type,'version'=>1,'policy'=>'QA-STOCK-VALUATION-v1','effect_type'=>$type,'currency'=>'MZN','valid_from'=>'2026-10-01','valid_to'=>'2026-10-31','debit_account_id'=>$accounts[$debit],'credit_account_id'=>$accounts[$credit]]); +$book=DB::table('gl_stock_books')->insertGetId($scope+$meta+['stock_item_id'=>$f['stock']->id,'warehouse_id'=>$f['warehouse']->id,'unit_code'=>'UN','period_key'=>'QA-2026-10']); +$fixture=['scope'=>$scope,'actors'=>$actors,'accounts'=>$accounts,'book_id'=>$book,'physical_actors'=>['issuer'=>$f['issuer']->id,'receiver'=>$f['receiver']->id,'reviewer'=>$reviewer->id],'movements'=>DB::table('stock_movements')->orderBy('id')->get(['id','movement_type','quantity_milli'])->all(),'return_proposal'=>$p['id'],'return_confirmation'=>$returned,'physical_receipt'=>$receipt->id,'physical_request'=>$request->id]; +file_put_contents($s['root'].'/fixture.json',json_encode($fixture,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));file_put_contents($s['root'].'/setup.json',json_encode(['passed'=>true,'actual_receipt_issue_return_workflows'=>true,'movements'=>3,'quantity_milli'=>1500,'initial_rates'=>0,'initial_journals'=>0,'supplier_obligations'=>DB::table('pa_obligations')->count(),'native_scope_is_not_sgf_company_unit'=>true],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo "Actual physical2/-1/+0.5; net1.5UN. New common ledger, no rates/journals or payable effects.\n"; diff --git a/scripts/stock-ledger-ui-check.mjs b/scripts/stock-ledger-ui-check.mjs new file mode 100644 index 0000000..25204cc --- /dev/null +++ b/scripts/stock-ledger-ui-check.mjs @@ -0,0 +1,14 @@ +import fs from 'node:fs';import path from 'node:path';import vm from 'node:vm';import assert from 'node:assert/strict';import React from 'react';import {renderToStaticMarkup} from 'react-dom/server';import {createServer} from 'vite'; +const tag=process.argv[2];if(!/^[a-f0-9]{12}$/.test(tag??''))throw Error('Explicit HTTP proof identifier required');const state=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),root=path.join(state.root,'private/stock-ledger-'+tag),out='docs/proofs/stock-ledger-ui-20261103.json';if(fs.existsSync(out))throw Error('Completed UI proof preserved'); +const html=fs.readFileSync(path.join(root,'http-open.html'),'utf8'),contract=JSON.parse(html.match(/