Skip to content

Neon tide 2#218

Open
doublemover wants to merge 1038 commits into
mainfrom
NEON_TIDE
Open

Neon tide 2#218
doublemover wants to merge 1038 commits into
mainfrom
NEON_TIDE

Conversation

@doublemover
Copy link
Copy Markdown
Owner

Summary

HC6-5SBaIAADwOG

General Checklist

  • no mistakes

@doublemover
Copy link
Copy Markdown
Owner Author

@codex pls review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: acea522d02

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/shared/runtime-capability-manifest.js Outdated
Comment thread src/shared/runtime-capability-manifest.js Outdated
Comment thread tools/api/router/analysis.js Outdated
@doublemover
Copy link
Copy Markdown
Owner Author

@codex pls review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6356f8a7f5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bin/pairofcleats.js Outdated
Comment thread tools/tooling/navigation.js
Comment thread tools/tooling/navigation.js Outdated
@doublemover
Copy link
Copy Markdown
Owner Author

@codex please review again, find at least ten issues, do NOT look at yml/workflow files, look at code. Recent changes ideally. Prioritize P0/1's.

@chatgpt-codex-connector
Copy link
Copy Markdown

💡 Codex Review

assertString(entry.id, `${prefix}.id`, configPath);

P1 Badge Allow service repos without explicit id

validateServiceConfig now hard-requires repos[i].id, but the service runtime can resolve repos by path and already falls back to path-based identity (resolveRepoEntry in tools/service/repos.js). This turns valid path-only repo entries into hard startup failures for indexer-service, which is a behavior regression for existing local-only configs.


assertString(entry.url, `${prefix}.url`, configPath);

P1 Badge Stop requiring repo URL for local service repos

Requiring repos[i].url at config-parse time breaks legitimate local workflows where repos are already present on disk (or syncPolicy: none is used), because ensureRepo only needs a URL when it must clone a missing repo. With this validation, those previously valid configs are rejected before the service starts.


assertString(entry.branch, `${prefix}.branch`, configPath);

P1 Badge Permit omitted branch in service repo entries

The new validation makes repos[i].branch mandatory even though the runtime intentionally has a default branch fallback (entry.branch || 'main' in ensureRepo). This rejects valid configs that relied on the existing defaulting behavior and causes avoidable bootstrap failures.


assertPolicy(entry.syncPolicy, `${prefix}.syncPolicy`, configPath, SERVICE_SYNC_POLICIES);

P1 Badge Normalize repo syncPolicy after case-insensitive validation

assertPolicy accepts case-insensitive values, so syncPolicy: "FETCH" now passes validation, but the value is never normalized before use; ensureRepo compares exact lowercase values and will treat non-normalized strings as pull. This means accepted config values can silently execute the wrong sync action.


assertPolicy(config.sync.policy, 'sync.policy', configPath, SERVICE_SYNC_POLICIES);

P1 Badge Normalize sync.policy after case-insensitive validation

sync.policy is validated case-insensitively but merged back without normalization, so values like "FETCH" are accepted yet later interpreted via strict lowercase checks and can degrade to pull behavior. This creates a mismatch between accepted configuration and effective runtime policy.


const assertNonNegativeInteger = (value, label, configPath, { min = 0 } = {}) => {
if (value == null) return;
const parsed = Number(value);
if (!Number.isFinite(parsed) || Math.floor(parsed) !== parsed || parsed < min) {

P1 Badge Coerce validated numeric fields before storing config

assertNonNegativeInteger validates by coercing with Number(value), so numeric strings are accepted, but loadServiceConfig then preserves raw values and downstream code often checks Number.isFinite on the uncoerced field. In practice, configs that pass validation (e.g. "4") can be silently ignored at runtime.


'includeRiskPartialFlows',
'strictRisk',
'rule',

P1 Badge Whitelist strictEvidence for context-pack command

The CLI wrapper validates pairofcleats context-pack flags against this allowlist, but strictEvidence is missing even though runContextPackCli supports it. As a result, users cannot enable strict evidence mode through the top-level CLI and get an unknown-flag error before reaching the actual command.


'maxPaths',
'maxCandidates',
'maxWorkUnits',
'maxWallClockMs'
],

P1 Badge Whitelist workspace federation args for context-pack

context-pack now supports federated execution via workspace/workspaceId, but these flags are not included in wrapper validation, so pairofcleats context-pack --workspace ... is rejected as unknown flags. This makes the new federated path unreachable from the canonical CLI entrypoint.


'repo',
'seed',
'hops',
'maxTokens',
'maxBytes',

P2 Badge Whitelist repo-selection flags for federated context-pack

The federated implementation supports selection controls (select, repo-filter, includeDisabled, maxFederatedRepos), but none are accepted by the wrapper’s context-pack flag gate, so callers cannot constrain repo scope from pairofcleats context-pack. This blocks core federation controls and forces broad/default selection only.


if (sub === 'detect') {
validateArgs(rest, ['json', 'root', 'repo', 'languages'], ['root', 'repo', 'languages']);
return { script: 'tools/tooling/detect.js', extraArgs: [], args: rest };
}
if (sub === 'install') {
validateArgs(rest, ['json', 'dry-run', 'no-fallback', 'root', 'repo', 'scope', 'languages', 'tools'], ['root', 'repo', 'scope', 'languages', 'tools']);
return { script: 'tools/tooling/install.js', extraArgs: [], args: rest };

P1 Badge Honor --root when resolving runtime env for tooling

New tooling subcommands accept --root, but wrapper-side runtime environment resolution still derives repo context from --repo only, so --root invocations can apply runtime settings from the wrong repo/cwd. This can misconfigure NODE_OPTIONS/threadpool shaping for tooling operations in multi-repo workflows.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@doublemover
Copy link
Copy Markdown
Owner Author

@codex please review again, find at least ten issues, do NOT look at yml/workflow files, look at code. Recent changes ideally. Prioritize P0/1's.

@chatgpt-codex-connector
Copy link
Copy Markdown

💡 Codex Review

if (!job) return null;

P1 Badge Persist duplicate suppressions before returning no job

When claimNextJob suppresses queued duplicates during the scan, those mutations are only in memory until saveQueue runs. The early if (!job) return null exits before persisting the updated statuses or writing journal entries, so a pass that only suppresses duplicates silently loses the suppression work and leaves duplicates claimable on the next poll.


const runningDuplicate = findActiveDuplicateJob(queue.jobs, entry.idempotencyKey, entry.id);
if (runningDuplicate?.status === 'running') {

P1 Badge Check running duplicates explicitly before claiming work

findActiveDuplicateJob returns the first active match (queued or running), but this call only suppresses when the returned job is running. If a queued duplicate appears earlier in queue.jobs than a running duplicate with the same idempotency key, this branch misses the running duplicate and allows another claim, violating the duplicate-suppression intent.


const removedLogs = retentionPolicy.cleanupLogs === false
? []
: await pruneDirectoryArtifacts(logsDir, retainedArtifacts.keepLogs);
const removedReports = retentionPolicy.cleanupReports === false
? []
: await pruneDirectoryArtifacts(reportsDir, retainedArtifacts.keepReports);

P1 Badge Restrict compaction artifact deletion to the same queue

Compaction prunes logs/ and reports/ using a keep-set built from only the selected queue/quarantine records, but these directories are shared across queue names. Running compaction for one queue can therefore delete log/report files still referenced by jobs in other queues.


const [queue, quarantine] = await Promise.all([
loadQueue(dirPath, queueName),
loadQuarantine(dirPath, queueName)
]);

P1 Badge Compute orphan artifacts across all queue partitions

Orphan detection loads only one queue/quarantine partition before comparing against files in shared logs/ and reports/ directories. In multi-queue deployments this misclassifies artifacts belonging to other queues as orphans, and downstream cleanup can remove still-referenced files.


.map((line) => JSON.parse(line));
} catch {

P1 Badge Parse journal lines defensively instead of dropping all entries

A single malformed JSONL line currently throws inside .map(JSON.parse) and the outer catch returns [], discarding the entire journal payload. This turns partial log corruption into total state-loss for replay and diagnostics instead of isolating the bad line.


const { lockPath } = getQueuePaths(dirPath, queueName);
return withLock(lockPath, async () => {
await ensureQueueDir(dirPath);
const { logsDir, reportsDir } = await ensureJobDirs(dirPath);
const resolvedQueueName = resolveQueueName(queueName, null);

P2 Badge Resolve queue identity before selecting retry lock path

This function acquires a lock using the raw queueName and only then resolves the effective queue name. For aliases like auto, the lock file can differ from the queue file actually mutated, which allows concurrent writers to bypass mutual exclusion on the real queue state.


const logPath = normalizePathValue(job?.logPath);
const reportPath = normalizePathValue(job?.reportPath);
if (logPath) keepLogs.add(logPath);
if (reportPath) keepReports.add(reportPath);

P2 Badge Keep retained job artifacts when legacy paths are absent

Artifact retention only adds paths already present on job records. Retained legacy jobs without logPath/reportPath are not added to the keep-set, so compaction can delete their conventional artifacts even though the jobs themselves were retained.


const retentionPolicy = options.retentionPolicy && typeof options.retentionPolicy === 'object'
? options.retentionPolicy
: resolveQueueRetentionPolicy({

P2 Badge Normalize caller-supplied retention policy before compaction

When options.retentionPolicy is provided, it is used directly instead of being normalized with defaults. Partial policies (for example toggling only cleanupLogs) leave count fields undefined, which changes retention behavior unexpectedly and can effectively disable trimming.


return {
...repoContext.repoUri,
path: remotePath,
fsPath: remotePath
};

P1 Badge Return a real VS Code Uri for remote absolute hits

For remote workspaces, this branch returns a plain object spread from repoUri instead of constructing a vscode.Uri. openTextDocument expects a real URI object; absolute-path hits in non-file schemes can fail to open because prototype behavior is lost.


safeToUnlock: exists && (stale || ownerAlive === false || !info),

P2 Badge Do not mark unreadable lock metadata as safe to remove

A lock is considered safeToUnlock when metadata cannot be read (!info), which can happen due transient read/parse failures while a live process still owns the lock. That makes unlock able to remove active locks and break queue/shutdown mutual exclusion.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@doublemover
Copy link
Copy Markdown
Owner Author

@codex please review again, find at least ten issues, do NOT look at yml/workflow files, look at code. Recent changes ideally. Prioritize P0/1's.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5e534c25db

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/shared/subprocess/runner-async.js
Comment thread src/shared/subprocess/runner-async.js
Comment thread src/shared/subprocess/runner-async.js
Comment thread src/shared/subprocess/runner-async.js
Comment thread src/contracts/schemas/analysis/context-pack.js
Comment thread src/contracts/schemas/analysis/context-pack.js
Comment thread src/contracts/schemas/analysis/context-pack.js Outdated
Comment thread src/contracts/schemas/analysis/context-pack.js
Comment thread src/contracts/schemas/analysis/context-pack.js
Comment thread bin/pairofcleats.js Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant