Fix Agent Help Trail Availability · Entire
Agent Help and Trails Availability Fix
The agent-help trail is claiming that trails are not available, but it should check the availability of these features. The reason it indicates that trails are unavailable is due to the feature not being generally available. However, we have an elaborate check for whether trails are enabled for a repo and should utilize that instead of stating unavailability.
Implemented Changes
entire agent-helpnow refreshes missing or stale repository-specific trails enablement before determining availability.- Utilizes the existing cached/API enablement mechanism with a bounded timeout.
- Added regression coverage for a previously unknown cache becoming enabled.
- All tests in the
./cmd/entire/clitest suite pass.
Commit Details
Committed, pushed, and created PR #1762:
Changes in Detail:
62d1b2af- Refresh trails availability.- Changes include a hard network/auth dependency that previously didn’t exist. The new call gives agent-help a proper authentication discovery check.
Review Comments
- There is recognition of a latency regression when the cache is missing or stale.
- It allows offline users to wait longer when there’s no login context.
Proposed Solutions
- Skip refreshing immediately if
scope.AuthKeyis empty. - Adjust probe primarily for explicit trail help requests.
- Use a shorter timeout for agent-help-specific requests.
- Report availability as unknown instead of “not enabled” if probing fails.
Fix Implementation
Implemented and pushed:
- Skips trails refresh when no local authentication identity exists, ensuring that regression coverage is intact.
Additional Reviews
Throughout the process, various review comments and suggestions were discussed:
- Ensured that failures now create a 5-minute negative cache which avoids stalls in repeated calls of
agent-help. - Finalized caching decisions do not block subsequent actions due to failures.
Conclusion
These enhancements to the agent-help functionality provide a more efficient and streamlined user experience while addressing previous issues with trails availability checks.