fix(harbor): restore task.toml [metadata] as Task columns on load - #517
Closed
rohitsudhakar1 wants to merge 1 commit into
Closed
fix(harbor): restore task.toml [metadata] as Task columns on load#517rohitsudhakar1 wants to merge 1 commit into
rohitsudhakar1 wants to merge 1 commit into
Conversation
load() documents its rows as carrying `task.toml`'s `[metadata]` as columns, and `_HarborTask` still parses and stores the config for it, but the mapping was dropped in 5b7110a and nothing has read `config` since. Every row loaded from a Harbor dataset comes back with `columns=None`. The effect is quiet: a converted terminal-bench-style dataset loses the category/difficulty/tags each task ships with, so results cannot be filtered or grouped by them on the dashboard - and because the field is merely absent rather than wrong, nothing surfaces the loss. Restore the mapping behind a small `_columns` helper. Metadata is left unset rather than emptied when a task.toml has no [metadata] table, so tasks without it do not gain an empty column set. Tests: metadata surfaces on a single task, stays None without a [metadata] table, and stays per-task across a dataset whose rows are grouped by build context. The first and third fail on the current code.
rohitsudhakar1
force-pushed
the
fix/harbor-metadata-columns
branch
from
July 28, 2026 02:01
6976b00 to
3b97097
Compare
Collaborator
|
addressed in #516 |
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.
load()documents its rows as carryingtask.toml's[metadata]as columns, and_HarborTaskstill parses and stores the config for it, but the mapping was dropped in5b7110a("Simplify the v6 contract surfaces") and nothing has readconfigsince. Every row loaded from a Harbor dataset comes back withcolumns=None.Repro
Any Harbor dataset whose tasks carry a
[metadata]table:Impact
The failure is quiet. A converted terminal-bench-style dataset loses the
category/difficulty/tagseach task ships with, so results can't be filtered or grouped by them. Because the field is merely absent rather than wrong, nothing surfaces the loss — the docstring onload()still promises the behaviour, and_HarborTask.configis still populated for a consumer that no longer exists.Fix
Restore the mapping behind a small
_columnshelper. Metadata is left unset rather than emptied when atask.tomlhas no[metadata]table, so tasks without it don't gain an empty column set.Tests
Three tests, using the existing
conftestfixtures (which already carry[metadata]):test_load_surfaces_task_toml_metadata_as_columns— metadata reachesTask.columnstest_load_leaves_columns_unset_without_metadata— no[metadata]table staysNonetest_load_dataset_carries_per_task_metadata— metadata stays per-task across a dataset whose rows are grouped by build contextThe first and third fail on current
main:and pass with the fix:
The full suite is
725 passedwith 6 pre-existing failures intest_workspace.py/test_capability_backing.pyaroundsetprivand shell-uid sandboxing. I verified those fail identically on an unmodified checkout on this machine, so they're unrelated to this change.Note
Low Risk
Localized Harbor loader fix with no auth, runtime, or export path changes; behavior matches existing Task.columns usage on sync/upload.
Overview
Restores Harbor
load()mapping so each row’sTask.columnscomes fromtask.toml’s[metadata]table (e.g.category,difficulty,tags), matching the documented contract that was dropped in a prior simplification.A new
_columnshelper copies[metadata]when present and returnsNonewhen it’s missing or empty, so tasks without metadata don’t get an empty column dict. Metadata stays per task when rows are grouped by sharedenvironment/build context.Adds three tests covering metadata surfacing, unset columns without
[metadata], and per-task metadata across grouped datasets.Reviewed by Cursor Bugbot for commit 3b97097. Bugbot is set up for automated code reviews on this repo. Configure here.