🦚 Peacock Unified

🏗️ App Invariants

Layer 2 — application architecture · 1,820 documents

IDDocumentSource
app_invariants__5231f95c0a2201b9INVARIANT: Sleeping bodies, when `enableSleeping` is true, are optimized by ceasing updates when their motion falls below a threshold (`sleepThreshold`). SHADOW: A sleeping body will not be updated…—
app_invariants__f2f8b2dfd611133dINVARIANT: The `Engine.update` method is the sole mechanism for advancing the physics simulation step. SHADOW: Skipping `Engine.update` calls or providing invalid delta values will desynchronize the…—
app_invariants__61874a057899715dINVARIANT: Visual transform components (scrollFactor) are decoupled from physics engine calculations. SHADOW: Physics engines resolve collision manifolds using world-space coordinates. ScrollFactor…—
app_invariants__03390cf8770e1e1cINVARIANT: Shader execution blocks the main pipeline and halts render batching. SHADOW: Shaders in the display list trigger an immediate pipeline flush to establish a discrete render viewport. This…—
app_invariants__82af1309e1092917INVARIANT: Context restoration must reset pipeline states and re-sync uniforms. SHADOW: WebGL context loss erases all GPU buffers and shader programs. State recovery (`onContextRestored`) is…—
app_invariants__1409bda0b6d075d7INVARIANT: Temporal Mutation Deferral via Process Queues SHADOW: System state changes (addition/removal of Game Objects) are cached in pending lists to prevent 'Concurrent Modification' artifacts…—
app_invariants__30aaf220fedea57aINVARIANT: Deterministic Logic via Fixed-Step Time Normalization SHADOW: Under heavy CPU pressure or frame drops, the system enforces a fixed update time-step or applies lag-smoothing (lagSkip).…—
app_invariants__ead9919ca21d3f54INVARIANT: 32-Bit Categorical Collision Filtering SHADOW: Collision interaction logic is strictly limited to 32 discrete categories using bitwise masks. This enforces an O(1) complexity check for…—
app_invariants__e49e348da40c76fcINVARIANT: WebGL Pipeline State Isolation SHADOW: The system mandates a 'Flush and Rebind' protocol when swapping between internal rendering pipelines or handing control to 3rd party contexts (like…—
app_invariants__dc7587b431b3bad8INVARIANT: Singular Framebuffer Snapshot Exclusivity SHADOW: Only one snapshot request can be fulfilled per frame boundary. This constraint protects the system from GPU-to-CPU bandwidth exhaustion,…—
app_invariants__f5035f4a6e98fcaeINVARIANT: Drag-Acceleration Mutual Exclusivity SHADOW: The Arcade Physics simulation enforces that 'Drag' (deceleration) is only calculated when the active 'Acceleration' for that axis is exactly…—
app_invariants__5640e279c6658664INVARIANT: The OpenID Connect client configuration must be fetched only once and cached for subsequent use. Concurrent requests must not re-fetch. SHADOW: Critical for performance and preventing…—
app_invariants__3c8316829a42faa4INVARIANT: The refresh token response must be cached for a short, fixed duration to prevent redundant network requests. SHADOW: Ensures efficient token refresh operations by preventing multiple…—
app_invariants__805bfd03b45a187fINVARIANT: The PKCE code challenge verification must be performed by comparing the calculated challenge against the stored challenge derived from the initial authorization request. SHADOW: Ensures…—
app_invariants__c98bbca629015e2bINVARIANT: The ID token validation must include verification against the previously stored nonce value. SHADOW: Prevents replay attacks by ensuring that the ID token received corresponds to a…—
app_invariants__5343be85e5b2d5f4INVARIANT: If ID token claims verification fails, the OpenID Connect client cache must be invalidated. SHADOW: Ensures that if token validation fails due to issues with the ID token claims (e.g.,…—
app_invariants__bd67ca353986cbe5INVARIANT: The refresh token exchange operation must be idempotent by leveraging a cache with a time-to-live. SHADOW: Allows for safe retries of the refresh token exchange process. If multiple…—
app_invariants__dc61a6f70299a05eINVARIANT: A missing or invalid URL for the token endpoint or user info endpoint must result in an immediate failure to initialize the OIDC client. SHADOW: Guarantees that critical endpoints…—
app_invariants__163b7f66f5da5557INVARIANT: The `CLIENT_CACHE_KEY` must be a constant string to ensure consistent lookup for the cached OIDC client. SHADOW: Ensures that the cache mechanism reliably retrieves the OIDC client…—
app_invariants__719c0b67e2187c84INVARIANT: The HTTP client must be configured to disallow automatic redirection to prevent potential security vulnerabilities and unexpected behavior during OIDC flows. SHADOW: Disabling redirects…—
app_invariants__37a21d1a937f83d1INVARIANT: ID_BASED_REHYDRATION_PERSISTENCE SHADOW: State preservation for complex UI elements (like child rows) must be mapped to unique entity IDs rather than DOM indices or pointers to ensure…—
app_invariants__5c8c3615f32b9dbbINVARIANT: DEBOUNCED_I_O_SYNCHRONIZATION SHADOW: High-frequency state mutations must be funneled through a throttle or debounce mechanism to prevent I/O saturation and redundant persistence cycles…—
app_invariants__1a116dbac1028fd7INVARIANT: ACTIVE_REQUEST_TERMINATION_ON_RELOAD SHADOW: Before initiating a new asynchronous data fetch, any pending requests on the same context must be explicitly aborted to neutralize race…—
app_invariants__b9ba2da245431913INVARIANT: UPGRADE_HEADER_EXCLUSIVITY SHADOW: Protocol upgrade requests (WebSockets) must trigger an immediate purge of restrictive security headers (X-Frame, Permissions-Policy) to prevent…—
app_invariants__d47eea4390bf55fcINVARIANT: LINEAR_BACKOFF_TRANSIENT_RESILIENCE SHADOW: Database connectivity attempts must utilize a loop-based retry with forced thread sleep to survive transient infrastructure drops without…—
app_invariants__28eeb1bb44f516fdINVARIANT: HARDCODED_NETWORK_BOUNDARY_VALIDATION SHADOW: Classification of IP addresses (Global vs. Local) must rely on hardcoded range-check logic to ensure deterministic security routing…—
app_invariants__185736698f3ca3d0INVARIANT: PRE_EXISTENCE_PROTECTED_WRITE SHADOW: File persistence operations must verify 'if_not_exists' flags before committing streams to storage to prevent accidental data corruption or loss…—
app_invariants__b5375b3ac656a7b9INVARIANT: Task Lifecycle Atomicity SHADOW: The architecture enforces a strict state synchronization requirement between the external application lifecycle (Active/Background) and internal…—
app_invariants__70883ec50a48ae3cINVARIANT: GRPC Log-Driver Isolation SHADOW: Global state contamination is neutralized by decoupling the internal GRPC logger from the default stdout/stderr streams. By replacing the global GRPC…—
app_invariants__7e13e80bec2cd7f2INVARIANT: Lazy Client Connection Throttling SHADOW: The system utilizes lazy gRPC clients and buffered listeners to bridge internal services. This prevents connection exhaustion under heavy load by…—
app_invariants__eeb685505d2df233INVARIANT: Lifecycle Event Propagation SHADOW: State consistency across the bridge requires explicit handler registration. The invariant is that the lifecycle manager acts as the source of truth for…—
app_invariants__0691b874f2dc989cINVARIANT: Pagination must preserve causal or temporal sequence via opaque references (CIDs) and fixed-size boundaries. SHADOW: The system relies on content-addressed identifiers to maintain a…—
app_invariants__b09b79bd261e4244INVARIANT: Interaction operations must be keyed by unique Content Identifiers (CIDs) to ensure safe retries in unreliable network environments. SHADOW: In a distributed, peer-to-peer system,…—
app_invariants__feb22c0d913b58d5INVARIANT: Encrypted link structures must maintain strict metadata-to-payload integrity through deterministic field binding. SHADOW: BertyLinks encapsulate complex authentication and group…—
app_invariants__4f5a25c1a08e1decINVARIANT: All incoming HTTP request bodies MUST be strictly unmarshalled into their corresponding, predefined Protobuf request structures. SHADOW: Failure to deserialize an incoming request…—
app_invariants__64d826dc37712488INVARIANT: Every service operation MUST propagate and respect `context.Context` cancellation signals and deadlines. SHADOW: Ignoring contextual cancellation or deadlines can lead to resource leaks…—
app_invariants__a6cb2548e2beef16INVARIANT: Cryptographically protected BertyLink objects MUST maintain integrity through symmetric encryption using a passphrase-derived key, a unique nonce, and a verification checksum. SHADOW:…—
app_invariants__e0c8803e1cd3d7baINVARIANT: Verification codes MUST be deterministically generated using a cryptographically secure HMAC-SHA256 function based on a static secret and unique transaction parameters. SHADOW:…—
app_invariants__a6d09cc9bd2ebe5fINVARIANT: The verifiable credential challenge-response flow MUST utilize anonymous authenticated encryption for challenge confidentiality and Ed25519 signatures for client authenticity and challenge…—
app_invariants__2536dddcf36a0c05INVARIANT: All verifiable credential challenges and issued proofs MUST be strictly time-bound, with checks for `Issued` and `Expired` timestamps. SHADOW: Unlimited validity periods for challenges…—
app_invariants__73e3828d416cbddcINVARIANT: Directory service records MUST enforce uniqueness per identifier, and any update or overwrite MUST adhere to explicit flags and time-based lock periods. SHADOW: Allowing conflicting…—
app_invariants__a064e372988c7102INVARIANT: Registered verifiable credentials MUST be validated against a predefined list of trusted issuers, and their internal content (e.g., subject, ID) MUST cryptographically correspond to the…—
app_invariants__3bf4183726806922INVARIANT: Directory service record tokens and unregister tokens MUST be globally unique, generated using UUIDv4 or cryptographically secure nonces. SHADOW: Non-unique or predictable tokens for…—
app_invariants__000138d8e9597ba8INVARIANT: The system MUST continuously attempt peer discovery via mDNS whenever network connectivity is active, and gracefully restart the discovery service upon network state changes. SHADOW:…—
app_invariants__215d6d12103a69a9INVARIANT: Destructive Schema Migration with State Injection SHADOW: When automatic schema updates fail (non-additive changes), the system must extract critical volatile state, purge the physical…—
app_invariants__4307d94aba8f21f8INVARIANT: Conflict-Ignorant Entity Upsertion SHADOW: Creation of members, devices, and interactions must use OnConflict DO NOTHING or explicit double-checks to survive a distributed replication log…—
app_invariants__a6fb36e9851eec59INVARIANT: Ephemeral-to-Persistent Log Supersession SHADOW: Data received via unreliable push notifications (OutOfStoreMessage) must be force-replaced by synchronized log data once available. The…—
app_invariants__2a305c02c01016c2INVARIANT: Post-Commit Action Propagation SHADOW: Actions dependent on successful DB persistence must be queued as 'PostActions' within the transaction wrapper. This ensures side effects (like…—
app_invariants__2b9942b6a78e65cfINVARIANT: Single-Pipe Connection Serialization SHADOW: SQLite connection pools must be restricted to MaxOpenConns=1 to neutralize database-level race conditions and 'database is locked' errors…—
app_invariants__ae0da699c4bd8538INVARIANT: When the raw data collection changes, any derived, filtered, or aggregated view of that data MUST be re-evaluated and synchronized. SHADOW: This rule prevents stale UI rendering,…—