# Portal publication

> Decide if foundry-web may publish a portal release. Only the exact build that was checked and approved can go live.

Inspired by UOR-Foundation/foundry-web (https://github.com/UOR-Foundation/foundry-web), live at https://uor-foundation.github.io/foundry-web/. The publication repository that deploys the exact verified, authorized Foundry portal release to Pages without rebuilding it. Pattern: Policy decision, OASIS XACML 3.0 policy decision point. To write one of your own, follow How to build a policy decision app (../../guides/policy-decision/index.md). The prompt below is data, quoted from the example.

**Figure: What the Portal publication app does.** A request goes in, the rules decide, and the Lean kernel has already proved what the rules promise.

| Step | What happens |
| --- | --- |
| 1. Request | producer, reference, capabilities, stage, target |
| 2. 6 rules | the first that applies decides |
| 3. Answer | permit, deny, not-applicable, indeterminate |
| 4. Proved | 4 theorems, 46 tests |

Verified by prismpm verify in the pinned SDK. Fingerprint: 19eaebc09b022afba476d6cace1a471c52a55200968d56336cd8a8c4fb6a063f. Acceptance vectors: 46. Claims: 7.

## The prompt

```json
{
  "schema": "prism/prompt/1",
  "pattern": "policyDecision",
  "goal": "Decide if foundry-web may publish a portal release. Only the exact build that was checked and approved can go live.",
  "repository": "UOR-Foundation/foundry-web",
  "app": {
    "name": "foundry-web-publication",
    "title": "Portal publication",
    "purpose": "Decide, as an XACML 3.0 policy decision point, whether a portal release may be published from its producer, how it is referenced, how many core capabilities it implements, the producer state it is in and whether its target is approved.",
    "fields": [
      {
        "name": "producer",
        "kind": "choice",
        "values": [
          "foundry",
          "other",
          "unverifiable"
        ],
        "means": "the producer identity: the uor-foundry repository, another producer, or one the SDK cannot verify"
      },
      {
        "name": "reference",
        "kind": "choice",
        "values": [
          "release",
          "moving"
        ],
        "means": "an exact verified release, or a moving branch, tag, build directory or unchecked workflow artifact"
      },
      {
        "name": "capabilities",
        "kind": "number",
        "min": 0,
        "max": 5,
        "means": "how many of identity, roles, shared workspaces, persistence and messaging pass their producer gates"
      },
      {
        "name": "stage",
        "kind": "choice",
        "values": [
          "ready",
          "authorized",
          "accepted"
        ],
        "means": "the producer state: producer-ready, deployment-authorized or accepted"
      },
      {
        "name": "target",
        "kind": "choice",
        "values": [
          "approved",
          "unapproved"
        ],
        "means": "whether the origin and subpath are the authorized /foundry-web/ Pages target"
      }
    ],
    "outcomes": [
      "permit",
      "deny",
      "not-applicable",
      "indeterminate"
    ],
    "meanings": {
      "permit": "XACML 3.0 section 7: the policy applies and allows publishing the release",
      "deny": "XACML 3.0 section 7: the policy applies and forbids publishing it",
      "not-applicable": "XACML 3.0 section 7: no rule of this publisher's policy applies to the request",
      "indeterminate": "XACML 3.0 section 7: the policy could not be evaluated, here because the producer identity cannot be verified"
    },
    "rules": [
      {
        "when": [
          {
            "field": "producer",
            "op": "is",
            "value": "other"
          }
        ],
        "then": "not-applicable",
        "why": "SPEC.md Ownership: foundry-web publishes only the uor-foundry platform; it is not a second application model"
      },
      {
        "when": [
          {
            "field": "producer",
            "op": "is",
            "value": "unverifiable"
          }
        ],
        "then": "indeterminate",
        "why": "SPEC.md Release boundary: verify producer identity independently; a signed SDK or valid digest alone does not establish it"
      },
      {
        "when": [
          {
            "field": "reference",
            "op": "is",
            "value": "moving"
          }
        ],
        "then": "deny",
        "why": "SPEC.md Release boundary: acquire an exact verified release, not a moving branch, tag, build directory or unchecked workflow artifact"
      },
      {
        "when": [
          {
            "field": "capabilities",
            "op": "<",
            "value": 5
          }
        ],
        "then": "deny",
        "why": "SPEC.md Authorized initial scope: all five core capabilities must pass; reject incomplete stage capabilities and draft previews"
      },
      {
        "when": [
          {
            "field": "stage",
            "op": "is",
            "value": "ready"
          }
        ],
        "then": "deny",
        "why": "SPEC.md Release boundary: producer-ready precedes a separately authorized deployment"
      },
      {
        "when": [
          {
            "field": "target",
            "op": "is",
            "value": "unapproved"
          }
        ],
        "then": "deny",
        "why": "SPEC.md Publication acceptance: reject unauthorized targets; authorization binds the exact origin and subpath"
      }
    ],
    "otherwise": "permit",
    "otherwiseWhy": "SPEC.md: an exact verified uor-foundry release of the complete authorized core stage, deployment-authorized, to its approved target",
    "properties": [
      {
        "kind": "never",
        "when": [
          {
            "field": "capabilities",
            "op": "<",
            "value": 5
          }
        ],
        "then": "permit",
        "why": "a mock, draft preview or incomplete stage is not an eligible release"
      },
      {
        "kind": "never",
        "when": [
          {
            "field": "reference",
            "op": "is",
            "value": "moving"
          }
        ],
        "then": "permit",
        "why": "only exact verified releases are published"
      },
      {
        "kind": "never",
        "when": [
          {
            "field": "stage",
            "op": "is",
            "value": "ready"
          }
        ],
        "then": "permit",
        "why": "deployment needs its own authorization"
      },
      {
        "kind": "always",
        "when": [
          {
            "field": "producer",
            "op": "is",
            "value": "other"
          }
        ],
        "then": "not-applicable",
        "why": "another producer's release is outside this publisher's policy"
      }
    ],
    "examples": [
      {
        "request": "foundry release 5 authorized approved",
        "response": "permit"
      },
      {
        "request": "foundry release 5 accepted approved",
        "response": "permit"
      },
      {
        "request": "foundry release 4 authorized approved",
        "response": "deny"
      },
      {
        "request": "foundry moving 5 authorized approved",
        "response": "deny"
      },
      {
        "request": "foundry release 5 ready approved",
        "response": "deny"
      },
      {
        "request": "foundry release 5 authorized unapproved",
        "response": "deny"
      },
      {
        "request": "other release 5 authorized approved",
        "response": "not-applicable"
      },
      {
        "request": "unverifiable release 5 authorized approved",
        "response": "indeterminate"
      }
    ]
  },
  "stakeholders": [
    {
      "name": "Portal publisher",
      "text": "Runs the foundry-web Pages workflow and needs it to deploy only verified, authorized producer bytes without rebuilding them.",
      "concerns": [
        "Correct answers",
        "Proved guarantees"
      ]
    },
    {
      "name": "Foundry owner",
      "text": "Authorized the first functional release and needs no draft, incomplete or unauthorized stage presented as it.",
      "concerns": [
        "Proved guarantees",
        "Integrity of the published app"
      ]
    }
  ],
  "components": [
    {
      "name": "uor-foundry release",
      "text": "The producer repository's exact verified portal release and its evidence.",
      "kind": "externalSystem"
    },
    {
      "name": "PrismPM SDK",
      "text": "The locked SDK that acquires the release and verifies its integrity, identity and evidence.",
      "kind": "cliAdapter"
    },
    {
      "name": "Foundry Pages site",
      "text": "The published portal at https://uor-foundation.github.io/foundry-web/.",
      "kind": "staticSite"
    }
  ],
  "threats": [
    {
      "name": "Draft preview published as the core release",
      "text": "A release missing one of the five core capabilities is deployed as the functional release.",
      "stride": "tampering",
      "asset": "answer",
      "likelihood": "medium",
      "impact": "critical",
      "control": {
        "name": "Complete stage only",
        "text": "Fewer than five passing capabilities is denied.",
        "evidence": [
          {
            "kind": "proof",
            "reference": "FoundryWebPublicationProofs::inv001Holds"
          },
          {
            "kind": "review",
            "reference": "UOR-Foundation/foundry-web SPEC.md Authorized initial scope"
          }
        ]
      }
    },
    {
      "name": "Moving reference substituted",
      "text": "A branch or tag is published, so the bytes differ from the verified release.",
      "stride": "spoofing",
      "asset": "source",
      "likelihood": "medium",
      "impact": "major",
      "control": {
        "name": "Exact release only",
        "text": "A moving reference is denied.",
        "evidence": [
          {
            "kind": "proof",
            "reference": "FoundryWebPublicationProofs::inv002Holds"
          }
        ]
      }
    },
    {
      "name": "Deployment before authorization",
      "text": "A producer-ready release is deployed before its separate deployment authorization.",
      "stride": "elevationOfPrivilege",
      "asset": "answer",
      "likelihood": "low",
      "impact": "major",
      "control": {
        "name": "Authorized stage only",
        "text": "A producer-ready release is denied.",
        "evidence": [
          {
            "kind": "proof",
            "reference": "FoundryWebPublicationProofs::inv003Holds"
          }
        ]
      }
    },
    {
      "name": "Live checks skipped after deployment",
      "text": "A deployment answered permit is treated as accepted without the live journeys SPEC.md requires.",
      "stride": "repudiation",
      "asset": "holo",
      "likelihood": "medium",
      "impact": "major",
      "accepted": "The app decides whether to publish; post-deployment verification of the live URL and journeys is a separate foundry-web gate it does not replace."
    }
  ],
  "quality": [
    {
      "characteristic": "Functional suitability",
      "subcharacteristic": "Functional correctness",
      "requirement": "All five core capabilities required",
      "text": "A release is permitted only when every one of the five authorized core capabilities passes.",
      "measure": "Core capabilities required",
      "measureText": "Passing core capabilities the policy requires before permit.",
      "threshold": 5
    },
    {
      "characteristic": "Security",
      "subcharacteristic": "Integrity",
      "requirement": "No ineligible release permitted",
      "text": "No moving, incomplete, unauthorized or misdirected release is permitted.",
      "measure": "Ineligible permits",
      "measureText": "Acceptance vectors with an ineligible release answered permit.",
      "threshold": 0
    }
  ],
  "journeys": [
    {
      "stakeholder": "Portal publisher",
      "steps": [
        "REQ-001",
        "REQ-002",
        "REQ-003",
        "REQ-006",
        "otherwise"
      ]
    },
    {
      "stakeholder": "Foundry owner",
      "steps": [
        "REQ-004",
        "REQ-005",
        "INV-001",
        "INV-002",
        "INV-003",
        "refuse"
      ]
    }
  ],
  "concerns": [],
  "license": "MIT OR Apache-2.0",
  "axioms": {}
}
```

## Claims

- FW-01: The app never answers permit when capabilities is below 5
- FW-02: The app never answers permit when reference is moving
- FW-03: The app never answers permit when stage is ready
- FW-04: The app always answers not-applicable when producer is other
- FW-05: The architecture description declares every stakeholder, concern, component, edge, viewpoint and view it references
- FW-06: The ISO/IEC 25010 quality model numbers every characteristic, subcharacteristic, requirement and measure, and every parent it names is declared
- FW-07: Every compliance obligation is numbered in order and names its evidence

## Pattern

Policy decision: OASIS XACML 3.0 policy decision point. The answer is one XACML 3.0 decision: permit, deny, not-applicable, indeterminate. A policy that applies gives permit or deny. If none applies, the answer is not-applicable. If the request cannot be judged, it is indeterminate.

| Pattern | Standard | Answers |
| --- | --- | --- |
| Policy decision | OASIS XACML 3.0 policy decision point | permit, deny, not-applicable, indeterminate |

**Figure: Rules for each answer.** Each bar counts the rules that give one answer. When no rule matches, the answer is permit.

|  | rules |
| --- | --- |
| permit | 0 |
| deny | 4 |
| not-applicable | 1 |
| indeterminate | 1 |

## Behavior

A request is producer, reference, capabilities, stage, target, separated by spaces. The first rule that matches decides. If none matches, the answer is permit. A request over 136 bytes, or in any other form, is answered invalid.

| Rule | When | Answer | Why |
| --- | --- | --- | --- |
| REQ-001 | producer is other | not-applicable | SPEC.md Ownership: foundry-web publishes only the uor-foundry platform; it is not a second application model |
| REQ-002 | producer is unverifiable | indeterminate | SPEC.md Release boundary: verify producer identity independently; a signed SDK or valid digest alone does not establish it |
| REQ-003 | reference is moving | deny | SPEC.md Release boundary: acquire an exact verified release, not a moving branch, tag, build directory or unchecked workflow artifact |
| REQ-004 | capabilities is below 5 | deny | SPEC.md Authorized initial scope: all five core capabilities must pass; reject incomplete stage capabilities and draft previews |
| REQ-005 | stage is ready | deny | SPEC.md Release boundary: producer-ready precedes a separately authorized deployment |
| REQ-006 | target is unapproved | deny | SPEC.md Publication acceptance: reject unauthorized targets; authorization binds the exact origin and subpath |
| otherwise | no rule matches | permit | SPEC.md: an exact verified uor-foundry release of the complete authorized core stage, deployment-authorized, to its approved target |

## Properties Lean proves

Each property is a theorem about the same definitions the app is built from. It is proved for every request, not only the tested ones.

| Property | Statement | Theorem | Why |
| --- | --- | --- | --- |
| INV-001 | It never answers permit when capabilities is below 5. | FoundryWebPublicationProofs::inv001Holds | a mock, draft preview or incomplete stage is not an eligible release |
| INV-002 | It never answers permit when reference is moving. | FoundryWebPublicationProofs::inv002Holds | only exact verified releases are published |
| INV-003 | It never answers permit when stage is ready. | FoundryWebPublicationProofs::inv003Holds | deployment needs its own authorization |
| INV-004 | It always answers not-applicable when producer is other. | FoundryWebPublicationProofs::inv004Holds | another producer's release is outside this publisher's policy |

## Architecture

Stakeholders and the concerns each one views the app through (ISO/IEC/IEEE 42010).

| Stakeholder | Who they are | Concerns |
| --- | --- | --- |
| Foundry owner | Authorized the first functional release and needs no draft, incomplete or unauthorized stage presented as it. | Proved guarantees, Integrity of the published app |
| Portal publisher | Runs the foundry-web Pages workflow and needs it to deploy only verified, authorized producer bytes without rebuilding them. | Correct answers, Proved guarantees |
| Verifier | Anyone who loads the holo, checks its fingerprint and replays its acceptance vectors before trusting an answer. | Integrity of the published app, Refused malformed requests, Proved guarantees |

## Concerns

What the stakeholders care about, and the model each is viewed in.

| Concern | What it means | Model |
| --- | --- | --- |
| Correct answers | Every well-formed request is answered by the first rule that matches it, or permit when none does, as the spec states. | quality |
| Integrity of the published app | What a visitor runs is the holo the build verified, with its fingerprint and signed provenance beside it. | security |
| Proved guarantees | Each of the 4 properties of the spec holds for every request, proved by the Lean kernel. | quality |
| Refused malformed requests | A request that is not the 5 fields in order, or is longer than 136 bytes, is answered invalid and never guessed. | security |

## Components

9 components and 13 edges between them.

| Component | Kind | What it is |
| --- | --- | --- |
| Browser | externalSystem | The visitor's web browser, which loads the page and runs the Portal publication guest. |
| Foundry Pages site | staticSite | The published portal at https://uor-foundation.github.io/foundry-web/. |
| GitHub Pages | externalSystem | Serves the page and the holo from the repository Pages workflow. |
| Portal publication guest | service | The Core-Wasm guest built from the model: it answers one request of at most 136 bytes with one answer of at most 64. |
| Portal publication page | staticSite | The page the template publishes: the holo, its fingerprint, its provenance and its acceptance vectors. |
| Prism build | cliAdapter | prismpm verify in the SDK image prismpm.lock pins: it checks every theorem, builds the guest and replays every vector. |
| PrismPM SDK | cliAdapter | The locked SDK that acquires the release and verifies its integrity, identity and evidence. |
| Source repository | externalSystem | The repository that holds the prompt, the model and its gate. |
| uor-foundry release | externalSystem | The producer repository's exact verified portal release and its evidence. |

## Design views

The SDK checks each view against the system model and draws it as OPL and PlantUML.

| View | Diagram | Viewpoint |
| --- | --- | --- |
| Deciding a Portal publication request | opmObjectProcess | Portal publisher: Correct answers |
| Components of Portal publication | umlComponent | Foundry owner: Integrity of the published app |
| Answering a Portal publication request | umlSequence | Portal publisher: Correct answers |
| States of the Portal publication guest | umlStateMachine | Verifier: Refused malformed requests |

## Features and journeys

12 features. Each names the definitions that do the work and the tests that accept it. Each stakeholder has one journey.

| Feature | Calls | Accepted by |
| --- | --- | --- |
| When producer is other, the answer is not-applicable. | FoundryWebPublication::rule1, FoundryWebPublication::judge | FoundryWebPublication::application |
| When producer is unverifiable, the answer is indeterminate. | FoundryWebPublication::rule2, FoundryWebPublication::judge | FoundryWebPublication::application |
| When reference is moving, the answer is deny. | FoundryWebPublication::rule3, FoundryWebPublication::judge | FoundryWebPublication::application |
| When capabilities is below 5, the answer is deny. | FoundryWebPublication::rule4, FoundryWebPublication::judge | FoundryWebPublication::application |
| When stage is ready, the answer is deny. | FoundryWebPublication::rule5, FoundryWebPublication::judge | FoundryWebPublication::application |
| When target is unapproved, the answer is deny. | FoundryWebPublication::rule6, FoundryWebPublication::judge | FoundryWebPublication::application |
| When no rule matches, the answer is permit. | FoundryWebPublication::judge | FoundryWebPublication::application |
| A request that is not producer, reference, capabilities, stage, target in order, separated by single spaces, or is over 136 bytes, is answered invalid. | FoundryWebPublication::dispatch, FoundryWebPublication::decodeField1 | FoundryWebPublication::application |
| It never answers permit when capabilities is below 5. | FoundryWebPublication::judge | FoundryWebPublicationProofs::inv001Holds |
| It never answers permit when reference is moving. | FoundryWebPublication::judge | FoundryWebPublicationProofs::inv002Holds |
| It never answers permit when stage is ready. | FoundryWebPublication::judge | FoundryWebPublicationProofs::inv003Holds |
| It always answers not-applicable when producer is other. | FoundryWebPublication::judge | FoundryWebPublicationProofs::inv004Holds |

## Journeys

The ordered features each stakeholder takes.

| Stakeholder | Steps |
| --- | --- |
| Foundry owner | REQ-004 → REQ-005 → INV-001 → INV-002 → INV-003 → refuse |
| Portal publisher | REQ-001 → REQ-002 → REQ-003 → REQ-006 → otherwise |
| Verifier | refuse → INV-001 → INV-002 → INV-003 → INV-004 |

## Security and threat model

14 threats against 4 assets. Each has a STRIDE category, and either a control with evidence or a risk that is accepted on purpose.

| Threat | STRIDE | Asset | Risk | Answered by |
| --- | --- | --- | --- | --- |
| Answer that breaks INV-001 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-001: proof FoundryWebPublicationProofs::inv001Holds |
| Answer that breaks INV-002 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-002: proof FoundryWebPublicationProofs::inv002Holds |
| Answer that breaks INV-003 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-003: proof FoundryWebPublicationProofs::inv003Holds |
| Answer that breaks INV-004 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-004: proof FoundryWebPublicationProofs::inv004Holds |
| Deployment before authorization | elevationOfPrivilege | Answer | low likelihood, major impact | Authorized stage only: proof FoundryWebPublicationProofs::inv003Holds |
| Draft preview published as the core release | tampering | Answer | medium likelihood, critical impact | Complete stage only: proof FoundryWebPublicationProofs::inv001Holds; review UOR-Foundation/foundry-web SPEC.md Authorized initial scope |
| Granted capability | informationDisclosure | Answer | low likelihood, major impact | No capability granted: gate prism-code check refuses an ungranted guest import |
| Live checks skipped after deployment | repudiation | Published holo | medium likelihood, major impact | accepted: The app decides whether to publish; post-deployment verification of the live URL and journeys is a separate foundry-web gate it does not replace. |
| Malformed request | tampering | Request bytes | high likelihood, major impact | Strict decoder: gate malformed-request acceptance vectors, replayed in the compiled guest by prismpm verify |
| Moving reference substituted | spoofing | Model source | medium likelihood, major impact | Exact release only: proof FoundryWebPublicationProofs::inv002Holds |
| Oversized request | denialOfService | Request bytes | medium likelihood, minor impact | Bounded request: gate acceptance vectors at the request bound, one byte over it, and at the guest allocation bound, replayed by prismpm verify |
| Substituted holo | spoofing | Published holo | low likelihood, critical impact | Fingerprint and provenance: gate actions/attest-build-provenance in the pages workflow; gate prism-code check of the holo identities in the page |
| Substituted host | spoofing | Published holo | low likelihood, critical impact | accepted: A page cannot defend against its own host. The holo carries signed build provenance a visitor can check, and the app can be rebuilt from its prompt. |
| Tampered model | tampering | Model source | low likelihood, major impact | Regenerated from the prompt: gate prismpm verify in the SDK image prismpm.lock pins; review app/prompt.json |

## Quality

ISO/IEC 25010:2023 requirements. Each has a measure and a threshold that a theorem pins.

| Requirement | Characteristic | Measure | Threshold |
| --- | --- | --- | --- |
| All five core capabilities required: A release is permitted only when every one of the five authorized core capabilities passes. | Functional suitability: Functional correctness | Core capabilities required | 5 |
| Bounded allocation: The guest allocates at most 272 bytes for one request. | Performance efficiency: Resource utilization | Guest allocation bytes | 272 |
| Bounded request: A request over 136 bytes is refused before any field is read. | Performance efficiency: Time behaviour | Request bytes read | 136 |
| Every property proved: All 4 properties are theorems the Lean kernel checks. | Security: Integrity | Unproved properties | 0 |
| Every request answered: Every request gets an answer: a rule, permit otherwise, or invalid. | Functional suitability: Functional completeness | Unanswered requests | 0 |
| Every vector replays: All 46 acceptance vectors replay in the compiled guest, the shortest 0 bytes long. | Reliability: Faultlessness | Failed vectors | 0 |
| Examples answered as stated: Every one of the 8 examples of the spec is answered as it states. | Functional suitability: Functional correctness | Example mismatches | 0 |
| No ineligible release permitted: No moving, incomplete, unauthorized or misdirected release is permitted. | Security: Integrity | Ineligible permits | 0 |

## Compliance

One obligation per standard, each naming its evidence.

| Standard | Subject | Evidence |
| --- | --- | --- |
| ISO/IEC/IEEE 42010:2022 | Architecture description | Architecture::architectureDescriptionHolds |
| ISO/PAS 19450:2015 and OMG UML 2.5.1 | Design views | Design::viewOpmDecide, Design::viewUmlComponents, Design::viewUmlRequest, Design::viewUmlStates |
| ISO/IEC 25010:2023 | Product quality | Quality::qualityModelHolds |
| ISO/IEC 27034-1:2011 and ISO/IEC 27005:2022 | Application security and risk | Security::controlSet |
| OASIS XACML 3.0 policy decision point | Policy decision | FoundryWebPublication::judge, FoundryWebPublication::encodeAnswer |
| OpenSpec | Requirements | FoundryWebPublication::application |
| SPDX MIT OR Apache-2.0 | Licensing | FoundryWebPublication::application |

## Rendered design views

Written by the SDK from the design records when it verified the app.

### design/Design.viewOpmDecide.opl

```
View: Design::viewOpmDecide
Title: Deciding a Portal publication request
Viewpoint: Architecture::viewpointPortalPublisherCorrectAnswers
Notation: ISO/PAS 19450:2015 OPM, Prism OPL profile

componentBrowser is an object.
componentPortalPublicationGuest is an object.
componentPortalPublicationGuest can be stateDeciding or stateIdle.
processDecide is a process.
processEncodeAnswer is a process.
processJudge is a process.
processParseRequest is a process.
componentPortalPublicationGuest handles processDecide.
processParseRequest requires componentBrowser.
processEncodeAnswer affects componentBrowser.
processJudge invokes processEncodeAnswer.
processParseRequest invokes processJudge.
processDecide zooms into processParseRequest, processJudge, and processEncodeAnswer, in that sequence.

```

### design/Design.viewUmlComponents.puml

```
@startuml
' UML 2.5.1 component diagram
' view: Design::viewUmlComponents
' viewpoint: Architecture::viewpointFoundryOwnerIntegrityOfThePublishedApp
title Components of Portal publication
component "componentBrowser" as c0
component "componentFoundryPagesSite" as c1
component "componentGitHubPages" as c2
component "componentPortalPublicationGuest" as c3
component "componentPortalPublicationPage" as c4
component "componentPrismBuild" as c5
component "componentPrismPMSDK" as c6
component "componentSourceRepository" as c7
component "componentUorFoundryRelease" as c8
c0 --> c3 : edgeBrowserToPortalPublicationGuest
c1 --> c3 : edgeFoundryPagesSiteToPortalPublicationGuest
c2 --> c0 : edgeGitHubPagesToBrowser
c3 --> c0 : edgePortalPublicationGuestToBrowser
c3 --> c1 : edgePortalPublicationGuestToFoundryPagesSite
c3 --> c6 : edgePortalPublicationGuestToPrismPMSDK
c3 --> c8 : edgePortalPublicationGuestToUorFoundryRelease
c4 --> c2 : edgePortalPublicationPageToGitHubPages
c5 --> c3 : edgePrismBuildToPortalPublicationGuest
c5 --> c4 : edgePrismBuildToPortalPublicationPage
c6 --> c3 : edgePrismPMSDKToPortalPublicationGuest
c7 --> c5 : edgeSourceRepositoryToPrismBuild
c8 --> c3 : edgeUorFoundryReleaseToPortalPublicationGuest
@enduml

```

### design/Design.viewUmlRequest.puml

```
@startuml
' UML 2.5.1 sequence diagram
' view: Design::viewUmlRequest
' viewpoint: Architecture::viewpointPortalPublisherCorrectAnswers
title Answering a Portal publication request
participant "componentBrowser" as p0
participant "componentPortalPublicationGuest" as p1
p0 -> p1 : processDecide
p1 --> p0 : processDecide
@enduml

```

### design/Design.viewUmlStates.puml

```
@startuml
' UML 2.5.1 state machine diagram
' view: Design::viewUmlStates
' viewpoint: Architecture::viewpointVerifierRefusedMalformedRequests
title States of the Portal publication guest
state "stateAnsweredDeny" as s0
state "stateAnsweredIndeterminate" as s1
state "stateAnsweredNotApplicable" as s2
state "stateAnsweredPermit" as s3
state "stateDeciding" as s4
state "stateIdle" as s5
state "stateRefused" as s6
[*] --> s5
s5 --> s4 : processParseRequest
s5 --> s6 : processParseRequest
s4 --> s2 : processRule1
s4 --> s1 : processRule2
s4 --> s0 : processRule3
s4 --> s0 : processRule4
s4 --> s0 : processRule5
s4 --> s0 : processRule6
s4 --> s3 : processOtherwise
s3 --> s5 : processEncodeAnswer
s0 --> s5 : processEncodeAnswer
s2 --> s5 : processEncodeAnswer
s1 --> s5 : processEncodeAnswer
s6 --> s5 : processEncodeAnswer
@enduml

```

## Prism source

Every file the builder wrote, laid out as a repository created from UOR-Foundation/template; the download prism-foundry-web-publication.zip has them all.

- app/src/Architecture.lex.tex (427 lines)
- app/src/Compliance.lex.tex (56 lines)
- app/src/Design.lex.tex (619 lines)
- app/src/Features.lex.tex (144 lines)
- app/src/Quality.lex.tex (368 lines)
- app/src/Security.lex.tex (635 lines)
- app/src/FoundryWebPublication.lex.tex (275 lines)
- app/src/FoundryWebPublicationProofs.lex.tex (169 lines)
- app/lexlean.toml (43 lines)
- app/prompt.json (375 lines)
- model/ids.toml (65 lines)
- features/suites/foundry\_web\_publication.feature (44 lines)
- crates/conformance/tests/foundry\_web\_publication.rs (132 lines)
- site/app.json (114 lines)
- openspec/specs/foundry-web-publication/spec.md (197 lines)
