Repository navigation
Conversation
Route validated SignalR packets through the default Client and Upgrade pipelines, preserving scoped tenant context and installation IPC. Exercise real listener and updater processes, and publish/run Native AOT in CI. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved authentication, certificate-policy, and header-handling defects can block push updates, while incorrect updater-launch tracking, archive cleanup, and test-host resolution introduce additional reliability and verification gaps.
6 open issues
Apply SSL validation policy before starting push listener · New Stop push scheduling only after updater launch succeeds · New Apply content headers to request content headers · New Apply configured authentication to ValidatePush requests · New Clean up downloaded archive after validation rejection · New Resolve smoke-test host using the active configuration · New
What changed in this PR
Adds default-off SignalR scheduling to the existing Client bootstrap, extending push packet reporting with automatic update processing and fresh server eligibility checks.
Changes:
- Adds bounded, serialized push processing with package eligibility checks and updater handoff.
- Revalidates before download and extraction, carrying local credentials, tenant headers, and validation data through IPC.
- Adds real SignalR/process tests, Windows/Linux Native AOT CI coverage, and integration documentation. Native CI results remain pending.
| File | Description |
|---|---|
| tests/PushAotSmoke/Program.cs | Adds Client and updater process-host modes. |
| tests/CoreTest/Hubs/PushProcessIntegrationTests.cs | Tests automatic scheduling, validation, IPC, and receipts. |
| tests/CoreTest/CoreTest.csproj | References the process host and ASP.NET Core framework. |
| src/GeneralUpdate.Core/Strategy/UpdateStrategy.cs | Checks push IPC contracts and handles validation rejection. |
| src/GeneralUpdate.Core/Strategy/ClientStrategy.cs | Enforces push download constraints and handles apply outcomes. |
| src/GeneralUpdate.Core/Strategy/AbstractStrategy.cs | Handles final rejection without rollback or terminal receipts. |
| src/GeneralUpdate.Core/Pipeline/CompressMiddleware.cs | Revalidates push eligibility before extraction. |
| src/GeneralUpdate.Core/Network/PushValidationRejectedException.cs | Defines the final-validation rejection exception. |
| src/GeneralUpdate.Core/Network/PushValidationClient.cs | Implements fail-closed eligibility requests. |
| src/GeneralUpdate.Core/Network/PushHttpTransport.cs | Applies locally configured authentication and headers. |
| src/GeneralUpdate.Core/Network/HttpClientProvider.cs | Adds client creation without redirects or cookies. |
| src/GeneralUpdate.Core/JsonContext/PushPayloadJsonContext.cs | Adds generated validation JSON serialization. |
| src/GeneralUpdate.Core/Hubs/UpgradeHubService.cs | Supports explicit hub headers while preserving the constructor. |
| src/GeneralUpdate.Core/Hubs/PushUpdateListener.cs | Adds bounded queuing and serialized message handling. |
| src/GeneralUpdate.Core/Download/Reporting/IUpdateReporter.cs | Supports scoped report authentication and disposes responses. |
| src/GeneralUpdate.Core/Download/Executors/HttpDownloadExecutor.cs | Supports scoped download authentication. |
| src/GeneralUpdate.Core/Configuration/UpdateContext.cs | Carries push validation configuration and rejection state. |
| src/GeneralUpdate.Core/Configuration/PushValidationRequest.cs | Defines validation request and response models. |
| src/GeneralUpdate.Core/Configuration/ProcessContract.cs | Carries push validation data and headers through IPC. |
| src/GeneralUpdate.Core/Configuration/HubConfig.cs | Adds automatic push configuration options. |
| src/GeneralUpdate.Core/Configuration/ConfigurationMapper.cs | Maps validation settings and header snapshots into IPC. |
| src/GeneralUpdate.Core/Bootstrap/GeneralUpdateBootstrap.cs | Integrates opt-in push scheduling and installation-scoped IPC. |
| docs/core-execution-flow.md | Documents setup, validation behavior, and operational limits. |
| .github/workflows/push-aot.yml | Configures Windows/Linux native process-test execution. |
Review effort: Balanced
Comment on lines
+165
to
+166
| ApplyRuntimeOptions(); | ||
| await StartPushUpdatesAsync().ConfigureAwait(false); |
| { | ||
| ((ClientStrategy)configured).DownloadSource = source; | ||
| }).ConfigureAwait(false); | ||
| return strategy.HasPreparedClientUpdate; |
Comment on lines
+24
to
+29
| if (config.CustomHeaders == null) return; | ||
| foreach (var header in config.CustomHeaders) | ||
| { | ||
| request.Headers.Remove(header.Key); | ||
| request.Headers.Add(header.Key, header.Value); | ||
| } |
|
|
||
| try | ||
| { | ||
| PushHttpTransport.ApplyHeaders(config, request); |
Comment on lines
+288
to
+289
| if (!_configinfo.PushValidationRejected) | ||
| DeleteVersionZip(version); |
| Directory.CreateDirectory(Path.Combine(root, "updater")); | ||
| var host = Environment.GetEnvironmentVariable("GENERALUPDATE_PUSH_HOST_PATH") ?? | ||
| Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, | ||
| "..", "..", "..", "..", "PushAotSmoke", "bin", "Release", "net10.0", |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Safety status — DRAFT / NOT DEPLOYABLE for credential-bearing flow
The existing
EncryptedFileProcessContractProvideruses a public constant-derived AES key, fixed IV and deterministic file path. There is no demonstrated OS ACL enforcement, parent/child identity authentication, authenticated endpoint–tenant binding, tamper rejection or replay rejection. Selecting an installation directory and deleting a read file are not those guarantees. A local attacker can alter contract fields, including the validation switch. Tenant-header fixtures and different PIDs are not an authenticated handshake or production security evidence.Keep this PR draft. Published safety gate
528c5a51f896b86c97a8aa958cd5aefa9073e8f1rejects automatic configurations containing any CustomHeaders (including tenant headers), API Token or Basic credentials before listening. The mapper also refuses those exports, and the validated updater rejects credential-bearing contracts. The new header IPC propagation has been removed. Required local AppSecretKey is not exported in automatic IPC or used for automatic HTTP API authentication. Local downloads requiring tenant headers or authentication cannot use this automatic layer. The previous903a3838head is superseded and must not be used for credential-bearing integration. Secure transport requires a separate PR, not a self-declared security marker here. Old manual APIs are not secured by this gate.Safety refusal/export paths:
GeneralUpdateBootstrap.StartPushUpdatesAsync,ConfigurationMapper.MapToProcessContract,PushHttpTransportandUpdateStrategy.ExecuteAsync. Tests:ProcessContractTests.ValidatedPushContract_*andPushProcessIntegrationTests.CredentialBearingConfiguration_FailsClosedBeforeListening. The unchanged fixed-AES implementation is inIpc/IProcessInfoProvider.cs; it creates the directory but does not enforce ACLs or authenticate peers/messages.Scope
Independent default-off host integration on #547, base
justerzhu-push-client-record-integrationatc11b91210da25d010540312e6a519c676587a7ba. Relates to #319 and TSLH-Technology/GeneralSpace#328; the earlier manually wired harness did not exercise automatic scheduling or Client IPC.GeneralUpdateBootstrap.EnablePushUpdates(HubConfig)starts SignalR through the existing Client bootstrap instead of Verification polling. Defaults remain unchanged; bounded messages are serialized and Client handoff stops scheduling./Upgrade/ValidatePushbefore download and immediately before extraction in the existing OS pipeline, after hooks and hash checks. Require HTTP 2xx plus camelCasecode=200/body=true; missing data, HTTP/business errors, malformed responses and timeouts fail closed. Pass local Hub appKey, endpoint, recordId and original ZIP hash; do not borrow Verification IDs. Final rejection avoids file writes, rollback and terminal receipts.Verified evidence at published client 528c5a5
These results validate the limited credential-free fixture and refusal behavior, not production IPC permissions/authentication or a successful real GeneralSpace/MySQL deployment. Local native publishing is still unavailable without the Windows C++ linker; the native evidence is actual CI execution, not a local claim.
Pinned server: TSLH-Technology/GeneralSpace#338 at
51617d4342c94b44753498c295a2cac2b2d1fd6b. Do not add the withdrawn TTL. All non-success responses must be rejected.Final real cross-repository restricted test: The integration tester reports that fixed client
528c5a51f896b86c97a8aa958cd5aefa9073e8f1and server51617d4342c94b44753498c295a2cac2b2d1fd6bwere exercised in https://github.com/TSLH-Technology/GeneralSpace/actions/runs/45122963958 (completed/success). Actual SignalR automatic reception and first ValidatePush using recordId/appKey/hash returned HTTP 200 / code 200 / body true. Download without a tenant header returned HTTP 400TenantContextRequired, with MySQL status 3 (download failed); updater did not start, and there was no second validation or applied marker. Independent manual download using the correct tenant header returned 200 with matching hash; a wrong header returned 400. Neither manual header was injected into IPC. The tester also reports the real MySQL eligibility matrix and inactive-tenant store preconditions were exercised. This successful restricted test is not a full end-to-end pass or proof of secure IPC.The server owner confirmed an inactive header can remain unresolved on an anonymous request and reach the predicate (200/true); a resolved inactive tenant may instead be blocked by the activation filter, with cache effects, so 403 is not guaranteed. The predicate itself ignores the header; a tenant header is not authentication.
Remaining limits
Credential-bearing/tenant-header Local download integration remains blocked pending a separate secure channel. The eligibility tuple is not identity authentication or irrevocable authorization; freezing can race after the last check and server Report may overwrite state. One automatic listener per process is supported; do not run concurrent manual updates. Host identity, executable paths and lifecycle must be explicitly configured. Queue overflow is logged rather than durably replayed; reconnect exhaustion is not infinite recovery. Even credential-free fixture success does not prove safe production execution against local IPC attackers.