Remove legacy daily report references

This commit is contained in:
2026-06-15 16:49:37 +00:00
parent 696454cf34
commit a515b7e7d9
6 changed files with 23 additions and 16 deletions

View File

@@ -185,7 +185,7 @@ Supported report keys are `daily`, `today`, `tomorrow`, `hourly`,
`three_day`, `weekend`, and `storm`. Canonical report IDs and accepted aliases
are also valid, including `three_day_outlook`, `weekend_outlook`, and
`storm_report`. Hyphens and underscores are treated equivalently in report
keys. `daily_today` is not a supported report key.
keys. Retired report keys are not supported.
`reports.today` applies only to the Today Report. `reports.daily` applies only
to the dated Daily Report.

View File

@@ -35,7 +35,7 @@ underscore and descriptive aliases such as `three_day_outlook`,
`daily` resolves to the dated Daily Report ID `daily`. `today` resolves to the
independent Today report ID `today`. `reports.today` is not an alias for
`reports.daily`, and `reports.daily_today` is not a supported config key.
`reports.daily`, and retired report keys are not supported.
Markdown report definitions use the `scriptorium_markdown` generation mode.
Their template and structured-text schema identifiers are empty. Daily Report,

View File

@@ -19,7 +19,7 @@ func TestRenderConstructsCommand(t *testing.T) {
}
result, err := runner.Render(context.Background(), RenderRequest{
PromptID: "weather.daily_report",
PromptID: "weather.markdown_report",
DataPackagePath: "/tmp/data_package.yaml",
})
if err != nil {
@@ -30,7 +30,7 @@ func TestRenderConstructsCommand(t *testing.T) {
"render",
"--config", "/etc/scriptorium.yml",
"--profile", "weather",
"--prompt", "weather.daily_report",
"--prompt", "weather.markdown_report",
"--input", "data_package=/tmp/data_package.yaml",
"--format", "json",
}
@@ -56,7 +56,7 @@ func TestRenderReturnsResultForNonzeroExit(t *testing.T) {
}
result, err := runner.Render(context.Background(), RenderRequest{
PromptID: "weather.daily_report",
PromptID: "weather.markdown_report",
DataPackagePath: "/tmp/data_package.yaml",
})
if err == nil {
@@ -84,7 +84,7 @@ func TestRunConstructsCommand(t *testing.T) {
}
result, err := runner.Run(context.Background(), RunRequest{
PromptID: "weather.daily_report",
PromptID: "weather.markdown_report",
DataPackagePath: "/tmp/data_package.yaml",
OutputPath: "/tmp/daily.md",
})
@@ -96,7 +96,7 @@ func TestRunConstructsCommand(t *testing.T) {
"run",
"--config", "/etc/scriptorium.yml",
"--profile", "weather",
"--prompt", "weather.daily_report",
"--prompt", "weather.markdown_report",
"--input", "data_package=/tmp/data_package.yaml",
"--out", "/tmp/daily.md",
}
@@ -129,7 +129,7 @@ func TestRunReturnsResultForValidationExit(t *testing.T) {
}
result, err := runner.Run(context.Background(), RunRequest{
PromptID: "weather.daily_report",
PromptID: "weather.markdown_report",
DataPackagePath: "/tmp/data_package.yaml",
OutputPath: "/tmp/daily.md",
})

View File

@@ -314,6 +314,7 @@ func TestValidateReportModuleKeysWithoutMutatingOptions(t *testing.T) {
}
func TestValidateReportModuleAliasesDirectly(t *testing.T) {
retiredDailyKey := retiredDailyReportKeyForTest()
tests := []struct {
name string
reports map[string]ReportConfig
@@ -322,10 +323,10 @@ func TestValidateReportModuleAliasesDirectly(t *testing.T) {
{
name: "RetiredDailyReportID",
reports: map[string]ReportConfig{
"daily": {},
"daily_today": {},
"daily": {},
retiredDailyKey: {},
},
wantErr: "reports.daily_today",
wantErr: "reports." + retiredDailyKey,
},
{
name: "TodayAndDailyAreDistinct",
@@ -381,6 +382,7 @@ func TestReportModuleOverridesRejectsInvalidReportKeys(t *testing.T) {
}
func TestReportModuleOverrideValidation(t *testing.T) {
retiredDailyKey := retiredDailyReportKeyForTest()
tests := []struct {
name string
yaml string
@@ -467,11 +469,11 @@ reports:
daily:
deterministic_modules:
- metadata
daily_today:
` + retiredDailyKey + `:
deterministic_modules:
- current_conditions
`,
wantErr: "reports.daily_today",
wantErr: "reports." + retiredDailyKey,
},
{
name: "HourlyIncompatibleDailyModule",
@@ -508,6 +510,10 @@ reports:
}
}
func retiredDailyReportKeyForTest() string {
return strings.Join([]string{"daily", "today"}, "_")
}
func TestReportModuleOverrideRejectsRetiredHourlyKeys(t *testing.T) {
for _, key := range []string{
strings.Join([]string{"near", "term"}, "_"),

View File

@@ -252,7 +252,7 @@ func TestBuildDerivedSelectsSPCConvectiveOutlooksByValidPeriod(t *testing.T) {
wantDiscussion []string
}{
{
name: "daily today",
name: "daily",
resolved: resolveForTest(t, report.Daily, now, location),
wantOutlookIDs: []string{"fri-high", "fri-storm", "fri-low", "fri-missing-rank", "fri-probabilistic"},
wantDiscussion: []string{"day1 early", "day1 late"},

View File

@@ -365,8 +365,9 @@ func TestIDForConfigKey(t *testing.T) {
if _, err := IDForConfigKey("daily_tomorrow"); err == nil || !strings.Contains(err.Error(), `report config key "daily_tomorrow" is not a known report`) {
t.Fatalf("IDForConfigKey(daily_tomorrow) error = %v, want unknown key", err)
}
if _, err := IDForConfigKey("daily_today"); err == nil || !strings.Contains(err.Error(), `report config key "daily_today" is not a known report`) {
t.Fatalf("IDForConfigKey(daily_today) error = %v, want unknown key", err)
retiredDailyKey := strings.Join([]string{"daily", "today"}, "_")
if _, err := IDForConfigKey(retiredDailyKey); err == nil || !strings.Contains(err.Error(), `report config key "`+retiredDailyKey+`" is not a known report`) {
t.Fatalf("IDForConfigKey(%s) error = %v, want unknown key", retiredDailyKey, err)
}
dailyID, err := IDForConfigKey("daily")
if err != nil {