I recreated the test carried out by Marc (MadeMyDay) but with revision 2051 and I got the same results. Then I modified it to test the original problem, which was returning the value of template variable for another document.
Not the current one! It turned out that the original problem persists.
The test
I made a simple hierarchy with clean install of rev. 2051 (numbers in parentheses are document ids):
Doc 1 (1)
+ Doc 2 (2)
+ Doc 3 (3)
I added a template variable named [tt]inherit[/tt], text, empty, with default value [tt]@INHERIT Hello world[/tt]. Then made a snippet with the same original name [tt]inherit[/tt]

:
<?php
$docid = 2;
$output = $modx->getTemplateVarOutput( 'inherit', $docid );
return $output[ 'inherit' ];
?>
All documents have the same content:
<p>Renderer output: [*inherit*]</p>
<p>API Output: [!inherit!]</p>
Results
- With no overrides to tv values, both renderer and API results are the same, which is what one would expect.
- With value for [tt]Doc 1[/tt] overridden with [tt]override[/tt]:
[table]
[tr][td]Document[/td][td]Renderer[/td][td]API[/td][/tr]
[tr][td]Doc 1[/td][td][tt]override[/tt][/td][td][tt]Hello world[/tt][/td][/tr]
[tr][td]Doc 2[/td][td][tt]override[/tt][/td][td][tt]override[/tt][/td][/tr]
[tr][td]Doc 3[/td][td][tt]override[/tt][/td][td][tt]override[/tt][/td][/tr]
[/table]
Error: value for [tt]Doc 1[/tt] should be [tt]override[/tt].
- With value for [tt]Doc 2[/tt] overridden with [tt]override[/tt]:
[table]
[tr][td]Document[/td][td]Renderer[/td][td]API[/td][/tr]
[tr][td]Doc 1[/td][td][tt]Hello world[/tt][/td][td][tt]override[/tt][/td][/tr]
[tr][td]Doc 2[/td][td][tt]override[/tt][/td][td][tt]override[/tt][/td][/tr]
[tr][td]Doc 3[/td][td][tt]override[/tt][/td][td][tt]override[/tt][/td][/tr]
[/table]
OK.
- With value for [tt]Doc 3[/tt] overridden with [tt]override[/tt]:
[table]
[tr][td]Document[/td][td]Renderer[/td][td]API[/td][/tr]
[tr][td]Doc 1[/td][td][tt]Hello world[/tt][/td][td][tt]Hello world[/tt][/td][/tr]
[tr][td]Doc 2[/td][td][tt]Hello world[/tt][/td][td][tt]Hello world[/tt][/td][/tr]
[tr][td]Doc 3[/td][td][tt]override[/tt][/td][td][tt]Hello world[/tt][/td][/tr]
[/table]
OK.
Conclusion
The [tt]getTemplateVarOutput[/tt] function does not return inherited value for a template variable when called from another document.
I made a comment in the
associated bug tracker task.