Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ jobs:
--no-build `
-- @builderArgs
Copy-Item .\moder-update-bin\moder_update_updater.exe .\artifacts\update-feed\moder_update_updater.exe -Force
Copy-Item .\moder-update-bin\moder_update_updater.exe .\artifacts\standalone\moder_update_updater.exe -Force
$catalogPath = '.\artifacts\update-feed\catalog.json'
$catalog = Get-Content $catalogPath -Raw | ConvertFrom-Json
$catalog | Add-Member -NotePropertyName UpdaterChecksum -NotePropertyValue ((Get-FileHash .\artifacts\update-feed\moder_update_updater.exe -Algorithm SHA512).Hash.ToLower()) -Force
Expand Down
4 changes: 2 additions & 2 deletions TelegramSearchBot.Test/Service/Todo/TodoServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ public async Task UpdateTodoAsync_UpdatesFieldsAndResetsReminderState() {
listName: "工作",
description: "初始描述",
priority: "high",
dueAt: "2026-04-25T20:00:00+08:00",
remindAt: DateTimeOffset.UtcNow.AddMinutes(-5).ToString("O"));
dueAt: DateTimeOffset.UtcNow.AddDays(1).ToString("O"),
remindAt: DateTimeOffset.UtcNow.AddHours(1).ToString("O"));

await _todoService.MarkReminderSentAsync(created.TodoId!.Value, 999, DateTime.UtcNow.AddMinutes(-1));

Expand Down
3 changes: 3 additions & 0 deletions TelegramSearchBot/TelegramSearchBot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Deterministic>true</Deterministic>
<DeterministicSourcePaths>true</DeterministicSourcePaths>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
Comment on lines +22 to +24
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify which projects in the solution carry deterministic flags and whether SourceLink is wired.
fd -e csproj | xargs -I{} sh -c 'echo "=== {} ==="; grep -nE "Deterministic|ContinuousIntegrationBuild|SourceLink" "{}" || echo "(none)"'

Repository: ModerRAS/TelegramSearchBot

Length of output: 1216


🏁 Script executed:

#!/bin/bash
# 1. Check lines 101-106 in TelegramSearchBot.csproj to verify the project references
echo "=== Project references in TelegramSearchBot.csproj (lines 101-106) ==="
sed -n '101,106p' TelegramSearchBot/TelegramSearchBot.csproj

echo ""
echo "=== Check if Directory.Build.props exists ==="
if [ -f Directory.Build.props ]; then
  echo "Directory.Build.props EXISTS"
  cat Directory.Build.props
else
  echo "Directory.Build.props DOES NOT EXIST"
fi

echo ""
echo "=== Check for SourceLink references in all .csproj files ==="
fd -e csproj | xargs grep -l "SourceLink\|sourcelink" || echo "No SourceLink found"

Repository: ModerRAS/TelegramSearchBot

Length of output: 883


🏁 Script executed:

#!/bin/bash
# Check the PropertyGroup context around the deterministic flags
echo "=== PropertyGroup context around lines 22-24 ==="
sed -n '16,30p' TelegramSearchBot/TelegramSearchBot.csproj

echo ""
echo "=== Check for publish profiles or artifact/standalone configuration ==="
find . -name "*publish*" -o -name "*.pubxml" | head -20

echo ""
echo "=== Check if artifacts/standalone is mentioned in build files ==="
grep -r "artifacts\|standalone" --include="*.csproj" --include="*.props" | head -10

Repository: ModerRAS/TelegramSearchBot

Length of output: 1061


Determinism flags missing from referenced projects — SHA512 comparison won't stabilize.

The PR objective is to make unchanged assemblies produce identical SHA512 hashes so ComputeChangedFiles only flags truly changed files. However, these flags are only added to TelegramSearchBot.csproj in a Release-specific PropertyGroup. The six referenced projects at lines 101–106 (TelegramSearchBot.Common, .Database, .LLM, .Search, .LLMAgent, .SubAgent) have no Deterministic, DeterministicSourcePaths, or ContinuousIntegrationBuild settings.

Each non-deterministic dependency will have a varying PE timestamp and MVID per build, so its file hash will change every run and the cumulative package logic will keep flagging them as changed even when nothing changed. The fix needs to be applied to every project whose output ends up in the build — preferably by centralizing it in a Directory.Build.props at the repo root so all projects pick it up uniformly.

Critical caveat: DeterministicSourcePaths=true requires SourceLink/source-control integration to avoid build failures. No SourceLink package is currently configured in any project. Either add Microsoft.SourceLink.GitHub (or equivalent) to the projects, or set DeterministicSourcePaths=false while keeping Deterministic=true.

♻️ Suggested approach: centralize via Directory.Build.props

Create Directory.Build.props next to the solution file:

<Project>
  <PropertyGroup Condition="'$(Configuration)'=='Release'">
    <Deterministic>true</Deterministic>
    <DeterministicSourcePaths>true</DeterministicSourcePaths>
    <ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
  </PropertyGroup>
</Project>

Then remove the duplicated block from TelegramSearchBot.csproj:

   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <Deterministic>true</Deterministic>
-    <DeterministicSourcePaths>true</DeterministicSourcePaths>
-    <ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
   </PropertyGroup>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@TelegramSearchBot/TelegramSearchBot.csproj` around lines 22 - 24, Add
repository-wide deterministic build properties so all projects (including
TelegramSearchBot.Common, TelegramSearchBot.Database, TelegramSearchBot.LLM,
TelegramSearchBot.Search, TelegramSearchBot.LLMAgent, TelegramSearchBot.SubAgent
and TelegramSearchBot) produce stable SHA512s: create a Directory.Build.props at
repo root with a Release-scoped PropertyGroup that sets Deterministic,
DeterministicSourcePaths, and ContinuousIntegrationBuild; remove the redundant
Release block from TelegramSearchBot.csproj afterward. Because
DeterministicSourcePaths=true requires SourceLink, either add a SourceLink
package (e.g., Microsoft.SourceLink.GitHub) to the projects that produce PEs or
set DeterministicSourcePaths=false in Directory.Build.props and keep
Deterministic=true to avoid build failures.

</PropertyGroup>
<ItemGroup>
<PackageReference Include="Coravel" Version="6.0.2" />
Expand Down
Loading