Skip to content

RepoContextBench v2: publish Claude Code Hard runs#2

Draft
rodion-m wants to merge 6 commits into
mainfrom
RepoContextBench-v2
Draft

RepoContextBench v2: publish Claude Code Hard runs#2
rodion-m wants to merge 6 commits into
mainfrom
RepoContextBench-v2

Conversation

@rodion-m

Copy link
Copy Markdown
Member

Summary

  • harden Claude Code run isolation and attest CLI version, resolved model, safe mode, and repository instruction content
  • make v2 publication admission robust to canonical Codex provider aliases and JSON-aware sensitive-data scanning
  • publish the first two RepoContextBench v2 Hard results for Sapling: Claude Haiku 4.5 max and Claude Sonnet 5 xhigh

Results

Run Model Effort Score
run-001 Claude Haiku 4.5 max 44.2%
run-002 Claude Sonnet 5 xhigh 66.8%

Both runs contain 20/20 scored tasks, use the frozen Sapling commit and Codex CLI gpt-5.6-sol medium judge, and pass publication admission with zero rejected runs.

Validation

  • dotnet build RepoContextBench.slnx --no-restore (0 warnings, 0 errors)
  • dotnet test RepoContextBench.slnx --no-build (88/88 passed)
  • npm run check (TypeScript, oxlint, 8/8 frontend tests)
  • npm run build
  • validate-dataset against the frozen Sapling checkout
  • publication exporter: 2 clean runs, 0 rejected
  • generated the report from published result directories
  • scanned published artifacts for local paths, internal IDs, common secret forms, and deprecated Quality naming

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request integrates support for the Claude Code answerer, introducing options for safe mode, expected versions, resolved models, and system prompt instructions. It also adds JSON/JSONL-specific sensitive content scanning during publication export, normalizes judge provider comparisons, and updates benchmark results. The review feedback identifies three key areas for improvement: handling potential JsonException when parsing malformed JSON, addressing case-sensitivity issues in file extension matching, and preventing a potential NullReferenceException when validating Claude Code metrics.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +1275 to +1279
private static bool ContainsSensitiveJson(string text)
{
JsonNode? node = JsonNode.Parse(text);
return node is not null && ContainsSensitiveJson(node);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

If the input text is empty, contains only whitespace, or is otherwise malformed JSON, JsonNode.Parse(text) will throw a JsonException, causing the publication export process to crash.

To make this more robust, wrap the parsing logic in a try-catch block and fall back to plain text scanning (ContainsSensitiveText) if a JsonException is thrown. This ensures the export process continues safely while still catching any sensitive data.

    private static bool ContainsSensitiveJson(string text)
    {
        try
        {
            JsonNode? node = JsonNode.Parse(text);
            return node is not null && ContainsSensitiveJson(node);
        }
        catch (JsonException)
        {
            return ContainsSensitiveText(text);
        }
    }

|| WindowsAbsolutePath().IsMatch(text)
|| SecretValue().IsMatch(text)
|| ObjectIdLike().IsMatch(text))
bool containsSensitiveContent = Path.GetExtension(path) switch

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Path.GetExtension(path) can return extensions with mixed casing (e.g., .JSON or .Json). Since the switch expression is case-sensitive, files with uppercase extensions will bypass the JSON-specific scanning and fall back to plain text scanning.

Convert the extension to lowercase using ToLowerInvariant() to ensure case-insensitive matching.

            bool containsSensitiveContent = Path.GetExtension(path).ToLowerInvariant() switch

Comment on lines +212 to +221
if (!string.IsNullOrWhiteSpace(command.ClaudeExpectedResolvedModel)
&& !string.Equals(
result.Metrics.ResolvedModel,
command.ClaudeExpectedResolvedModel,
StringComparison.Ordinal))
{
throw new InvalidOperationException(
$"Claude Code resolved model must be {command.ClaudeExpectedResolvedModel}; " +
$"observed {result.Metrics.ResolvedModel ?? "<missing>"}.");
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

If result.Metrics is null (for example, if the JSON response is missing the metrics object or deserialization fails), accessing result.Metrics.ResolvedModel will throw a NullReferenceException.

Use the null-conditional operator (?.) to safely access ResolvedModel and prevent potential crashes.

        if (!string.IsNullOrWhiteSpace(command.ClaudeExpectedResolvedModel)
            && !string.Equals(
                result.Metrics?.ResolvedModel,
                command.ClaudeExpectedResolvedModel,
                StringComparison.Ordinal))
        {
            throw new InvalidOperationException(
                $"Claude Code resolved model must be {command.ClaudeExpectedResolvedModel}; " +
                $"observed {result.Metrics?.ResolvedModel ?? \"<missing>\"}.");
        }

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