feat(corporate): add dormant source audits and evidence-led daily planning
Deploy Canina / deploy (push) Failing after 22m23s

This commit is contained in:
Canina Automation committed 2026-10-28 13:36:51 +00:00
1 parent 94f08b8c8a
commit 90dcec413d
5 files changed
+446

No files matched your search

@@ -0,0 +1,11 @@
# Plan
Base: 94f08b8, isolated branch corporate-department-runtime, initially clean. Remotes: gitea real; origin local bundle. No push.
Graphify query `CorporateService tasks evidence reports runtime` returned legacy report navigation, not current corporate symbols. Existing graph SHA256 6a73473cee9e207543fdeeb668bea544f766200a1b16b8a3a9ce18d4e42e51af; build/source binding unverified, navigation only. Directly inspected scripts/corporate_runtime.py and backend corporate.controller.ts/service.ts/policy.ts at base. Graph cache side effect will not be committed.
Reviewed /opt/data/engineering/canina-spec-baseline/.specify/memory/constitution.md; specify 1.2.3 installed. Proportional artifacts here, no shared scaffold overwrite.
Reuse Store, canonical, Client without changing runtime. New standalone command accepts strict `department_audit_v1` operation, uses source bytes from research provenance and writes content-addressed audit plus existing evidence endpoint. Client reads real list envelope `{data,meta}` and detail `{evidence,reviews,effects,relationsMeta}`. PMO performs GET only, saves report locally, no report/task insertion. API is loopback only via existing client, bounded requests, no arbitrary endpoints. Offline transcript adapter permits reproducible acceptance against recorded real API outputs.
No backend/frontend modification: affected verification is Python runtime regression suites, parser tests, real persisted-source execution, offline snapshot PMO. Full application builds/deploy not claimed.
@@ -0,0 +1,15 @@
# Dormant department runtime
## Intent
Produce deterministic, byte-grounded department audits instead of inventories; propose needs-based PMO follow-up from actual corporate task/evidence history without publishing or scheduling.
## Acceptance
- Explicit manual execution only. No source instructions evaluated; bounded persisted-source reads and deterministic HTML/Markdown extraction.
- CONTENT_SEO audits HTML title, description and H1 presence; CATALOG_COMMERCE audits Product JSON-LD name; WIKI_SCIENTIFIC audits HTML heading structure; TECH_DEVOPS extracts Markdown links/headings and flags duplicate anchors. Unsupported formats are explicitly unavailable, not clean.
- Every finding references source digest, URL and extracted observation. No clinical, traffic or commercial claims.
- Corporate execution uses existing claim/evidence contracts only; never marks DONE, reviews, publishes or records effects.
- PMO reads paginated tasks and detail history, with bounded calls and truncation disclosure. Outcomes, existing follow-up and genuinely new daily audit needs remain separate; no recommendation without an observed gap and lineage. Unavailable effects remain unavailable.
- Frozen API transcripts can be replayed offline, explicitly labelled snapshots, never live acceptance.
## Boundaries
Own only scripts/corporate_department* and this spec directory. Parent owns push/release. No cron, production or admin approval changes.
@@ -0,0 +1,22 @@
# Tasks and convergence
- [x] Load engineering lifecycle, graphify, spec-kit, hermes-agent, TDD; inspect base and real contracts.
- [x] RED → GREEN source extraction and provenance (missing module → passing HTML audit).
- [x] RED → GREEN engineering Markdown + unsupported-format separation (unsupported department/missing availability → pass).
- [x] RED → GREEN PMO outcomes and execution (missing functions → pass); claim + evidence only, no reviews/effects.
- [x] RED → GREEN daily-new dedup against active department, bounded history, snapshot CLI (duplicate proposal/missing history/empty stdout → pass).
- [x] RED → GREEN product/wiki structural extraction (unsupported department → pass).
- [x] RED → GREEN bounded research lookup (missing function → pass).
- [x] Regressions and actual persisted-source CLI execution; frozen real API transcript PMO replay.
- [ ] New department claim/evidence through live disposable Nest/Postgres HTTP integration. Parent must exercise before activation.
- [ ] Independent department audit QA consumer; existing inventory QA intentionally rejects new operation. No DONE claims.
## Evidence
`python3 -m unittest discover -s scripts -p 'corporate*test.py' -v`: 18 tests pass after final bounded-lookup addition (rerun recorded by tool).
Real source replay: copied existing content-addressed store from `/opt/data/cache/scratch/corporate-integrated-pilot-frozen-final` to `/opt/data/cache/scratch/corporate-department-runtime-evidence/store`; extracted research from real ingest transcript. TECH_DEVOPS CLI extracted 12 headings, 247 HTTPS links, zero duplicate-heading findings from official Hermes docs index. This is concrete document extraction, not production engineering coverage. Audit artifact f471f3ee1846e988fc25e5be367fd8e0c0cc9635e0a6ef4e06c2e756cd6bda5d.
PMO replay assembled existing fanout task fields, execute evidence, QA review, and persistedReadback status/effects from same transcript (no invented history). First attempt used receipt summary rather than detail and correctly failed missing id; corrected explicit assembly. Snapshot marked incomplete, no new work proposed; UNINSTRUMENTED production_engagement remains null. Plan artifact c6dfd0d8194e8671e37270934c2ecc28e523ed0b9b8be57c01fb7fa053254a39. Outputs audit.json/history.json/plan.json remain in scratch, not committed.
## Limits
Manual dormant code, not enabled cron or integrated scheduler. No push/CI/deploy/live API acceptance. Unit adapter doubles prove request contracts only; snapshots prove offline recorded-data processing only. Parsers audit structure, not clinical truth, live SEO, link reachability, schema completeness or metrics. HTML extraction is intentionally conservative and not a browser render. PMO new actions are verification proposals from previously observed findings, not assertions they remain unresolved today. Active department work suppresses new proposals conservatively. Backend page/detail are separate snapshots; no global transaction across pagination. Reuses existing Client with timeout and loopback restrictions; its response decoder is not byte-capped. Up to 20 sources, 2 MB each; 3 default history pages, max 5. No backend/frontend touched, full app build not claimed.