Draft
Conversation
added 7 commits
April 14, 2026 22:08
- CounterfactualEntry model: resolves base fields from bcbench.jsonl at load time - Register COUNTERFACTUAL_EVALUATION in EvaluationCategory enum - Reuse BugFixPipeline, BugFixResult, ExecutionBasedEvaluationResultSummary - Add counterfactual-evaluation prompt template (same as bug-fix) - Add leaderboard placeholder (docs/_data/counterfactual-evaluation.json) - Add COUNTERFACTUAL.md documentation - Add 8 tests for CF entry loading, schema, and category properties
Structure (restructured from old thesis modules): - src/bcbench/analysis/family.py: FamilyOutcome, FamilyType, InstanceResult - src/bcbench/analysis/aggregator.py: build_families() (was family_aggregator.py) - src/bcbench/analysis/metrics.py: fragility_rate, severity, layer distribution (was evaluator/thesis_metrics.py) - src/bcbench/analysis/annotation.py: failure sampling + CSV export (was sample_failures.py) - src/bcbench/types.py: FailureLayer enum (L1-L5) - evaluator/counterfactual_scores.py: Braintrust scorers (was thesis_scores.py) - notebooks updated to use proper imports instead of inline stubs - Removed stale notebooks/thesis/ folder - 20 new tests (444 total)
…sis/counterfactual-dataset
Replace single COUNTERFACTUAL_EVALUATION category with CF_1, CF_2, CF_3, CF_4 to enable batched GitHub Actions runs per variant number. - Add is_counterfactual, cf_variant, prompt_template_key properties - Filter entries by __cf-N suffix in dataset list command - Share counterfactual-template across all CF categories - Create per-category leaderboard files (cf-1.json..cf-4.json) - Update copilot-instructions.md and COUNTERFACTUAL.md - Update tests for new category structure
haoranpb
reviewed
Apr 16, 2026
…sis/counterfactual-dataset
…crosoft/BC-Bench into thesis/counterfactual-dataset
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This project investigates transfer failures in large language models (LLMs) when generating code for niche programming languages, using AL as a case study.
We design BC-Bench-CF, a benchmark suite that includes realistic AL development tasks and minimal counterfactual variants. The goal is to evaluate not only functional correctness, but also robustness to small specification changes and sensitivity to AL-specific execution semantics.
Our analysis is grounded in a layered failure framework, which attributes model errors to different abstraction levels, including syntax, validation semantics, event-driven paradigms, workflow composition, and ecosystem constraints.