Skip to content

Commit 253ef7b

Browse files
committed
fix(installer): handle verified Cyberpunk entry and restored native runtimes
1 parent b81942a commit 253ef7b

7 files changed

Lines changed: 143 additions & 6 deletions

File tree

‎.github/workflows/aurora-hardening.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: New RC3.1 safety and clean-room suites (Windows PowerShell 5.1)
1717
shell: powershell
1818
run: |
19-
foreach ($name in @('Path_Safety','Fault_Matrix','Metadata_Fuzz','Scan_Performance','Batch_Entry','Package_Boundary','Package_Cleanroom','Install_Incident','Install_Entry','Extracted_Upgrade')) {
19+
foreach ($name in @('Path_Safety','Fault_Matrix','Metadata_Fuzz','Scan_Performance','Batch_Entry','Package_Boundary','Package_Cleanroom','Install_Incident','Install_Entry','Extracted_Upgrade','Field_Recovery')) {
2020
& powershell.exe -NoProfile -ExecutionPolicy Bypass -File ".\tests\Aurora_${name}_Tests.ps1"
2121
if ($LASTEXITCODE -ne 0) { throw "Hardening suite failed: $name" }
2222
}

‎dist/runtime_sync/Aurora_Common.ps1‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,15 @@ function Install-AuroraFile($Journal, [string]$JournalPath, [string]$Source, [st
383383
$entry = @($Journal.Entries | Where-Object { $_.TargetPath -ieq $Target } | Select-Object -First 1)
384384
if ($entry.Count -and $entry[0].Status -ne 'Restored') {
385385
$e = $entry[0]
386-
if ($current -ne $e.DeployedHash -and -not ($e.Status -eq 'Pending' -and $current -eq $e.BeforeHash)) {
386+
# Reuse a verified original backup after launcher restoration, never
387+
# arbitrary changes. This exception does not apply to core/Proxy files.
388+
$originalRuntime=($JournalPath -match '[\\/]RuntimeSync[\\/]manifest\.json$' -and
389+
-not $e.Created -and $e.BackupPath -and $current -eq $e.OriginalHash)
390+
if ($current -ne $e.DeployedHash -and -not ($e.Status -eq 'Pending' -and $current -eq $e.BeforeHash) -and -not $originalRuntime) {
387391
throw "游戏或用户已修改受管理文件,保留现状,请先处理恢复记录:$Target"
388392
}
389393
if ($e.BackupPath -and (-not (Test-Path -LiteralPath $e.BackupPath) -or (Get-AuroraHash $e.BackupPath) -ne $e.OriginalHash)) { throw '原版备份缺失或损坏,停止更新。' }
394+
if ($originalRuntime) { Write-Host "[已核对原版,重新同步] $Target" }
390395
} else {
391396
$backup = ''
392397
if ($current) {

‎dist/runtime_sync/Aurora_Installer.ps1‎

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,18 @@ function Test-AuroraNteCrashCompanion([string]$Path) {
6868
$name=[IO.Path]::GetFileName($Path)
6969
return ($known.ContainsKey($name) -and (Get-AuroraHash $Path) -eq $known[$name])
7070
}
71-
function Test-AuroraCandidateDirectory([string]$Root,[string]$Exe,[string]$Proxy='') {
71+
function Test-AuroraCyberpunkCrashCompanion([string]$Path) {
72+
# Audited field build: imports dbghelp/version, not dxgi; no delay imports.
73+
# This authorizes only the Cyberpunk2077/dxgi pair below, never arbitrary tools.
74+
return ([IO.Path]::GetFileName($Path) -ieq 'REDEngineErrorReporter.exe' -and
75+
(Get-AuroraHash $Path) -eq 'F3CBA8150CA66FBDF1FB8C8621BA6DB1257D2B644C65A58A2ADE01C687BB686A')
76+
}
77+
function Test-AuroraCandidateDirectory([string]$Root,[string]$Exe,[string]$Proxy='', $Rejections=$null) {
7278
if (-not (Test-AuroraWithin $Exe $Root)) { return $false }
7379
$relative=$Exe.Substring($Root.Length).TrimStart('\')
7480
if (Test-AuroraUtilityPath $relative) { return $false }
7581
$nte=($relative -match '(?i)(^|\\)HT\\Binaries\\Win64\\HTGame\.exe$')
82+
$cyberpunk=($relative -match '(?i)^bin\\x64\\Cyberpunk2077\.exe$')
7683
if ($nte -and $Proxy -and $Proxy -ine 'winmm.dll') { return $false }
7784
$guard=$null
7885
try {
@@ -82,12 +89,16 @@ function Test-AuroraCandidateDirectory([string]$Root,[string]$Exe,[string]$Proxy
8289
if (-not (Test-AuroraUtilityPath $other.FullName.Substring($Root.Length).TrimStart('\'))) { continue }
8390
if (-not (Get-AuroraExecutableEvidence $other.FullName).Valid) { continue }
8491
if ($nte -and (Test-AuroraNteCrashCompanion $other.FullName)) { continue }
92+
if ($cyberpunk -and (-not $Proxy -or $Proxy -ieq 'dxgi.dll') -and (Test-AuroraCyberpunkCrashCompanion $other.FullName)) { continue }
93+
if ($null -ne $Rejections) { $Rejections.Add([pscustomobject]@{Path=$Exe;Reason='与未验证的 x64 工具共用 Proxy 目录';Companion=$other.FullName}) | Out-Null }
8594
return $false
8695
}
8796
return $true
8897
} finally { if ($guard) { $guard.Dispose() } }
8998
}
9099
function Get-AuroraDeploymentCandidates($Scan) {
100+
$rejections=New-Object 'Collections.Generic.List[object]'
101+
$Scan | Add-Member NoteProperty CandidateRejections $rejections -Force
91102
$exes=@($Scan.Files | Where-Object { $_.Extension -ieq '.exe' })
92103
$directoryPolicy=@{}
93104
foreach ($f in $exes) {
@@ -96,7 +107,8 @@ function Get-AuroraDeploymentCandidates($Scan) {
96107
# Excluding a filename cannot prevent a colocated x64 utility loading a Proxy.
97108
$policyKey=$f.DirectoryName
98109
if ($rel -match '(?i)(^|\\)HT\\Binaries\\Win64\\HTGame\.exe$') { $policyKey+='|HTGame' }
99-
if (-not $directoryPolicy.ContainsKey($policyKey)) { $directoryPolicy[$policyKey]=Test-AuroraCandidateDirectory $Scan.Root $f.FullName }
110+
if ($rel -match '(?i)^bin\\x64\\Cyberpunk2077\.exe$') { $policyKey+='|Cyberpunk2077' }
111+
if (-not $directoryPolicy.ContainsKey($policyKey)) { $directoryPolicy[$policyKey]=Test-AuroraCandidateDirectory $Scan.Root $f.FullName '' $rejections }
100112
if (-not $directoryPolicy[$policyKey]) { continue }
101113
$evidence=Get-AuroraExecutableEvidence $f.FullName
102114
if (-not $evidence.Valid) { continue }
@@ -622,6 +634,10 @@ function Remove-AuroraDeployment($Index,[string]$ReportPath,[switch]$RuntimeOnly
622634
# Validate every backup before removing any tool. Changed targets are individually retained.
623635
foreach ($pair in $journals) {
624636
foreach ($e in @($pair.Journal.Entries)) {
637+
# A launcher may have restored a previously changed file. Settle
638+
# only the exact original; unknown changes remain preserved.
639+
if ($e.Status -eq 'Preserved' -and -not $e.Created -and
640+
(Test-Path -LiteralPath $e.TargetPath -PathType Leaf) -and (Get-AuroraHash $e.TargetPath) -eq $e.OriginalHash) { $e.Status='Restored' }
625641
if ($e.Status -in @('Restored','Preserved')) { if ($e.Status -eq 'Preserved') { $preserved+=@($e.TargetPath) }; continue }
626642
$current=''; if (Test-Path -LiteralPath $e.TargetPath) { $current=Get-AuroraHash $e.TargetPath }
627643
if ($current -ne $e.DeployedHash -and $current -ne $e.OriginalHash -and -not ($e.Status -eq 'Pending' -and $current -eq $e.BeforeHash)) {

‎dist/runtime_sync/Aurora_Setup.ps1‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
$exitCode=0; $session=New-AuroraReportSession; $report=$session.ReportPath
1111
try {
1212
$PackageDir=Get-AuroraPath $PackageDir; $InstallDir=Get-AuroraPath $InstallDir
13-
Write-Host "`n Aurora 安装器 RC3.1 · 重装修复版 20260914`n" -ForegroundColor Cyan
13+
Write-Host "`n Aurora 安装器 RC3.1 · 入口与恢复修复版 20260915`n" -ForegroundColor Cyan
1414
Write-Host ' 正在自动检测游戏…'
1515
if (-not $GameRoot -and ((Test-Path -LiteralPath (Join-Path $InstallDir 'OptiScaler\AuroraSetup\installation.json')) -or (Test-Path -LiteralPath (Get-AuroraIndexPath $InstallDir)))) {
1616
$GameRoot=Resolve-AuroraDeploymentRoot $InstallDir
@@ -46,9 +46,10 @@ try {
4646
foreach ($c in @($candidates | Select-Object -First 3)) { Write-Host (' '+$c.Path.Substring($GameRoot.Length).TrimStart('\')+' → '+(Get-AuroraRecommendedProxy @($c) $Proxy)) }
4747
if ($candidates.Count -gt 3) { Write-Host ' 其余入口见详细报告。' }
4848
if (-not $scan.Complete -or -not $candidates.Count) { Write-Host ' ! 当前不能安全安装;仍可选择恢复 / 卸载。' -ForegroundColor Yellow }
49+
if ($scan.CandidateRejections.Count) { Write-Host (' ! 共享目录保护拦截了 '+$scan.CandidateRejections.Count+' 个入口,具体工具见详细报告。') -ForegroundColor Yellow }
4950
Write-Host ' ✓ 自动匹配 Proxy,保留现有配置,替换前备份' -ForegroundColor Green
5051
Write-Host ' ! SL1 和未知 Runtime 保留;安装后请进游戏核对效果' -ForegroundColor Yellow
51-
Write-AuroraJson $report ([pscustomobject]@{GameRoot=$GameRoot;Candidates=$candidates;RuntimeGroups=@(Get-AuroraRuntimeGroups $scan $candidates)})
52+
Write-AuroraJson $report ([pscustomobject]@{GameRoot=$GameRoot;Candidates=$candidates;RejectedCandidates=@($scan.CandidateRejections.ToArray());RuntimeGroups=@(Get-AuroraRuntimeGroups $scan $candidates)})
5253
if (-not $NonInteractive) {
5354
while ($true) {
5455
Write-Host "`n [1 / Enter] 一键安装 / 更新`n [2] 修复 / 恢复 / 卸载`n [3] 高级工具与诊断`n [Q] 退出"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# 2077 / 异环实机安装失败 — 2026-09-15
2+
3+
本轮回到稳定安装器分支 `aurora-rc3-installer-20260913`,基线 b81942a4。独立 MFG 实验分支 031ccb7f / 功能9a7b0394保留,没有把核心修改合入稳定安装器。
4+
5+
## 实际原因与修复
6+
7+
1. 2077:真实 `bin/x64/Cyberpunk2077.exe` 是有效PE x64,旁边有Runtime。旧策略因同目录 `REDEngineErrorReporter.exe` 把整个目录排除,UI却只说未找到入口。现对严格路径、已核对报告器hash、dxgi组合放行;其他工具、未知报告器或其他Proxy仍阻止。报告新增RejectedCandidates/具体工具路径。真实只读扫描现选中一个Cyberpunk2077入口,未操作游戏。
8+
2. 异环截图所指报告30ad74681eaa484abe3ff08848f025fb:9份Runtime记录为Preserved,但实际文件已回到原始hash。Install-AuroraFile把这种“后来恢复了原版”与未知用户修改一并拒绝。现仅对Runtime journal、当前等于OriginalHash且原备份完整的情况允许重新同步,沿用原备份及write-ahead journal;不扩展到core/Proxy。Remove也能将已恢复原版的Preserved条目标记Restored,避免永远NeedsAttention。
9+
3. 后续只读现场另发现:异环总清单仍NeedsAttention,但47个原受管核心文件和两个journal已不存在;9个原生Runtime仍全部等于原始hash。这是不同于截图时的新状态,普通热修不能凭空还原丢失的ownership日志。已询问用户后续删除/修复过程;不自动清除总清单,不把报告快照冒充journal。
10+
11+
2077报告器 SHA256:F3CBA8150CA66FBDF1FB8C8621BA6DB1257D2B644C65A58A2ADE01C687BB686A。直接导入KERNEL32、USER32、ADVAPI32、dbghelp、VERSION、SHELL32、ole32;无delay imports。没有DXGI直接导入是窄兼容例外的静态依据,不证明任意动态加载或未来版本安全。该例外仅用于Cyberpunk2077/dxgi,禁止直接套用version/dbghelp。
12+
13+
## 验证
14+
15+
- 新增Field_Recovery:29项,Windows PowerShell5.1通过。覆盖工具指纹、Proxy边界、候选缓存隔离、完整冗余安装流程中的单目标、Applied/Preserved/Pending原版恢复后更新、备份丢失/损坏、用户改动保留、Remove→reinstall及core/Proxy不继承Runtime例外。
16+
- 修改影响的回归:Install_Incident49、实际CMD Install_Entry9、Fault_Matrix69通过。没有手动重跑旧81/41/50项套件。
17+
- 真实目录只读:2077唯一Cyberpunk2077;异环唯一HTGame。未部署、未启动游戏,不能当作真实注入或兼容性通过。
18+
- 新测试已加入现有hardening Actions;远端结果以提交后的实际运行记录为准。
19+
- 原始报告、文件对照和第三方审计位于本任务 `work/installer-incident-20260915/`;游戏日志不上传公开仓库。
20+
21+
## 单DLL方案核对与取舍
22+
23+
用户链接[v1.3.3](https://github.com/dashdogy/RTX40MFG-Unlock/releases/tag/v1.3.3)对应e13a9841733b0ae43b7215e8c51fe0eb3897816f。[构建说明](https://github.com/dashdogy/RTX40MFG-Unlock/blob/v1.3.3/BUILD.md)和[资源生成](https://github.com/dashdogy/RTX40MFG-Unlock/blob/v1.3.3/source/native/ampere_native_cache.cmake)显示:该版本将后端、UI及SM86内核fatbin资源集成;含针对310.9的kernel cache,不是完整nvngx_dlss/Streamline运行库内嵌。构建使用SL SDK2.14.1也不等于DLL内含SL2.14.1运行库。其游戏前提仍是已有Streamline FG集成,不能直接代替Aurora的多种FG输入路径。
24+
25+
可以借鉴资源内嵌与按hash识别provider,但当前没有移植其渲染hook或GPU内核。Aurora若把完整运行库放进资源,仍需设计释放到受控目录、版本目录隔离、校验/锁、加载路径、更新/卸载及崩溃恢复;把资源放进DLL不会自动让Windows把内嵌DLL按正常磁盘模块加载。单文件交付与运行时零外部文件是两件事。
26+
27+
建议后续先做单文件安装包/自解压交付,在内部继续使用已验证安装器与固定Runtime目录;通过实机后再独立实验评估DLL内嵌及私有Runtime加载。不能仅凭“不是SL1”就强制替换所有未知Runtime。巫师3也要区分原生SL1与Aurora自己使用的私有SL2:前者必须保留,后者服务OptiFG→DLSSG路径,不能因为游戏有SL1就整个禁用。
28+
29+
本轮未更改核心DLL或SL catalog(RC2既有包本身含2.14系列、少数组件版本不同,不能单凭统一版本号概括整套文件)。没有合并aurora或发布Release。

‎docs/CODEX_HANDOFF.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
## 当前停止点
66

7+
### 2026-09-15 2077 / 异环再次安装失败(最新优先级)
8+
9+
用户要求先处理新安装故障并评估单DLL交付。已保留MFG实验031ccb7f/9a7b0394,切回稳定安装器分支b81942a4继续;不要把实验核心合入安装器。详见 `AURORA_FIELD_INSTALL_20260915.md`。2077共享报告器误排除和异环Runtime恢复原版后Preserved不能重装已修;新增29项、相关49+9+69项通过。异环现场后来连47个受管核心文件/journal也已消失,总清单仍NeedsAttention;这与截图时不同,不能声称热修已自动解决丢失journal。真实游戏尚未部署/验证。本轮其他MFG/上游研究暂停。
10+
711
### 2026-09-15 动态 MFG / 6X 切换稳定复现(最新优先级)
812

913
用户提供五份Desktop日志,2与2.1完全重复。日志1/2明确DEVICE_HUNG;日志1有Present帧2323与Dispatch/constants帧210失配,日志2重启FG后立即报ReflexNotDetected;日志3结束紧邻nvlddmkm事件153,不能标通过;日志4对应PID47624游戏+0x1f1f4ea异常指针dump。详见 `AURORA_WITCHER_MFG_SWITCH_20260915.md`。原始证据仅在本任务 `work/witcher-switch-20260915/`。

0 commit comments

Comments
 (0)