feat: dati-configurazione reference + auto-pull ff-only in session_start
- references/dati-configurazione.md: dati stabili dipendente (matricola, CdC 493, WBS, Excel) migrati da qmem per architettura pointer-only - session_start esegue git pull --ff-only best-effort (10s, detached): gli aggiornamenti/skill nuove da altre macchine vengono recepiti a ogni avvio; l'indice si ricostruisce via fingerprint mtime
This commit is contained in:
+24
-1
@@ -12,9 +12,10 @@
|
||||
*/
|
||||
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
||||
import { Type } from "typebox";
|
||||
import { readdirSync, readFileSync, statSync } from "node:fs";
|
||||
import { readdirSync, readFileSync, statSync, existsSync } from "node:fs";
|
||||
import { join, dirname } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { spawn } from "node:child_process";
|
||||
|
||||
const SKILLS_DIR = join(dirname(fileURLToPath(import.meta.url)), "..", "skills");
|
||||
const MAX_CHARS_PER_SKILL = 200_000;
|
||||
@@ -134,6 +135,25 @@ function fingerprint(dir: string): number {
|
||||
return acc;
|
||||
}
|
||||
|
||||
/**
|
||||
* Best-effort git pull (ff-only, 10s, non bloccante) del clone del package:
|
||||
* riceve gli aggiornamenti/skill nuove pushate da altre macchine all'avvio
|
||||
* della sessione. L'indice si ricostruisce da solo via fingerprint mtime.
|
||||
*/
|
||||
function autoPull(root: string): void {
|
||||
try {
|
||||
if (!existsSync(join(root, ".git"))) return;
|
||||
const child = spawn("git", ["-C", root, "pull", "--ff-only", "-q"], {
|
||||
stdio: "ignore",
|
||||
detached: true,
|
||||
timeout: 10_000,
|
||||
});
|
||||
child.unref();
|
||||
} catch {
|
||||
/* pull opportunistico: mai bloccare l'avvio */
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- index
|
||||
|
||||
let index: IndexState | undefined;
|
||||
@@ -222,9 +242,12 @@ function searchSkills(query: string, limit: number): { entry: SkillEntry; score:
|
||||
// ---------------------------------------------------------------- extension
|
||||
|
||||
export default function (pi: ExtensionAPI) {
|
||||
const PACKAGE_ROOT = join(dirname(fileURLToPath(import.meta.url)), "..");
|
||||
|
||||
// indicizza all'avvio della sessione ("ad ogni avvio l'indice si aggiorna")
|
||||
pi.on("session_start", async () => {
|
||||
try {
|
||||
autoPull(PACKAGE_ROOT);
|
||||
buildIndex(true);
|
||||
} catch {
|
||||
/* la scan avviene comunque lazy alla prima ricerca */
|
||||
|
||||
@@ -103,6 +103,7 @@ modifiche a mesi chiusi da altro personale.
|
||||
| Condizione | Carica/esegui |
|
||||
|---|---|
|
||||
| Prima scrittura o ambiente cambiato | `references/procedura-tecnica.md` |
|
||||
| Identificazione dipendente, CdC/WBS, file ore team | `references/dati-configurazione.md` |
|
||||
| Errore SAP, lock, pagina bianca, menu chiuso | `references/errori-noti.md` |
|
||||
| Analisi di controllo/conformità richiesta | `references/best-practice-controlli.md` |
|
||||
| Operazioni ponte BiDi ripetitive | `scripts/bridge_helper.py` (python3) |
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# Dati di configurazione stabili — BENEDETTO MATTEO
|
||||
|
||||
Dati che identificano il dipendente e i cost object nel SAP di Telespazio.
|
||||
Ultima verifica su DOM reale: 15-16.09.2026.
|
||||
|
||||
## Identificazione
|
||||
- Dipendente: **BENEDETTO MATTEO** — C.I.D. **21432** (P 00021432)
|
||||
- Matricola SAP: **16101000** — utente SAP **MBENEDETTO** (client P11 / mandante 555)
|
||||
- URL: `https://s4t.sap.telespazio.com/webgui` (SSO Microsoft Entra; MFA manuale utente)
|
||||
- Transazione: PPMDT (Manager's Desktop) → Time Sheet → Inserimento Time Sheet (CAT2)
|
||||
|
||||
## Cost object / righe dati
|
||||
- CdC mittente: **493** (Reparto E COO-CM-E (ENG), "Engineering…")
|
||||
- Riga standard (luglio/agosto 2026): CA=EGEO, TdA=ORE, UM=H, **WBS destinatario 185.005.50.51**
|
||||
- WBS Formazione generale: **605.100.10**
|
||||
- Settembre 2026 (3 righe, ripartizione 70/20/10 dal file ore team):
|
||||
- 185.102.01.01 → 70%
|
||||
- 225.489.64.50 → 20%
|
||||
- 235.900.10 → 10%
|
||||
- Nota verificata su DOM: nelle righe dati reali la colonna **CA (c3/KOKRS) resta
|
||||
vuota** (le note storiche "CA=EGEO" descrivono l'auto-compilazione di SAP, non
|
||||
un campo da digitare); TdA (c4) = ORE, UM (c8) = H.
|
||||
|
||||
## File ore team (fonte percentuali)
|
||||
- Percorso tipico: `~/Documenti/Ore Team Fortuna - <Mese>.xlsx` (o `~/ts/`)
|
||||
- Foglio3, colonne: CdC, Reparto, Cognome, Nome, WBE, Perc<Mese>
|
||||
- Un blocco (righe + riga "Totale" = 1) per dipendente; le percentuali sommano a 100.
|
||||
|
||||
## Periodo
|
||||
- Mese solare: 01.<mese>.<anno> a fine mese.
|
||||
- Le ore teoriche dei giorni futuri vengono generate progressivamente da SAP:
|
||||
a metà mese la somma teoriche è parziale (agosto: 61,05 h al 22.08 → 107,18 h
|
||||
a fine mese). Il mese corrente si inserisce con forecast (8h) e si COMPLETA
|
||||
il mese successivo.
|
||||
Reference in New Issue
Block a user