fix: refresh trails cache independently of enable report · Entire
fix: refresh trails cache independently of enable report
cb5986e→main·
dipree·1mo ago·1 file·+13 added/-11 removed
Sessions
98f060cf1f64View transcript
[?
Inject Trail Context into Agent ModelPi·Opus 4.8·3 steps](/content/gh/entireio/cli/session/019ecbec-8bcf-7f35-a647-2fc26c08a22e#timeline-98f060cf1f64/index.html)
Changes
1
cmd/entire/cli
Msetup.go+13/-11
959 unmodified lines
960
961
962
963
963
964
965
966
967
968
969
970
971
10 unmodified lines
982
983
984
985
986
987
988
984
989
990
987
988
989
990
991
992
993
994
995
991
992
993
994
995
996
997
998
999
1000
959 unmodified lines
if info.Forge == "" {
// Trails are only available for remotes that map to a supported forge.
// Persist the negative locally even if auth is unavailable so a stale true
// cache from a previous origin does not inject on the prompt path.
// cache from a previous origin does not inject on the prompt path. No API
// report is useful for non-forge remotes.
if err := saveTrailsEnabledForRepo(ctx, false); err != nil {
logging.Debug(ctx, "failed to cache trails enablement", "error", err)
}
return
}
cleanURL, err := cleanRemoteURLForReport(rawURL)
10 unmodified lines
}
if _, err := client.ReportEnable(ctx, cleanURL); err != nil {
// The enable report is best-effort and independent from the trails cache:
// still try the trails probe so a reporting failure doesn't leave the
// prompt-path cache stale or unknown.
logging.Debug(ctx, "enable report failed", "error", err)
return
}
if info.Forge != "" {
enabled, err := client.TrailsEnabled(ctx, info.Forge, info.Owner, info.Repo)
if err != nil {
logging.Debug(ctx, "trails enablement probe failed", "error", err)
return
}
if err := saveTrailsEnabledForRepo(ctx, enabled); err != nil {
logging.Debug(ctx, "failed to cache trails enablement", "error", err)
}
enabled, err := client.TrailsEnabled(ctx, info.Forge, info.Owner, info.Repo)
if err != nil {
logging.Debug(ctx, "trails enablement probe failed", "error", err)
return
}
if err := saveTrailsEnabledForRepo(ctx, enabled); err != nil {
logging.Debug(ctx, "failed to cache trails enablement", "error", err)
}
}
Mcmd/entire/cli/setup.go+13/-11