Architecture Decision Record

3 minutes

31. Score architecture from the IcePanel C4 model

Date: 2026-10-11

Status

Accepted

Amended by 32. Package architecture scoring as an ArcKit companion plugin

Supersedes 28. Implement Architecture Scoring via Spec-Driven Development (SDD)

Context

ADR 0028 made the Python Architecture Scoring Component (repos/archi-agentic-toolset) read Archimate models exported from Archi and versioned on GitHub via coArchi2, with history per git commit. It was built with speckitplus, opencode and Big Pickle. ADR 0030 made IcePanel the C4 source of truth. The Archi files are legacy and read-only, so the scorer’s input no longer changes. The score CLI command and the POST /api/v1/score endpoint were stubs. The real container and component scoring was Neo4j Cypher tied to ArchiMate element types and stereotypes (Flow/Triggering).

2 minutes

32. Package architecture scoring as an ArcKit companion plugin

Date: 2026-10-11

Status

Accepted

Amends 31. Score architecture from the IcePanel C4 model

Context

ADR 0031 registered the archi-scoring MCP server in the Unicorn Claude Code harness and ran repos/archi-agentic-toolset as a Unicorn repo and Dapr app (scoring-service). The toolset scores any IcePanel C4 landscape. It is not part of Unicorn. ArcKit (the third-party plugin tractorjuice/arckit-claude) is the architecture governance harness in use, so scoring belongs next to it. We don’t want to fork ArcKit.

2 minutes

33. Use Azure Key Vault and managed identity

Date: 2026-10-12

Status

Proposed

Context

The three Unicorn services need about fifteen credentials: identity provider, Google OAuth, AI model, Cosmos DB, Service Bus, GitHub and the notification provider. The CI workflow passes most of them as Docker build arguments, and the Dockerfiles copy them into environment variables, so they are stored in the image layers pushed to the container registry. The notification credentials are hard-coded in the processing service and are in git history. The Cosmos DB and Service Bus keys are passed at deploy time into the Dapr components. Requirement NFR-SEC-004 says no credential may live in source code or tracked configuration.

2 minutes

34. Bind Google Drive access to the owner session

Date: 2026-10-12

Status

Proposed

Context

The BFF runs Auth0 sign-in as optional, so no API route requires a signed-in user. It runs its own Google OAuth flow and keeps the resulting tokens on one client shared by the whole process. Once the owner has connected Google, any caller who reaches the API can list, download and publish the owner’s files. That flow asks for read and write access to the whole Drive, sends no state value on the callback, and keeps the tokens only in memory, so they are lost on every scale-to-zero restart.

2 minutes

35. Replace Pusher with Azure Web PubSub

Date: 2026-10-12

Status

Proposed

Supersedes 24. Notification

Context

ADR 0024 chose Pusher to tell the owner when a file has been processed. The processing service triggers an event on a public Pusher channel, and the frontend subscribes with the app key that ships in its bundle. Anyone holding that key can subscribe and read the messages, which include file names when a file is not published. The Pusher server credentials are hard-coded in the processing service, and the frontend also depends on Pusher’s server SDK.

2 minutes

36. Route Container Apps logs through Azure Monitor

Date: 2026-10-12

Status

Proposed

Context

The Container Apps environment sends its logs with the legacy Log Analytics destination, which authenticates with the workspace shared key fetched at deployment. Microsoft documents that this destination uses the HTTP Data Collector API, whose support ended on 14 September 2026. Ingestion still works, but the API only receives critical security fixes. The workspace has no daily ingestion cap, so a logging loop could go past the 5 GB monthly free allowance and the 20 euro monthly budget.

2 minutes

37. Use Service Bus Basic tier for file events

Date: 2026-10-12

Status

Proposed

Context

As decided in ADR 0020, the BFF publishes one event per selected file and the processing service consumes it through the Dapr component files, of type pubsub.azure.servicebus.queues. The Service Bus namespace was created by hand, outside Bicep, so its tier is not recorded, and the component connects with the namespace’s root management key. The component only uses queues. The Basic tier supports queues and dead-lettering, while the Standard tier adds topics, sessions and duplicate detection, which Unicorn does not use, for a base charge of 10 US dollars a month.

2 minutes

38. Scale container apps to zero

Date: 2026-10-12

Status

Proposed

Context

The deployment declares a minimum of one replica for the BFF, the processing service and the publishing service, at 0.75 vCPU and 1.5 GiB each, so all three run around the clock. That is about 5.9 million vCPU-seconds a month against a free grant of 180,000. At West Europe retail prices this costs about 69 US dollars a month at the idle rate and up to 241 at the active rate, several times the 20 euro budget. Unicorn handles about twenty files a month for one owner. Container Apps charges nothing for an app scaled to zero, but an app at zero only starts again if a scale rule can trigger it.