Skip to main content

Session Ontology

Network Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 11 November 2026
Audio Overview
SEMANTIC LIBRARY — SESSION ONTOLOGY
FLOW ALGEBRA v1.0 | NETWORK ENTITIES

AUTHORS: Mark Anthony Higgins — Sky Recursive AI
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/computational-entities/network-entities/session-ontology.html
SOURCE PAGE: Session Ontology; revised 03 August 2026.
STATUS: Constructed topic-level Flow Algebra mapping. The full embedded specification was not accessible in the retrieved page text; this is not a verbatim reproduction.

1. PURPOSE
Represent the identity, establishment, continuity, security, state transitions, termination and observable behaviour of a network/application session. Distinguish an application session from an underlying TCP connection: a session may span multiple transport connections, and a transport connection need not imply an authenticated session.

2. HST STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t = observed session identifiers, peer attributes, protocol messages, timestamps, authenticated principal (if any), transport state, stored context.
R_t = session lifecycle, authentication, expiry, ordering, integrity, authorisation and protocol transition rules.
B_t = trust boundary, timeout, capacity, confidentiality, permitted operations and failure conditions.
K_t = known protocol semantics, verified credentials, configuration, prior authorised state and provenance.

3. ENTITY GRAPH
Session --has_identifier--> SessionIdentifier
Session --has_endpoint--> Endpoint
Session --uses_protocol--> Protocol
Session --may_bind_to--> TransportConnection
Session --has_state--> SessionState
Session --may_have_principal--> AuthenticatedPrincipal
Session --has_context--> SessionContext
Session --governed_by--> SessionPolicy
Session --produces--> SessionEvent
Session --expires_at--> ExpiryTime
Session --has_provenance--> AuditRecord

4. STATE DOMAIN
Q = {NEW, NEGOTIATING, ACTIVE, SUSPENDED, EXPIRING, CLOSED, FAILED}
State is protocol-specific; not every protocol uses every state.

5. FLOW ALGEBRA
E_t = expand(I_t, R_t)
V_t = {x in E_t | valid(x, B_t, K_t)}
x*_t = argmax_{x in V_t} P(x | I_t, R_t, B_t, K_t)
I_(t+1) = update(I_t, x*_t, observation_(t+1))
S_(t+1) = (I_(t+1), R_(t+1), B_(t+1), K_(t+1))
If V_t is empty, transition to an explicitly defined reject/failure path; do not fabricate a permissible action.

6. TRANSITION RELATION
NEW -> NEGOTIATING: initiate_session and admission_allowed
NEGOTIATING -> ACTIVE: negotiation_complete and required_authentication_satisfied
NEGOTIATING -> FAILED: handshake_error or rejected_credentials
ACTIVE -> SUSPENDED: permitted_pause or transient_disconnection
SUSPENDED -> ACTIVE: valid_resume_token and resume_policy_satisfied
ACTIVE -> EXPIRING: timeout_threshold_reached or renewal_required
EXPIRING -> ACTIVE: authorised_renewal_completed
{ACTIVE, SUSPENDED, EXPIRING} -> CLOSED: logout or orderly_termination
{NEW, NEGOTIATING, ACTIVE, SUSPENDED, EXPIRING} -> FAILED: fatal_protocol_error or revoked_session
{CLOSED, FAILED} -> ACTIVE: prohibited without new establishment and fresh validation

7. SESSION ESTABLISHMENT PATHWAY
Input: request, endpoint, policy, credentials_if_required.
Validate request syntax and protocol compatibility.
Check admission and resource limits.
Negotiate required parameters and security protections.
Authenticate principal if required by policy.
Generate or validate a collision-resistant session identifier appropriate to the threat model.
Bind session context to permitted identity and endpoints.
Set expiry and audit metadata.
Emit ACTIVE only after all mandatory guards pass.

8. SESSION PROCESSING PATHWAY
For each incoming message m:
  resolve session identifier;
  verify session exists and is ACTIVE;
  check expiry, revocation, message integrity and applicable anti-replay policy;
  authorise operation against principal and session scope;
  apply protocol transition atomically where required;
  update activity time and audit trail;
  return allowed response or explicit error.

9. INFERENCE RULES
IF session_state = CLOSED THEN reject reuse of its old authorisation context.
IF now >= expiry_time THEN session is not authorised until valid renewal.
IF credentials_revoked THEN invalidate dependent authenticated session state.
IF identifier_unrecognised THEN do not reveal protected session context.
IF sequence_check_required AND sequence_invalid THEN reject or recover per protocol.
IF transport_connection_lost THEN do not assume application session is terminated unless policy says so.
IF session_token_rotated THEN invalidate previous token according to rotation policy.
IF peer_changed THEN reassess binding and risk under explicit mobility policy.

10. MINI RECURSION ENGINE
F(S_t, event_t, depth):
  if depth >= max_depth: return BOUNDED_STOP
  if terminal(S_t): return S_t
  candidates = expand(event_t, R_t)
  admissible = filter(candidates, B_t, K_t)
  if admissible is empty: return REJECT_OR_FAIL
  selected = select(admissible, evidence, policy)
  next_state = validated_transition(S_t, selected)
  if no further event is available: return next_state
  return F(next_state, next_event, depth + 1)
The recursion is a conceptual state-transition model, not a claim that every session implementation is recursive.

11. INVARIANTS AND GUARANTEES
Session identifiers must not confer privileges without required verification.
No state transition may bypass mandatory authentication or authorisation guards.
Closed or revoked sessions cannot perform protected operations.
Each accepted event must have a permitted transition or an explicit no-op.
Confidentiality, integrity and availability depend on actual implementation and protocol; they are not guaranteed by this ontology alone.
Termination is guaranteed for the bounded abstract recursion above, not for arbitrary live network sessions.

12. TRI-MAPPING
Entity: Session -> State: SessionState -> Operation: transition(event)
Entity: Principal -> Rule: authorisation_policy -> Result: permitted/rejected
Entity: SessionIdentifier -> Rule: lookup_and_validation -> Result: resolved/unresolved
Entity: ExpiryTime -> Rule: time_guard -> Result: active/expired
Entity: AuditRecord -> Rule: provenance_capture -> Result: traceable_event

13. EXAMPLE
A client presents a valid session identifier and requests a protected operation.
The server resolves the session, checks ACTIVE state, expiry, revocation, integrity and authorisation, then processes or rejects the request. A valid identifier by itself is not proof of authorisation.

14. AI SEARCH FLOW / SEMANTIC EQUIVALENCE
Canonical entity: Network Session
Related terms: application session, protocol session, authenticated session, session context, session lifecycle.
Non-equivalent terms: TCP connection, socket, network packet, login credential.
Query intent: define, establish, validate, resume, expire, revoke, audit and terminate sessions.

15. PROVENANCE AND UPDATE MODEL
CITATION_BACKLINK: https://kirethresearch.org/booksai-core/entity-graph/computational-entities/network-entities/session-ontology.html
VERSION: 1.0
DATE_CREATED: 2026-11-11
FLOW_HASH: compute from final published bytes if integrity tracking is required; not asserted here.
UPDATE_MODEL: Revalidate transitions and security guards whenever the source ontology or supported protocol assumptions change.
LICENCE NOTE: Refer to the source website for the applicable Open Research Licence and attribution terms.
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ