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
2 changes: 1 addition & 1 deletion actions/setup/js/aw_context.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function parseInboundAwContext(raw) {
return null;
}
if (typeof raw === "object" && !Array.isArray(raw)) {
return /** @type {Record<string, unknown>} */ raw;
return /** @type {Record<string, unknown>} */ (raw);
}
return null;
}
Expand Down
3 changes: 0 additions & 3 deletions actions/setup/js/handle_agent_failure.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,6 @@ function buildPushRepoMemoryFailureContext(hasPushRepoMemoryFailure, repoMemoryP
*/
function loadMissingDataMessages(items) {
try {
/** @type {Array<any>} */
let resolvedItems = items;
if (!resolvedItems) {
const { loadAgentOutput } = require("./load_agent_output.cjs");
Expand Down Expand Up @@ -639,7 +638,6 @@ function buildMissingDataContext(cacheMemoryEnabled, items) {
*/
function loadMissingToolMessages(items) {
try {
/** @type {Array<any>} */
let resolvedItems = items;
if (!resolvedItems) {
const { loadAgentOutput } = require("./load_agent_output.cjs");
Expand Down Expand Up @@ -700,7 +698,6 @@ function buildMissingToolContext(items) {
*/
function loadReportIncompleteMessages(items) {
try {
/** @type {Array<any>} */
let resolvedItems = items;
if (!resolvedItems) {
const { loadAgentOutput } = require("./load_agent_output.cjs");
Expand Down
4 changes: 2 additions & 2 deletions actions/setup/js/missing_info_formatter.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/**
* Escape markdown content to prevent injection
* @param {string} text - Text to escape
* @param {string | null | undefined} text - Text to escape
* @returns {string} Escaped text
*/
function escapeMarkdown(text) {
Expand All @@ -20,7 +20,7 @@ function escapeMarkdown(text) {

/**
* Format missing_tool messages into markdown list items
* @param {Array<{tool: string, reason: string, alternatives?: string}>} missingTools - Missing tool messages
* @param {Array<{tool: string | null, reason: string, alternatives?: string | null}>} missingTools - Missing tool messages
* @returns {string} Formatted markdown list
Comment on lines 21 to 24
*/
function formatMissingTools(missingTools) {
Expand Down
4 changes: 2 additions & 2 deletions actions/setup/js/pick_experiment.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,14 @@ async function writeSummary(assignments, configs, state, core) {
// Progress bars and ready-for-analysis flags when min_samples is a positive integer.
const progressNames = names.filter(name => {
const ms = configs[name]?.min_samples;
return Number.isInteger(ms) && ms > 0;
return ms != null && Number.isInteger(ms) && ms > 0;
});
if (progressNames.length > 0) {
lines.push("### 📊 Sampling Progress");
lines.push("");
for (const name of progressNames) {
const cfg = configs[name];
const minSamples = cfg.min_samples;
const minSamples = cfg.min_samples ?? 0;
const variants = cfg.variants || [];
const counts = state.counts[name] || {};
const allReady = variants.every(v => (counts[v] || 0) >= minSamples);
Expand Down
2 changes: 1 addition & 1 deletion actions/setup/js/setup_globals.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const { createRateLimitAwareGithub } = require("./github_rate_limit_logger.cjs")
* /tmp/gh-aw/github_rate_limits.jsonl for post-run observability.
*
* @param {typeof core} coreModule - The @actions/core module
* @param {typeof github} githubModule - The @actions/github module
* @param {any} githubModule - The @actions/github module
* @param {typeof context} contextModule - The GitHub context object
Comment on lines 20 to 22
* @param {typeof exec} execModule - The @actions/exec module
* @param {typeof io} ioModule - The @actions/io module
Expand Down
Loading